fix folders

This commit is contained in:
Zan
2024-05-09 16:07:27 -07:00
parent cfa8289330
commit 829c151baf
1959 changed files with 0 additions and 0 deletions

View File

@@ -0,0 +1,16 @@
s=10 Kp=0.05 Ki=0.00 Kd=0.05 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,20 @@
if:AutoPilot<1 and :Nav<1theng=0 f=0 goto1end ap=:AutoPilot
r=20 pt=5 yt=5 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,3 @@
n="\n" :target=n+n+"X: "+:wx+n+"Y: "+:wy+n+"Z: "+:wz
if:load_ap<1thengoto1end
:wx=:nx :wy=:ny :wz=:nz :load_ap=0 goto1

View File

@@ -0,0 +1,13 @@
a="origin_" b=a+"north" c=a+"south" d=a+"east" :kt=b goto2
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
// based on ISAN v2.5 by Collective
// Compass by Firestar99

View File

@@ -0,0 +1,2 @@
a=:au+:ad ifa<1thengoto1end :alarmOn=1 :alarm=1
if:alarmOn thengoto2end :alarm=0 goto1

View File

@@ -0,0 +1,4 @@
a=100 if:av<1thengoto1end :guide=1 :range=1
f=:FcuForward b=:ru+:rm+:rd :FcuForward*=b==0 z/=b==0 goto1+:av
b=4*:rd-2*:ru+:rm c=a*(b>0-b<0) :FUD=c :au=c>0 :ad=c<0 z/=:av*b goto3
:FcuForward=f :FUD=0 :au=0 :ad=0 goto1

View File

@@ -0,0 +1,2 @@
a=:au+:ad ifa<1thengoto1end
b=:au+:ad ifb>0thengoto2end :cas=1 :lav++ :tav++ goto1

View File

@@ -0,0 +1,2 @@
n="\n" p="Clear panel value to reset trip" a="Lifetime: " b="Trip: "
if:Avoids==""then:tav=0end :Avoids=n+a+:lav+n+b+:tav+n+p goto2

View File

@@ -0,0 +1,2 @@
k=1000 a=11*k
:rd=:gd*((:r8+:r9+:r0+:c8+:c9+:c0+:d2+:d3+:l8+:l9+:l0)<a) goto2

View File

@@ -0,0 +1,2 @@
k=1000 a=(12+:range)*k c=:distance*:range
:rm=:gd*((:r4+:r5+:r6+:r7+:c5+:c6+:c7+:d1+:l4+:l5+:l6+:l7+c)<a) goto1

View File

@@ -0,0 +1,2 @@
k=1000 a=10*k
:ru=:gd*((:r1+:r2+:r3+:c1+:c2+:c3+:c4+:l1+:l2+:l3)<a) goto2

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 @@
: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=: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 @@
if:isan_reset then:_="" :isan_reset=0end goto1

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 @@
if:lasers<1then:lsr1=0 :lsr2=0 goto1end :lsr1=1 :lsr2=1-:leco goto1

View File

@@ -0,0 +1,14 @@
x=1.92 y=3.84 ry=3.84 r=57.296 dd=12 s=40 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=:mh/2 :lp3=lpc :lp4=lpc :lr3=lpc :lr4=lpc lru=(ry+mh)/d*r
lrd=(ry-mh)/d*r md=:md/2 lpf=y/(d+md+md)*r iflpf>s thenlpf=s end
lpn=y/(d+md)*r iflpn>s thenlpn=s end :lcw2=1
:lp3=lpf :lp4=lpn :lr3=lru :lr4=lrd :lcw2=3
:lp3=lpc :lp4=lpc :lr3=lpc :lr4=lpc :lcw2=3
:lp3=lpn :lp4=lpf :lr3=lru :lr4=lrd :lcw2=3
:lp3=lpc :lp4=lpc :lr3=lpc :lr4=lpc :lcw2=3
:lp3=lpn :lp4=lpf :lr3=lrd :lr4=lru :lcw2=3
:lp3=lpc :lp4=lpc :lr3=lpc :lr4=lpc :lcw2=3
:lp3=lpf :lp4=lpn :lr3=lrd :lr4=lru
goto2

View File

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

View File

@@ -0,0 +1,14 @@
x=1.92 y=3.84 r=57.296 dd=12 s=40 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=:mh/2 :lp1=lpc :lp2=lpc :lr1=0 :lr2=0 lr=mh/d*r
md=:md/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,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 @@
:md=(:md+:mds)*(:md>=0)-:md>:mdm goto1

View File

@@ -0,0 +1 @@
:mh=(:mh+:mhs)*(:mh>=0)-:mh>:mhm goto1

View File

@@ -0,0 +1,3 @@
x=1.44 ry=-0.96 py=-2.4 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,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=:sp :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=: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" 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=: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

View File

@@ -0,0 +1,2 @@
k=1000 a=(3+:range)*k c=:distance*:range
:w9=:gd*((:c2+:c4+:c6+c)<a) :w0=:gd*((:c1+:c3+:c5+c)<a) goto1

View File

@@ -0,0 +1,2 @@
k=1000 a=(4+:range)*k c=:distance*:range
:wa=:gd*((:c9+:c0+:d1+:d3+c)<a) :wb=:gd*((:c7+:c8+:c9+:d2+c)<a) goto1

View File

@@ -0,0 +1,2 @@
k=1000 a=4*k
:w5=:gd*((:l2+:l3+:l5+:l6)<a) :w6=:gd*((:l1+:l2+:l4+:l5)<a) goto2

View File

@@ -0,0 +1,2 @@
k=1000 a=4*k
:w7=:gd*((:l5+:l7+:l9+:l0)<a) :w8=:gd*((:l4+:l5+:l8+:l9)<a) goto2

View File

@@ -0,0 +1,2 @@
k=1000 a=4*k
:w1=:gd*((:r2+:r3+:r5+:r6)<a) :w2=:gd*((:r1+:r2+:r4+:r5)<a) goto2

View File

@@ -0,0 +1,2 @@
k=1000 a=4*k
:w3=:gd*((:r5+:r6+:r9+:r0)<a) :w4=:gd*((:r5+:r7+:r8+:r9)<a) goto2