initial
This commit is contained in:
19
Reference/EGOTech/shifter/yolol/approach_pid_basic.yolol
Normal file
19
Reference/EGOTech/shifter/yolol/approach_pid_basic.yolol
Normal file
@@ -0,0 +1,19 @@
|
||||
s=18 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.056 Ki=0.001 Kd=5.4 h=0.50 l=1-h p=:M-s goto5 //NSZ
|
||||
Kp=0.080 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
|
||||
@@ -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
|
||||
@@ -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
|
||||
@@ -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
|
||||
@@ -0,0 +1,2 @@
|
||||
a=:au+:ad ifa<1thengoto1end :alarmOn=1 :alarm=1
|
||||
if:alarmOn thengoto2end :alarm=0 goto1
|
||||
@@ -0,0 +1,4 @@
|
||||
a=100 if:av<1thengoto1end :guide=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
|
||||
@@ -0,0 +1,2 @@
|
||||
a=:au+:ad ifa<1thengoto1end
|
||||
b=:au+:ad ifb>0thengoto2end :cas=1 :lav++ :tav++ goto1
|
||||
@@ -0,0 +1,2 @@
|
||||
n="\n" a="Lifetime:"+n b="Trip:"+n
|
||||
if:av_res>0then:tav=0end :Avoids=n+a+:lav+n+n+b+:tav goto2
|
||||
@@ -0,0 +1 @@
|
||||
k=1000 a=8*k :rd=:gd*((:r8+:r9+:rb+:c0+:ca+:l8+:l9+:lb)<a) goto1
|
||||
@@ -0,0 +1,2 @@
|
||||
k=1000 a=(14+:range)*k c=:distance*:range b=:r4+:r5+:r6+:r7+:ra
|
||||
:rm=:gd*((b+:c5+:c6+:c7+:c8+:l4+:l5+:l6+:l7+:la+c)<a) goto1
|
||||
@@ -0,0 +1,2 @@
|
||||
k=1000 a=12*k b=:r1+:r2+:r3+:r0
|
||||
:ru=:gd*((b+:c1+:c2+:c3+:c4+:l1+:l2+:l3+:l0)<a) goto1
|
||||
@@ -0,0 +1 @@
|
||||
if:av*((:dcr1+:dcp1+:dcr2+:dcp2)!=0)then:av=0 :nav=0 :apt=0end goto1
|
||||
@@ -0,0 +1 @@
|
||||
:dg=:guide*(:lasers<1)*(:dcr1==0)*(:dcr2==0) goto1
|
||||
@@ -0,0 +1 @@
|
||||
:BackupRods=(:BackupRods+:brs)*(:BackupRods>=0)-:BackupRods>:mbr goto1
|
||||
@@ -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
|
||||
@@ -0,0 +1 @@
|
||||
if:fcubackward==100then:cruise=10end goto1
|
||||
@@ -0,0 +1,2 @@
|
||||
:GenRate=:MinEPS*((:Min_EPS+:lasers*(:leco<1))>0)+(10000-:Battery)/50
|
||||
goto1
|
||||
4
Reference/EGOTech/shifter/yolol/fuel_time_advanced.yolol
Normal file
4
Reference/EGOTech/shifter/yolol/fuel_time_advanced.yolol
Normal 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
|
||||
1
Reference/EGOTech/shifter/yolol/isan_reset_basic.yolol
Normal file
1
Reference/EGOTech/shifter/yolol/isan_reset_basic.yolol
Normal file
@@ -0,0 +1 @@
|
||||
if:isan_reset then:_="" :isan_reset=0end goto1
|
||||
@@ -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
|
||||
@@ -0,0 +1 @@
|
||||
:MinEPS=(:MinEPS+:mes)*(:MinEPS>=0)-:MinEPS>100 goto1
|
||||
@@ -0,0 +1,2 @@
|
||||
if:lasers<1then:lsr1=0 :lsr2=0 :dp1=0 :dp2=0 :rf=0 goto1end
|
||||
:lsr1=1 :lsr2=1-:leco :rf=1 goto1
|
||||
@@ -0,0 +1,6 @@
|
||||
x=1.68 y=-1.68 r=57.296 dd=8 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
|
||||
@@ -0,0 +1,6 @@
|
||||
x=1.68 y=-1.68 r=57.296 dd=8 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
|
||||
@@ -0,0 +1,2 @@
|
||||
a=1 b=-15 c=20 d=-1 if:dms>d thengoto1end :dp1+=:dps*a
|
||||
if:dp1<b then:dp1=b elseif:dp1>c then:dp1=c endend :dp2=:dp1 goto1
|
||||
@@ -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
|
||||
@@ -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
|
||||
@@ -0,0 +1 @@
|
||||
:lasers*=:fuel>2000 goto1
|
||||
4
Reference/EGOTech/shifter/yolol/mining/mine_basic.yolol
Normal file
4
Reference/EGOTech/shifter/yolol/mining/mine_basic.yolol
Normal file
@@ -0,0 +1,4 @@
|
||||
pd=16 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
|
||||
5
Reference/EGOTech/shifter/yolol/odometer_basic.yolol
Normal file
5
Reference/EGOTech/shifter/yolol/odometer_basic.yolol
Normal 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
|
||||
4
Reference/EGOTech/shifter/yolol/prop_time_advanced.yolol
Normal file
4
Reference/EGOTech/shifter/yolol/prop_time_advanced.yolol
Normal 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
|
||||
@@ -0,0 +1 @@
|
||||
:sense=(:sense+:sss)*(:sense>=0)-:sense>100 goto1
|
||||
2
Reference/EGOTech/shifter/yolol/sloth_basic.yolol
Normal file
2
Reference/EGOTech/shifter/yolol/sloth_basic.yolol
Normal file
@@ -0,0 +1,2 @@
|
||||
if:sloth<1then:sense1=100 :sense2=-100 goto1end
|
||||
:sense1=:sensitivity :sense2=-:sensitivity goto1
|
||||
12
Reference/EGOTech/shifter/yolol/timer_advanced.yolol
Normal file
12
Reference/EGOTech/shifter/yolol/timer_advanced.yolol
Normal 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
|
||||
1
Reference/EGOTech/shifter/yolol/total_fuel_basic.yolol
Normal file
1
Reference/EGOTech/shifter/yolol/total_fuel_basic.yolol
Normal file
@@ -0,0 +1 @@
|
||||
:fuel=:f1+:f2+:f3+:f4+:f5+:f6+:f7+:f8+:f9+:f10+:f11+:f12 goto1
|
||||
@@ -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
|
||||
1
Reference/EGOTech/shifter/yolol/turtle_basic.yolol
Normal file
1
Reference/EGOTech/shifter/yolol/turtle_basic.yolol
Normal file
@@ -0,0 +1 @@
|
||||
if:Turtle<100then:Turtle=:TurtleRate end goto1
|
||||
@@ -0,0 +1 @@
|
||||
:TurtleRate=(:TurtleRate+:trs)*(:TurtleRate>=0)-:TurtleRate>100 goto1
|
||||
@@ -0,0 +1,2 @@
|
||||
k=1000 a=(4+:range)*k c=:distance*:range
|
||||
:w9=:gd*((:c3+:c4+:c7+:c8+c)<a) :w0=:gd*((:c1+:c2+:c5+:c6+c)<a) goto1
|
||||
@@ -0,0 +1,2 @@
|
||||
k=1000 a=(3+:range)*k c=:distance*:range
|
||||
:wa=:gd*((:c7+:c8+:ca+c)<a) :wb=:gd*((:c5+:c6+:c0+c)<a) goto1
|
||||
@@ -0,0 +1,2 @@
|
||||
k=1000 a=4*k b=(5+:dg)*k :w5=:gd*((:l2+:l3+:l6+:l7)<a)
|
||||
:w6=:gd*((:l1+:l2+:l4+:l5+:l0+:la*:dg)<b) goto1
|
||||
@@ -0,0 +1,2 @@
|
||||
k=1000 a=3*k b=5*k
|
||||
:w7=:gd*((:l6+:l7+:l9)<a) :w8=:gd*((:l4+:l5+:l8+:la+:lb)<b) goto2
|
||||
@@ -0,0 +1,2 @@
|
||||
k=1000 a=(5+:dg)*k b=4*k :w1=:gd*((:r0+:r2+:r3+:r6+:r7+:ra*:dg)<a)
|
||||
:w2=:gd*((:r1+:r2+:r4+:r5)<b) goto1
|
||||
@@ -0,0 +1,2 @@
|
||||
k=1000 a=5*k b=3*k
|
||||
:w3=:gd*((:r6+:r7+:r9+:ra+:rb)<a) :w4=:gd*((:r4+:r5+:r8)<b) goto2
|
||||
Reference in New Issue
Block a user