This commit is contained in:
Zan
2024-05-09 14:05:30 -07:00
parent 93d72079dd
commit cfa8289330
2074 changed files with 21518 additions and 11 deletions

View File

@@ -0,0 +1,19 @@
s=9 m=1000 ib=5 t=20 g=0.200 p=0 i=0 x=ib+s u=0
if:Ap*(:M<m)then:Range=1 goto3+:insideSafeZone end goto1
Kp=0.080 Ki=0.001 Kd=5.8 h=0.50 l=1-h p=:M-s goto5 //NSZ
Kp=0.150 Ki=0.001 Kd=5.8 h=0.50 l=1-h p=:M-s goto5 //SZ
e=:M-s d=(p-e)*Kd*h+d*l i+=e*Ki*(:M<x) o=Kp*e+i f=u/t u+=u<t p=e
z/=:Ap*(:M<m)*(d*d>g+e*e>1) :fcuforward=o*f :fcubackward=(d-i)*f goto5
if(d*d>g+e*e>1)==0then:Ap=0end :fcuforward=0 :fcubackward=0 goto1
//Improved PID - Approximated Profiled Motion PID - VER 1.1
// by: Darkyshadow
// github.com/GameName-Darkyshadow/Starbase
// tips by in game mail are not necessary but appreciated
// Tuning Parameters explained on Github with Manual
//Large Ship Example Tunings
//Kp=0.056 Ki=0.001 Kd=5.4 h=0.50 //t=20 //Super Conservative
//Kp=0.080 Ki=0.001 Kd=5.8 h=0.50 //t=20 //Conservative
//Medium Ship Example Tunings
//Kp=0.090 Ki=0.001 Kd=5.8 h=0.98 //t=10 //Medium Aggressive

View File

@@ -0,0 +1 @@
:BackupRods=(:BackupRods+:brs)*(:BackupRods>=0)-:BackupRods>:mbr goto1

View File

@@ -0,0 +1,4 @@
n="\n" a="h" b="m" c="s" k="km" e="\n\nDistance:\n" p=300000
s=t%60 m=(t-s)%3600/60 h=(t-m*60-s)/3600 d=:sp*t/1000
:WithBackup=h+a+m+b+(s-s%1)+c+e+d+k f=:Fuel :bcw=19
t=(:Fuel+:BackUpRods*p)/((f-:Fuel)/4) goto2

View File

@@ -0,0 +1 @@
if:fcubackward==100then:cruise=10end goto1

View File

@@ -0,0 +1,2 @@
:GenRate=:MinEPS*((:Min_EPS+:lasers+:mine)>0)+(10000-:Battery)/50
goto1

View File

@@ -0,0 +1,4 @@
n="\n" a="h" b="m" c="s" k="km" e="\n\nDistance:\n"
s=t%60 m=(t-s)%3600/60 h=(t-m*60-s)/3600 d=:sp*t/1000
:FuelTime=n+h+a+m+b+(s-s%1)+c+e+d+k f=:Fuel :fcw=19
t=:Fuel/((f-:Fuel)/4) goto2

View File

@@ -0,0 +1,4 @@
n="\n" q=n+n s=1728 k=" stks"+q o=" Ore" c=" Crystal" d="Scanning..."
i=0 r=q if:scr<1then:scan=q+"SCANNER OFF" goto2end :scn=1 r+=d t=q
ifi<:sr then:ix=i a=:vl/s/100*100 b=:mt-c-o t+=b+n+a+k i++ goto3end
ift!=q thenr=t end :scan=r goto2

View File

@@ -0,0 +1 @@
:MinEPS=(:MinEPS+:mes)*(:MinEPS>=0)-:MinEPS>100 goto1

View File

@@ -0,0 +1,2 @@
if:lasers<1then:lsr1=0 :lsr2=0 :dp1=0 :rf1=0 goto1end
a=:dns!=0 :lsr1=a :lsr2=a-:leco :rf1=1 goto1

View File

@@ -0,0 +1,2 @@
if:lasers<1then:lsr3=0 :lsr4=0 :dp2=0 :rf2=0 goto1end
a=:dns>=0 :lsr3=a :lsr4=a-:leco :rf2=1 goto1

View File

@@ -0,0 +1,2 @@
if:lasers<1then:lsr5=0 :lsr6=0 :dp3=0 :rf3=0 goto1end
a=:dns>=0 :lsr5=a :lsr6=a-:leco :rf3=1 goto1

View File

@@ -0,0 +1,6 @@
x=1.68 y=-1.68 r=57.296 dd=9 s=10 m=14
if:lasers<1thena=1 goto2end rd=:rd1 d=rd+x
ifrd<1 or rd>m thend=dd+x end c=y/d*r ifc>s thenc=s end goto5+:dms
goto2 // manual
:dp1=c goto2 // fixed
:rot=1 ifa>0then:dp1=c a=0end goto2 // auto

View File

@@ -0,0 +1,6 @@
x=1.68 y=-1.68 r=57.296 dd=9 s=10 m=14
if:lasers<1thena=1 goto2end rd=:rd2 d=rd+x
ifrd<1 or rd>m thend=dd+x end c=y/d*r ifc>s thenc=s end goto5+:dms
goto2 // manual
:dp2=c goto2 // fixed
:rot=1 ifa>0then:dp2=c a=0end goto2 // auto

View File

@@ -0,0 +1,6 @@
x=1.68 y=-1.68 r=57.296 dd=9 s=10 m=14
if:lasers<1thena=1 goto2end rd=:rd3 d=rd+x
ifrd<1 or rd>m thend=dd+x end c=y/d*r ifc>s thenc=s end goto5+:dms
goto2 // manual
:dp3=c goto2 // fixed
:rot=1 ifa>0then:dp3=c a=0end goto2 // auto

View File

@@ -0,0 +1,2 @@
a=1 b=-15 c=20 d=-1 if:dms>d thengoto1end :dp1+=:dps*a e=:dp1
ife<b thene=b elseife>c thene=c endend :dp1=e :dp2=e :dp3=e goto1

View File

@@ -0,0 +1,3 @@
b=90 c=180 a=0.5*(:dms>0) if:lasers*:rot thengoto2end :dr1=0 goto1
if:dcr1==:dr1 then:dp1+=a :dr1+=b end if:dr1>c then:dp1+=a :dr1=0end
goto1

View File

@@ -0,0 +1,3 @@
b=90 c=180 a=0.5*(:dms>0) if:lasers*:rot thengoto2end :dr2=0 goto1
if:dcr2==:dr2 then:dp2+=a :dr2+=b end if:dr2>c then:dp2+=a :dr2=0end
goto1

View File

@@ -0,0 +1,3 @@
b=90 c=180 a=0.5*(:dms>0) if:lasers*:rot thengoto2end :dr3=0 goto1
if:dcr3==:dr3 then:dp3+=a :dr3+=b end if:dr3>c then:dp3+=a :dr3=0end
goto1

View File

@@ -0,0 +1 @@
:lasers*=:fuel>2000 goto1

View File

@@ -0,0 +1,4 @@
pd=12 e=3 x=pd+e k=999
if:mine<1thenn=0 goto2end if:Distance>k then:mine=0end l=n+3 gotol
:Approach=1 :scr=1 n=1
rd=:Distance d=rd+e ifd<1 or rd>x thengoto2end :lasers=1 :mine=0 goto2

View File

@@ -0,0 +1,5 @@
n="\n" k=1000 u="km" t="Trip:"+n
if:odo_res>0then:odometer=n+"Reseting..." :odo_t=0end
s=:sp :odo_l+=s/k :odo_t+=s/k
if:Odometer==""thengoto1end :Odometer=n+:odo_l+u+n+n+t+:odo_t+u+n
goto1

View File

@@ -0,0 +1,4 @@
n="\n" a="h" b="m" c="s" k="km" e="\n\nDistance:\n" t=0
s=t%60 m=(t-s)%3600/60 h=(t-m*60-s)/3600 d=:sp*t/1000
:PropTime=n+h+a+m+b+(s-s%1)+c+e+d+k p=:Propellant :pcw=19
t=:Propellant/((p-:Propellant)/4) goto2

View File

@@ -0,0 +1 @@
:sense=(:sense+:sss)*(:sense>=0)-:sense>100 goto1

View File

@@ -0,0 +1,2 @@
if:sloth<1then:sense1=100 :sense2=-100 goto1end
:sense1=:sensitivity :sense2=-:sensitivity goto1

View File

@@ -0,0 +1,12 @@
n="\n" q="y" j="w" k="d" l="h" o="m"
u="s" g="Reseting..." a=60 b=a*a c=b*24 e=c*7 f=c*365 x=1000
if:t_res>0then:ts=0 z=n+n+g end :Timer=z
t=:ts s=t%a t-=s m=t%b/a t-=m*a h=t%c/b t-=h*b d=t%e/c t-=d*c w=t%f/e
t-=w*e y=t/f z=n ify>0thenz+=y+q end r=w%1 d+=r*7 ifd>6thenw++ d-=7end
ifw>0thenz+=w/x*x+j end v=d%1 ifv==0.999thend+=0.001end // rounding
ifd>0thenz+=d+k+n elsez+=n end z+=h+l+m+o+s+u+n+n :ts++ goto3
// Outputs:
// :Timer - Global for text panel
// Inputs:
// :ts - store timer in seconds, put in memory chip or device

View File

@@ -0,0 +1 @@
:fuel=:f1+:f2+:f3+:f4+:f5+:f6+:f7+:f8+:f9+:f10+:f11+:f12 goto1

View File

@@ -0,0 +1,2 @@
s=3 if:Ping<1thengoto1end i=0 :ponder=1 :idBlink=1
ifi<s*5theni+=1 goto2end :Ping=0 :idBlink=0 :ponder=0 goto1

View File

@@ -0,0 +1 @@
if:Turtle<100then:Turtle=:TurtleRate end goto1

View File

@@ -0,0 +1 @@
:TurtleRate=(:TurtleRate+:trs)*(:TurtleRate>=0)-:TurtleRate>100 goto1