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,16 @@
s=10 Kp=0.11 Ki=0.00 Kd=0.8 t=3 m=1000 g=1/m p=0 goto1+:Approach>0
r=:Distance :Range=1 :Turtle=:TurtleRate :Avoidance=0 :Cruise=10
e=r-s d=e-p i+=e/(d-g) i/=2 o=Kp*e+Ki*i+Kd*d p=e r*=r<m
z/=:Approach*r*(d*d>g+e*e>4) :FCUForward=o/t :FcuBackward=-o*t goto2
:Approach=0 :FCUForward=0 :FcuBackward=0 goto1
// PID approach uses a proportional-integal-derivative controller to
// output FCU values appropriate to the distance and current speed.
// It has several tunables:
// s (setpoint) the distance we want to get to
// Kp (proportional) how much we factor in our current distance
// Ki (integral) factor of how long we've been at our distance
// Kd (derivative) factor of prediction of where we'll be in future
// t (thrust diff) account for disparity in forward/rev thrust power
// CREDIT TO WHITESTRAKE
// github.com/Archaegeo/Starbase/blob/main/Approach/ApproachPID.yolol

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=:spd*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 @@
:GenRate=:MinEPS*:Min_EPS+(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=:spd*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,8 @@
x=1000 n="\n" p=n+n a="TOP" b="BOTTOM" c="RIGHT" d="LEFT" e="CENTER"
f="!!!ALERT!!!" v="OFF" if:rf<1thengoto8end v="ALL CLEAR" i=""
t=:rf8<x+:rf9<x+:rft<x ift>0theni+=a+n end
t=:rf1<x+:rf10<x+:rf11<x+:rfb<x ift>0theni+=b+n end
t=:rf2<x+:rf4<x+:rf5<x+:rf8<x+:rf10<x+:rfr<x ift>0theni+=c+n end
t=:rf3<x+:rf6<x+:rf7<x+:rf9<x+:rf11<x+:rfl<x ift>0theni+=d+n end
rd=:distance t=rd<x-rd<1 ift>0theni+=e+n end
ifi!="" and :rf>0thenv=f+n+i :ga=1else:ga=0end :Guidance=p+v goto2

View File

@@ -0,0 +1,10 @@
u=" " v=u+u r=u+v x="-" y="O" t="\n" s="::" z=1000 a=x b=x c=x d=x e=x
f=x g=x h=x i=x j=x k=x l=x m=x n=x o=x p=x if:rf<1thengoto8end
if:rft<z thena=y end if:rf9<z thenb=y end if:rf8<z thenc=y end
if:rf6<z thend=y end if:rf4<z thene=y end if:rfl<z thenf=y end
if:rf3<z theng=y end if:rf2<z theni=y end if:rfr<z thenj=y end
if:rf7<z thenk=y end if:rf5<z thenl=y end if:rf11<z thenm=y end
if:rf1<z thenn=y end if:rf10<z theno=y end if:rfb<z thenp=y end
if:range>0 and :distance<z thenh=y end q=v+a+r+s+t+r+b+r+c+t+u+d+r+r
::=q+u+e+t+f+v+g+u+h+u+i+v+j+t+u+k+r+r+u+l+t+r+m+u+n+u+o+t+s+r+p+r+s
goto1

View File

@@ -0,0 +1,6 @@
x=7.2 y=-4.56 r=57.296
n="\n" q=n+n s=1728 k=" stks"+q o=" Ore" c=" Crystal" e="Scanning..."
i=0 f=q if:scr<1then:Scan=q+"OFF" goto3end :scn=1 :Range=1 f+=e t=q
d=:Distance+x if:Distance>0thend=y/d*r end :mp=d
ifi<:sr then:ix=i a=:vl/s b=:mt-c-o t+=b+n+a+k i++ goto4end
ift!=q thenf=t end :scan=f goto3

View File

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

View File

@@ -0,0 +1,14 @@
x=7.2 y=-6.48 r=57.296 dd=12 s=-35 m=999
if:lasers<1thengoto2end rd=:Distance d=rd+x
ifrd<1 or rd>m thend=dd+x end lpc=y/d*r iflpc<s thenlpc=s end
mh=:MineHeight/2 :lp1=lpc :lp2=lpc :lr1=0 :lr2=0 lr=mh/d*r
md=:MineDepth/2 lpf=y/(d+md+md)*r iflpf<s thenlpf=s end
lpn=y/(d+md)*r iflpn<s thenlpn=s end :lcw=1
:lp1=lpf :lp2=lpn :lr1=lr :lr2=-lr :lcw=3
:lp1=lpc :lp2=lpc :lr1=0 :lr2=0 :lcw=3
:lp1=lpn :lp2=lpf :lr1=lr :lr2=-lr :lcw=3
:lp1=lpc :lp2=lpc :lr1=0 :lr2=0 :lcw=3
:lp1=lpn :lp2=lpf :lr1=-lr :lr2=lr :lcw=3
:lp1=lpc :lp2=lpc :lr1=0 :lr2=0 :lcw=3
:lp1=lpf :lp2=lpn :lr1=-lr :lr2=lr
goto2

View File

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

View File

@@ -0,0 +1,4 @@
pd=10 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 @@
:MineHeight=(:MineHeight+:mhs)*(:MineHeight>=0)-:MineHeight>:mhm goto1

View File

@@ -0,0 +1 @@
:MineDepth=(:MineDepth+:mds)*(:MineDepth>=0)-:MineDepth>:mdm goto1

View File

@@ -0,0 +1,3 @@
x=7.2 ry=-2.64 py=-1.68 r=57.296 if:Collect<1thengoto1end
if:Distance<1thengoto1end d=:Distance+x :op=py/d*r
:or1=ry/d*r :or2=-:or1 goto1

View File

@@ -0,0 +1,20 @@
if:AutoPilot<1 and :Nav<1theng=0 f=0 goto1end ap=:AutoPilot
r=20 pt=15 yt=15 ep=1.05 ed=5000 et=5000 t=:Turtle :Cruise=0
ifg>0then:Avoidance=1else:Avoidance=0end
xD=:wx-:ex yD=:wy-:ey zD=:wz-:ez Dt=sqrt(xD^2+yD^2+zD^2)
iff<1thenx0=:ex y0=:ey z0=:ez Do=Dt f=1 r=0end
da=sqrt((:ex-x0)^2+(:ey-y0)^2+(:ez-z0)^2) d0=d1 d1=Dt v1=d0-d1
dx=(Do-da)*ep+ed ifDt>dx or :cas>0thens=1 :cas=0end
ifs>0then:FCUForward=0 ifabs v1<15thenf=0 g=0 s=0 goto1endend
e=10^6 ds=e*sqrt((:fx-:ex)^2+(:fy-:ey)^2+(:fz-:ez)^2) Dd=ds/Dt
xs=:ex+Dd*xD/e ys=:ey+Dd*yD/e zs=:ez+Dd*zD/e vr=xs-:fx vs=ys-:fy
vt=zs-:fz vj=:gx-:ex vk=:gy-:ey vl=:gz-:ez va=:fx-:ex vb=:fy-:ey
vc=:fz-:ez vx=vk*vc-vb*vl vy=-(vj*vc-va*vl) vz=vj*vb+va*vk
pj=vr*vj+vs*vk+vt*vl px=vr*vx+vs*vy+vz*vt a=pj>-r b=px>-r c=pj<-r
n="\n" :dd=Do-da+n+Dt+n+v1+"\npj:"+pj+" px:"+px+" r:"+r+" g:"+g d=pj>r
ifDt<et then:AutoPilot=0 :FCUForward=0end ifg>0thengoto1end h=pj<r
ifa*h*b*(px<r)theng=ap :FCUForward=t*ap :Nav=0 goto1end j=px>r k=px<-r
ifc then:FcuRotationalPitch=pt end ifd then:FcuRotationalPitch=-pt end
ifj then:FcuRotationalYaw=yt end
ifk then:FcuRotationalYaw=-yt end goto1
// Original by fixerid

View File

@@ -0,0 +1,7 @@
if:Avoidance<1thengoto1end :rf=1 :range=1
if:ga>0thengoto4end :FcuRotationalPitch=0
ifi>0then:FCUForward=f :cas=1 i=0end goto1
:FcuRotationalPitch=-20 :acount++
ifi<1theni=1 f=:FCUForward :FCUForward=0end goto1
// Original by fixerid

View File

@@ -0,0 +1,13 @@
a="origin_" b=a+"north" c=a+"south" d=a+"east" :kt=b goto2-:kr
a+="west" e=160000 f=8*e g=f*3/13 h=2*e i=h*13/19 j=f*3/19 k=h*13/3
l=1000000 m=l-:ke m*=m n=l-:kf n*=n o=l-:kg o*=o :kt=c
p=q r=s t=u
v=l-:ke v*=v w=l-:kf w*=w x=l-:kg x*=x :kt=d
:ex=(m+v)/f+y/g-z/j :ey=v/h-m/i+(y+z)/k :ez=(y+z-m-v)/e
y=l-:ke y*=y q=l-:kf q*=q s=l-:kg s*=s :kt=a
:fx=(n+w)/f+p/g-aa/j :fy=w/h-n/i+(p+aa)/k :fz=(p+aa-n-w)/e
z=l-:ke z*=z aa=l-:kf aa*=aa u=l-:kg u*=u :kt=b
:gx=(o+x)/f+r/g-t/j :gy=x/h-o/i+(r+t)/k :gz=(r+t-o-x)/e goto3-:kr
// based on ISAN v2.5 by Collective
// by Firestar99

View File

@@ -0,0 +1,20 @@
a="" b=" " c=" " d=" " e=" " f=" " g="\n" h="-" i="|"
j=" |\n" k="- -" l="\n |" m=:kx n=:ky goto:kz
:g=o+p+q+m+r+s+g+g+g+k+g+g+l m=:kx n=:ky goto:kz // original by
:g=j+t+u+q+m+g+g+k+g+g+l m=:kx n=:ky goto:kz // Firestar99
:g=j+g+t+u+q+m+g+k+g+g+l m=:kx n=:ky goto:kz
:g=j+g+g+v+t+q+m+w+x+y+g+g+l m=:kx n=:ky goto:kz
:g=j+g+g+k+g+t+u+q+m+g+l m=:kx n=:ky goto:kz
:g=j+g+g+k+g+g+t+u+q+m+l m=:kx n=:ky goto:kz
:g=j+g+g+k+g+g+g+t+z+q+m+w+s m=:kx n=:ky goto:kz
t=a q=a w=e x=f u=a z=a p=a s=i v=a y=h o=a r=b goton
t=a q=a w=d x=f u=b z=b p=a s=i v=h y=h o=a r=b goton
t=b q=a w=c x=f u=b z=b p=a s=i v=h y=h o=a r=b goton
t=c q=a w=b x=f u=b z=b p=a s=i v=h y=h o=a r=b goton
t=d q=a w=a x=f u=b z=b p=b s=i v=h y=h o=a r=a goton
t=e q=a w=a x=e u=b z=b p=b s=b v=h y=h o=b r=a goton
t=f q=a w=a x=d u=b z=i p=i s=b v=h y=h o=c r=a goton
t=f q=b w=a x=c u=b z=i p=i s=b v=h y=h o=c r=a goton
t=f q=c w=a x=b u=b z=i p=i s=b v=h y=h o=c r=a goton
t=f q=d w=a x=a u=b z=i p=i s=b v=h y=h o=c r=a goton
t=f q=e w=a x=a u=b z=i p=i s=a v=h y=a o=c r=a goton

View File

@@ -0,0 +1,14 @@
:ka+=.7*(:ka==0) :kz=2-:kr>0 goto2-:kr
a="+0" b="O1" c=0 d=0 e=0 f=0 g=0 h=.5 i=1
j=:ex k=:ey l=:ez m=:fx-j n=:fy-k o=:fz-l p=:gx-j q=:gy-k r=:gz-l
s=(m*m+n*n+o*o)^h m/=s n/=s o/=s t=(p*p+q*q+r*r)^h p/=t q/=t r/=t
u=:wx-j v=:wy-k w=:wz-l x=(u*u+v*v+w*w)^.5 u/=x v/=x w/=x y=n*r-q*o
z=o*p-r*m aa=m*q-p*n ab=m*u+n*v+o*w ac=y*u+z*v+aa*w ad=p*u+q*v+r*w
f=ac*3/i f=6-f-(3-f)*(f<3)-(-3-f)*(f>-3) g=ad*5/i
:kz=15-g-(5-g)*(g<5)-(-5-g)*(g>-5) :kx=a+b-ab<0-a-b :ky=f :kl=x
:hx=m :hy=n :hz=o :ix=y :iy=z :iz=aa :jx=p :jy=q :jz=r
i=:ka :ks=((j-c)^2+(k-d)^2+(l-e)^2)^.5/1.6 c=j d=k e=l goto3-:kr
:kz=1 c="\n Read\n upgrade\ninstruction\n !!!"
:g=c+"\n\nmissing :ka" goto12-:kr
// original by Firestar99

View File

@@ -0,0 +1,20 @@
if:savewp<1thengoto1end n=:wpn l=n+2 k=1000 p="\n"
t=" \nX:"+:newx/k*k+" \nY:"+:newy/k*k+" \nZ:"+:newz/k*k gotol
:w1=t :wp=n+"\n"+w :savewp=0 goto1
:w2=t :wp=t :savewp=0 goto1
:w3=t :wp=t :savewp=0 goto1
:w4=t :wp=t :savewp=0 goto1
:w5=t :wp=t :savewp=0 goto1
:w6=t :wp=t :savewp=0 goto1
:w7=t :wp=t :savewp=0 goto1
:w8=t :wp=t :savewp=0 goto1
:w9=t :wp=t :savewp=0 goto1
:w10=t :wp=t :savewp=0 goto1
:w11=t :wp=t :savewp=0 goto1
:w12=t :wp=t :savewp=0 goto1
:w13=t :wp=t :savewp=0 goto1
:w14=t :wp=t :savewp=0 goto1
:w15=t :wp=t :savewp=0 goto1
:w16=t :wp=t :savewp=0 goto1
:w17=t :wp=t :savewp=0 goto1
:w18=t :wp=t :savewp=0 goto1

View File

@@ -0,0 +1,5 @@
n="\n" p="Clear panel value to reset trip" k=1000 u="km" t="Trip:"+n
if:Odometer==""then:odometer=n+"Reseting..." :odo_t=0end
s=:spd ifs>150thens=150end :odo_l+=s/k :odo_t+=s/k
if:Odometer==""thengoto1end :Odometer=n+:odo_l+u+n+t+:odo_t+u+n+p
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=:spd*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,2 @@
:Sensitivity=(:Sensitivity+:sss)*(:Sensitivity>=0)-:Sensitivity>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" p="Clear panel value to reset" 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:Timer==""then: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+p :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=:Fuel1+:Fuel2+:Fuel3+:Fuel4+:Fuel5+:Fuel6 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

View File

@@ -0,0 +1,19 @@
n="\n"
if:wl1>0then:wpn=1 :wp=1+n+:w1 :wl1=0 goto2end
if:wl2>0then:wpn=2 :wp=2+n+:w2 :wl2=0 goto2end
if:wl3>0then:wpn=3 :wp=3+n+:w3 :wl3=0 goto2end
if:wl4>0then:wpn=4 :wp=4+n+:w4 :wl4=0 goto2end
if:wl5>0then:wpn=5 :wp=5+n+:w5 :wl5=0 goto2end
if:wl6>0then:wpn=6 :wp=6+n+:w6 :wl6=0 goto2end
if:wl7>0then:wpn=7 :wp=7+n+:w7 :wl7=0 goto2end
if:wl8>0then:wpn=8 :wp=8+n+:w8 :wl8=0 goto2end
if:wl9>0then:wpn=9 :wp=9+n+:w9 :wl9=0 goto2end
if:wl10>0then:wpn=10 :wp=10+n+:w10 :wl10=0 goto2end
if:wl11>0then:wpn=11 :wp=11+n+:w11 :wl11=0 goto2end
if:wl12>0then:wpn=12 :wp=12+n+:w12 :wl12=0 goto2end
if:wl13>0then:wpn=13 :wp=13+n+:w13 :wl13=0 goto2end
if:wl14>0then:wpn=14 :wp=14+n+:w14 :wl14=0 goto2end
if:wl15>0then:wpn=15 :wp=15+n+:w15 :wl15=0 goto2end
if:wl16>0then:wpn=16 :wp=16+n+:w16 :wl16=0 goto2end
if:wl17>0then:wpn=17 :wp=17+n+:w17 :wl17=0 goto2end
if:wl18>0then:wpn=18 :wp=18+n+:w18 :wl18=0 goto2end goto2