fix folders
40
Other/AAS+StrafeArrest/AAS_Stop.yolol
Normal file
@@ -0,0 +1,40 @@
|
||||
r=4000 p=99 a=1 //turn on+off AAS to update init values
|
||||
goto2+:AAS //Non-assigning wait loop
|
||||
:C=:AAS*r>(:AL+:AR+:AU+:AD) if:Cthen:Crus=a :CF=0 goto4endgoto3*:AAS
|
||||
c=:AAS*r>(:AL+:AR+:AU+:AD) :CB=p*c :CF=:FS*(1-c) :MAL=0-c goto3+c
|
||||
goto3 //Fallthrough case. Maybe CF/B=0 to prevent errors?
|
||||
//Sets fwd to 0 and bwd to max if a sector is colliding
|
||||
//Resets fwd to original value when the obstruction ends.
|
||||
//OLD line 4 for comparison
|
||||
if:AAS*r>(:AL+:AR+:AU+:AD)then:CB=p goto4end :CB=0 :CF=:FS goto3
|
||||
|
||||
//Dependencies
|
||||
//NavSuite LeverCenterCenterValue computer controls. :CF, :CB, :FS
|
||||
//LeverCenteringSpeed on forward stick set to Crus
|
||||
//MoveArrest_Lat system with :MAL chipwait
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
//Original by Thaccus
|
||||
r=4000 p=99 a=1 //turn on+off AAS to update init values
|
||||
goto2+:AAS //Non-assigning wait loop
|
||||
:C=:AAS*r>(:AL+:AR+:AU+:AD) if:Cthen:Crus=a :CF=0 endgoto(3+:C)*:AAS
|
||||
c=:AAS*r>(:AL+:AR+:AU+:AD) :CB=p*c :CF=:FS*(1-c) :MAL=-c goto3+c
|
||||
goto1
|
||||
//Sets fwd to 0 and bwd to max if a sector is colliding
|
||||
//Resets fwd to original value when the obstruction ends.
|
||||
//OLD line 4 for comparison
|
||||
if:AAS*r>(:AL+:AR+:AU+:AD)then:CB=p goto4end :CB=0 :CF=:FS goto3
|
||||
|
||||
//Dependencies
|
||||
//NavSuite LeverCenterCenterValue computer controls. :CF, :CB, :FS
|
||||
//LeverCenteringSpeed on forward stick set to Crus
|
||||
//MoveArrest_Lat system with :MAL chipwait
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
//Original by Thaccus
|
||||
20
Other/AAS+StrafeArrest/AAS_Strafe.yolol
Normal file
@@ -0,0 +1,20 @@
|
||||
r=1000 p=100 n=-p :CV=0 :CH=0//r=AU/AD/AL/AR p=FcuInputRange
|
||||
goto2+:AAS //Non-assigning wait loop
|
||||
z/=:C a=:AL<r b=:AD<r :CH=p*a+n*(:AR<r-a) :CV=p*b+n*(:AU<r-b)
|
||||
if(:StopLat+:c)<1then:CV=0 :CH=0 endgoto3*:AAS
|
||||
goto1
|
||||
//Designed to be used with AAS_Stop, MovementArrest, and ESTOP systems
|
||||
//Turn the AAS on and then off to re-init line1 values
|
||||
|
||||
//Dependencies
|
||||
//NavSuite LeverCenterCenterValue computer controls.
|
||||
//AAS_Stop chip for :C output
|
||||
//StopLat Button from MovementArrest system
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
//Original by Thaccus
|
||||
19
Other/AAS+StrafeArrest/MovementArrest_Fwd.yolol
Normal file
@@ -0,0 +1,19 @@
|
||||
y=-5 yd=3 t=0.4 m=0.001 f=.01 b=.5
|
||||
goto2+:ESTOP
|
||||
:Crus=1 :AAS=0 :NAV=0 :StopLat=1 :MAL=0
|
||||
c=y*:RZ+yd*((:RZ-a)/t) a=:RZ :CF=c*f :CB=-c*b goto5-2*:ESTOP
|
||||
:CF=0 :CB=0 :StopLat=0 goto1
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
//Dependencies
|
||||
//LD/CLF Translation Sensor :RZ
|
||||
//NavSuite LeverCenterCenterValue computer controls. :CF, :CB
|
||||
//MovementArrest_Lat chip with chipwait named :MAL
|
||||
//:ESTOP and :StopLat buttons
|
||||
20
Other/AAS+StrafeArrest/MovementArrest_Lat.yolol
Normal file
@@ -0,0 +1,20 @@
|
||||
y=-2 yd=-.5 x=2 xd=.5 t=0.4 :CV=0 :CH=0
|
||||
goto2+:StopLat
|
||||
:CV=y*:RY+yd*((:RY-a)/t) :CH=x*:RX+xd*((:RX-b)/t) a=:RY b=:RX
|
||||
goto3*:StopLat
|
||||
goto5 //error catch if no button. Set goto1 to reset.
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
//Name chipwait field :MAL for ESTOP/AAS integration.
|
||||
|
||||
//Dependencies
|
||||
//LD/CLF Translation Sensor :RX :RY
|
||||
//NavSuite LeverCenterCenterValue computer controls. :CH, :CV
|
||||
//:StopLat button
|
||||
|
||||
BIN
Other/AAS+StrafeArrest/TestShip_AAS+MovementArrest.fbe
Normal file
11
Other/AAS+StrafeArrest/readme.md
Normal file
@@ -0,0 +1,11 @@
|
||||
# AAS+StrafeArrest+EmergencyStop Package
|
||||
|
||||
This set 4 chips uses the LDTS to improve on the longstanding asteroid avoidance regime. It does so by arresting lateral motion after the AAS finishes dodging so that you do not drift into new obstructions. As a bonus, the same code can be used to create an emergency stop button that will counter all motion regardless of facing until the ship comes to a full stop. I have included in this upload a small ship that was built using the newest NavSuite release candidate set and includes this new feature set.
|
||||
|
||||
I am using PD control and you can tune them to your liking through the x/y and xd/yd variables in either MovementArrest chip.
|
||||
|
||||
The strafe arrest system wants to affect the same control fields that AAS does and I have remade the AAS code such that it no longer assigns to computer controls unless it detects something. Unfortunately I could not find a way to do that elegantly on the single line that was the old AAS_Strafe and as such this new version is a two line operation. If anyone wants to have a go at compacting the behavior back down to one line I would be happy to outline the problem and desired behavior.
|
||||
|
||||
On a happier note: this version has a control hierarchy. ESTOP always has priority and pressing the big red stop button turns off any other computer controls Like AAS/NAV/Cruise. AAS is next in line priority wise and will take control during any avoidance action. Finally and should nothing else take priority, the strafe arrest code will ensure that you are not moving laterally.
|
||||
|
||||
Strafe arrest(being the last in line) is suspended via chipwaiting during any avoidance action. I heard that this may affect LEQ systems and I will be testing this claim during the system's stay here in the WIP world. To be clear this is most definitely WIP and will be undergoing extensive testing before it ever comes to the NavSuite. If you would like to be part of testing the next generation of avoidance, I welcome any feedback you come up with. If you just want stability and things that you know work, I respect that and recommend you stick to the AAS included in the current release until this gets more thoroughly vetted.
|
||||
20
Other/AAS_Stop.yolol
Normal file
@@ -0,0 +1,20 @@
|
||||
r=4000 p=99 a=1 :c=0 //turn on+off AAS to update init values
|
||||
goto2+:AAS //Non-assigning wait loop
|
||||
:C=:AAS*r>(:AL+:AR+:AU+:AD) if:C then:Crus=a :CF=0 end goto(3+:C)*:AAS
|
||||
c=:AAS*r>(:AL+:AR+:AU+:AD) :CB=p*c :CF=:FS*(1-c) :ACN=-c goto3+c
|
||||
goto1
|
||||
//Sets fwd to 0 and bwd to max if a sector is colliding
|
||||
//Resets fwd to original value when the obstruction ends.
|
||||
|
||||
//OLD line 4 for comparison
|
||||
if:AAS*r>(:AL+:AR+:AU+:AD)then:CB=p goto4end :CB=0 :CF=:FS goto3
|
||||
|
||||
//Dependencies
|
||||
//NavSuite LeverCenterCenterValue computer controls. :CF, :CB, :FS
|
||||
//LeverCenteringSpeed on forward stick set to Crus
|
||||
//MoveArrest_Lat system with :ACN chipwait
|
||||
|
||||
|
||||
|
||||
|
||||
//Original by Thaccus
|
||||
20
Other/AAS_Strafe.yolol
Normal file
@@ -0,0 +1,20 @@
|
||||
r=1000 p=100 n=-p :CV=0 :CH=0 //r=AU/AD/AL/AR p=FcuInputRange
|
||||
goto2+:AAS //Non-assigning wait loop
|
||||
z/=:C a=:AL<r b=:AD<r :CH=p*a+n*(:AR<r-a) :CV=p*b+n*(:AU<r-b) goto4-:c
|
||||
if(:AN+:c)<1then:CV=0 :CH=0 endgoto3*:AAS
|
||||
goto1
|
||||
//Designed to be used with AAS_Stop, MovementArrest, and ESTOP systems
|
||||
//Turn the AAS on and then off to re-init line1 values
|
||||
|
||||
//Dependencies
|
||||
//NavSuite LeverCenterCenterValue computer controls.
|
||||
//AAS_Stop chip for :C output
|
||||
//:AN Button from MovementArrest system
|
||||
|
||||
z/=:AAS a=:AL<r b=:AD<r :CH=p*a+n*(:AR<r-a) :CV=p*b+n*(:AU<r-b) goto3
|
||||
r>(:AL+:AR+:AU+:AD)
|
||||
|
||||
|
||||
|
||||
|
||||
//Original by Thaccus
|
||||
19
Other/Approach.yolol
Normal file
@@ -0,0 +1,19 @@
|
||||
s=15 t=15 m=1000 g=0.800 ib=4 p=0 i=0 x=ib+s u=0
|
||||
:cdc=2-:cd goto(4-:CD)*:APRCH*(:AU<m)
|
||||
Kp=0.038 Ki=0.001 Kd=5.4 f=0.3 n=300 Kd*=1-f l=:AU-s goto5 //NSZ
|
||||
Kp=0.038 Ki=0.001 Kd=5.4 f=0.3 n=500 Kd*=1-f l=:AU-s goto5 //SZ
|
||||
e=:AU-s p=e p-=(e>n)*(e-n) d=(l-e)*Kd+d*f i+=e*Ki*(:AU<x) r=u/t u+=u<t
|
||||
l=e z/=:Aprch*(:AU<m)*(d*d>g+e*e>5) :CF=(Kp*p+i)*r :CB=(d-i)*r goto5
|
||||
if((d*d>g+e*e>5)*:APRCH)<1 then :APRCH=0 :CF=0 :CB=0 goto1end goto5
|
||||
|
||||
//Improved PID - Approximated Profiled Motion PID - VER 2.1
|
||||
// github.com/GameName-Darkyshadow/Starbase
|
||||
// tips by in game mail are not necessary but appreciated
|
||||
// Tuning Parameters explained on Github with Manual
|
||||
// by: Darkyshadow
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
14
Other/Approach/ApproachPID.yolol
Normal file
@@ -0,0 +1,14 @@
|
||||
s=10 Kp=0.3 Ki=0.01 Kd=4 t=3 m=1000 g=1/m p=0 goto1+:Approach>0
|
||||
r=:RFD 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>1) :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
|
||||
2
Other/Approach/README.md
Normal file
@@ -0,0 +1,2 @@
|
||||
This is the MutleyX Approach script you find on TriFin and other ships
|
||||
Needs a rangefinder and approach button.
|
||||
17
Other/Approach/approach.yolol
Normal file
@@ -0,0 +1,17 @@
|
||||
// Approach ahead - Mutleyx
|
||||
:Approach=0 :range=0 od=0 oa=0
|
||||
a=:Approach ifa!=oa thenoa=a :range=a end goto3+a
|
||||
d=:RangeAhead ifd!=500thengoto6end
|
||||
:FcuForward=0 :FcuBackward=0 goto3
|
||||
ifd>15 and d<20thengoto9end
|
||||
done=0 cd=17.5-d dx=od-cd od=cd adj=-(cd-4.5*dx) goto15
|
||||
|
||||
:FcuForward=0 :FcuBackward=0
|
||||
done++ ifdone>10then:Approach=0end
|
||||
goto2*:Approach+2
|
||||
|
||||
|
||||
|
||||
ifadj>d thenadj=d end :FcuForward=0 :FcuBackward=0
|
||||
ifadj<0then:FcuBackward=-adj*0.5else:FcuForward=adj*0.25end
|
||||
if:Approach thengoto4elsegoto9end
|
||||
20
Other/ArrestChipForward(ACF).yolol
Normal file
@@ -0,0 +1,20 @@
|
||||
y=-12 yd=-4 t=0.4 m=0.001 f=.045 b=1
|
||||
e=:AN goto2+:ESTOP
|
||||
:AN=1 :ACN=0 :Crus=10 :AAS=0 :NAV=0 :APRCH=0 :FS=0
|
||||
c=y*:RZ+yd*((:RZ-a)/t) a=:RZ :CF=c*f :CB=-c*b goto5-2*:ESTOP
|
||||
:CF=0 :CB=0 :Crus=1 :AN=e goto1
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
//Dependencies
|
||||
//LD/CLF Translation Sensor :RZ
|
||||
//NavSuite LeverCenterCenterValue computer controls. :CF, :CB
|
||||
//MovementArrest_Lat chip with chipwait named :ACN
|
||||
//:ESTOP and :AN control buttons
|
||||
//By Thaccus
|
||||
20
Other/ArrestChipNormal(ACN).yolol
Normal file
@@ -0,0 +1,20 @@
|
||||
y=10 a=6 x=-10 b=-6 t=0.2 :CV=0 :CH=0
|
||||
goto2+:AN
|
||||
:CV=y*:RY+a*((:RY-c)/t) :CH=x*:RX+b*((:RX-d)/t) c=:RY d=:RX goto3*:AN
|
||||
|
||||
goto5 //error catch. Set goto1 to reset.
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
//Name chipwait field :ACN for ESTOP/AAS integration.
|
||||
|
||||
//Dependencies
|
||||
//LD/CLF Translation Sensor :RX :RY
|
||||
//NavSuite LeverCenterCenterValue computer controls. :CH, :CV
|
||||
//:AN Arrest Normal button
|
||||
//Credit to Firestar99
|
||||
20
Other/Autonomy.yolol
Normal file
@@ -0,0 +1,20 @@
|
||||
k=1000 t=.6 n="\n" d="Km"+n z=10 x=z-1 f=:fuel p=:propellant
|
||||
a=n+"Fuel Range:"+n b="Prop Range:"+n c=n+"Not Moving"
|
||||
fl=f f=(:fuel+f*x)/z fd=fl-f s=(:SPD+s*x)/z rf=f/fd*s*t/k
|
||||
pl=p p=(:propellant+p*x)/z pd=pl-p rp=p/pd*s*t/k
|
||||
if:Spdthen:estrange=a+rf/k*k+d+b+rp/k*k+d else:estrange=c endgoto3
|
||||
|
||||
|
||||
|
||||
//z is smoothing, higher numbers mean less jumpy ranges but they take
|
||||
//longer to stabilize.
|
||||
|
||||
//Requires text panel named :Range
|
||||
//Requires FuelChamberFuel named :Fuel
|
||||
//requires GasNetworkStoredResource named :Propellant
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
By HappyTrigger and Thaccus
|
||||
20
Other/Autopilot.yolol
Normal file
@@ -0,0 +1,20 @@
|
||||
if1-:Nav theng=0 f=0 goto1end
|
||||
l=0.04 pt=100 yt=100 rt=5 ep=1.05 ed=3000 et=3000 w=26 p=2 a=13
|
||||
xD=:WX-:X yD=:WY-:Y zD=:WZ-:Z Dt=((xD)^2+(yD)^2+(zD)^2)^.5
|
||||
:AAS=g :AN=g iff<1thenx0=:X y0=:Y z0=:Z Do=Dt f=1 r=0 end
|
||||
da=((:X-x0)^2+(:Y-y0)^2+(:Z-z0)^2)^.5 dx=(Do-da)*ep+ed s=Dt>dx
|
||||
ifs>0then:CF=0 if:SPD<1thenf=0 g=0 s=0 goto1endend
|
||||
ifDt<et then:Nav=0 :CF=0 :FS=0 end ifg thengoto1end
|
||||
n="\n" :DD=n+(Do-da)+n+Dt+n+"ly:"+:LY+" lx:"+:LX+" l:"+l+" g:"+g
|
||||
c1=:LX>-l c2=:LX<l c3=:LY>-l c4=:LY<l lz=:LZ<0 ry=c1+c2 rx=c3+c4
|
||||
ifc1*c2*c3*c4*(1-lz)theng=1 :FS=:MaxFF :CF=:MaxFF :Crus=1 goto1end
|
||||
if(lx==:LX)*(ly==:LY)then:CR=rt t=0 gotoaend
|
||||
ifry+rx+lz then:CP=:LY*pt :CY=:LX*yt+yt*lz t=0 end
|
||||
ift>pthen:CR=0 :CP=0 :CY=0 endift<wthent++gotoaend lx=:LX ly=:LY goto1
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
//Original by Fixerid. Modified by Thaccus
|
||||
5
Other/Avoidance.yolol
Normal file
@@ -0,0 +1,5 @@
|
||||
goto :Avoid*((:US+:DS+:LS+:RS)<4000)*2
|
||||
i=2*(:DS<1000)-:US<1000 :FcuUpDown+=100*i
|
||||
i=2*(:LS<1000)-:RS<1000 :FcuRightLeft+=100*i goto (i==0)*4
|
||||
:FcuUpDown=0 :FcuRightLeft=0 goto1
|
||||
// example of avoidance script
|
||||
11
Other/ChomperLiteScripts/ChomperGenerator.yolol
Normal file
@@ -0,0 +1,11 @@
|
||||
b=:BatteryLevel>=9995 G=:Generator gr=:GenRate m=51*(1-:ECO)+101*:CBOS
|
||||
m+=33*(:FCUForward>0)*(m==0) ifG<m+b*(m==0+G>m)thenG=m end
|
||||
G+=1*(b!=1)*(G<=gr)*(gr<100) G-=1*b*(G>=gr)*(gr>0) G*=:Shutdown
|
||||
:Generator=G :GenRate=:GeneratorUnitRate m=0 goto1
|
||||
// b = current battery level
|
||||
// G = current generator setting
|
||||
// gr = current generator rate (how close to setting)
|
||||
// m = minimum battery level, 0 base, 33 if forward engines on,
|
||||
// 51 if Eco button off, 101 if Cargo Beams are on
|
||||
// G is raised by 1 or lowered by 1 to keep battery charged so long
|
||||
// as G is at least minimum.
|
||||
2
Other/ChomperLiteScripts/EngineControl.yolol
Normal file
@@ -0,0 +1,2 @@
|
||||
if:Eco*(:FCUForward>60)then:FCUForward=60end
|
||||
if(:BatteryLevel<1500)then:FCUForward=0end goto1
|
||||
5
Other/ChomperLiteScripts/FrameTimer.yolol
Normal file
@@ -0,0 +1,5 @@
|
||||
:CargoFrame=0 :CLF=0 :Delay=25 goto2-:Frame
|
||||
:CargoFrame=1 :CLF=1 :OpenTimer=0 goto2+:Frame
|
||||
:OpenTimer++ goto 2-2*(:OpenTimer>:Delay)+:Frame
|
||||
|
||||
// :Delay/5 = # of second delay.
|
||||
2
Other/ChomperLiteScripts/RodCount.yolol
Normal file
@@ -0,0 +1,2 @@
|
||||
:TotalRods=:R1+:R2+:R3+:R7+:R8+:R9+:R10+:R11+:R12+:R16+:R17+:R18
|
||||
:warningbutton=:TotalRods<300000 goto1
|
||||
20
Other/CompassDisplayPrep.yolol
Normal file
@@ -0,0 +1,20 @@
|
||||
: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=0.5 i=1
|
||||
j=:X k=:Y l=:Z u=:wx-j v=:wy-k w=:wz-l x=(u*u+v*v+w*w)^h u/=x v/=x
|
||||
w/=x :LX=:HX*u+:HY*v+:HZ*w :LY=:IX*u+:IY*v+:IZ*w :LZ=:JX*u+:JY*v+:JZ*w
|
||||
f=:ly*3/i+h f=6-f-(3-f)*(f<3)-(-3-f)*(f>-3) g=:lx*5/i+h
|
||||
:kx=15-g-(5-g)*(g<5)-(-5-g)*(g>-5) :kz=a+b-:lz<0-a-b :ky=f :kl=x
|
||||
i=:ka :ks=((j-c)^2+(k-d)^2+(l-e)^2)^.5/.8 c=j d=k e=l goto3+:kr
|
||||
|
||||
|
||||
|
||||
|
||||
:kz=1 c="\n Read\n upgrade\ninstruction\n !!!"
|
||||
:k=c+"\n\nmissing :ka" goto12-:kr
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
//Credit to Firestar99
|
||||
20
Other/CompassDisplay_Modded.yolol
Normal file
@@ -0,0 +1,20 @@
|
||||
a="" b=" " c=" " d=" " e=" " f=" " g="\n" h="-" i="|"
|
||||
j=" |\n" k="- -" l="\n |" m=:kz n=:ky goto:kx
|
||||
:k=j+g+g+k+g+g+g+t+z+q+m+w+s m=:kx n=:ky goto:kz
|
||||
:k=j+g+g+k+g+g+t+u+q+m+l m=:kx n=:ky goto:kz
|
||||
:k=j+g+g+k+g+t+u+q+m+g+l m=:kx n=:ky goto:kz
|
||||
:k=j+g+g+v+t+q+m+w+x+y+g+g+l m=:kx n=:ky goto:kz
|
||||
:k=j+g+t+u+q+m+g+k+g+g+l m=:kx n=:ky goto:kz
|
||||
:k=j+t+u+q+m+g+g+k+g+g+l m=:kx n=:ky goto:kz
|
||||
:k=o+p+q+m+r+s+g+g+g+k+g+g+l 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
|
||||
20
Other/CompassISAN3In.yolol
Normal file
@@ -0,0 +1,20 @@
|
||||
a="origin_" b=a+"north" c=a+"south" d=a+"east" :tm=b goto2*(1-:IN)+: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-:SRB m*=m n=l-:SRF n*=n o=l-:SRD o*=o :tm=c
|
||||
p=q r=s t=u
|
||||
v=l-:SRB v*=v w=l-:SRF w*=w x=l-:SRD x*=x :tm=d
|
||||
:X=(m+v)/f+y/g-z/j :Y=v/h-m/i+(y+z)/k :Z=(y+z-m-v)/e
|
||||
y=l-:SRB y*=y q=l-:SRF q*=q s=l-:SRD s*=s :tm=a
|
||||
:T=(n+w)/f+p/g-aa/j :U=w/h-n/i+(p+aa)/k :V=(p+aa-n-w)/e
|
||||
z=l-:SRB z*=z aa=l-:SRF aa*=aa u=l-:SRD u*=u :tm=b
|
||||
:Q=(o+x)/f+r/g-t/j :R=x/h-o/i+(r+t)/k :S=(r+t-o-x)/e goto3*(1-:IN)-:kr
|
||||
|
||||
|
||||
|
||||
|
||||
//:ke,:kf,:kg->:SRB, :SRF, :SRD Rear Front down receivers
|
||||
//:fx,:fy,:fz->:T,:U,:V Front XYZ
|
||||
//:ex,:ey,:ez->:X,:Y,:Z Rear XYZ
|
||||
//:gx,:gy,:gz->:Q,:R,:S Down XYZ
|
||||
|
||||
//Credit to Firestar99
|
||||
20
Other/CompassOrient.yolol
Normal file
@@ -0,0 +1,20 @@
|
||||
h=.5 goto2-:IN+:KR
|
||||
p=:T-:X q=:U-:Y r=:V-:Z m=:Q-:X n=:R-:Y o=:S-:Z 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 y=q*o-r*n z=r*m-p*o
|
||||
:JX=p :JY=q :JZ=r :IX=m :IY=n :IZ=o :HX=y :HY=z :HZ=p*n-q*m goto2+:KR
|
||||
|
||||
|
||||
//below code moved to CompassDisplayPrep chip
|
||||
//:LX=:HX*u+:HY*v+:HZ*w :LY=:IX*u+:IY*v+:IZ*w :LZ=:JX*u+:JY*v+:JZ*w
|
||||
//u=:wx-:X v=:wy-:K w=:wz-:Z x=(u*u+v*v+w*w)^h u/=x v/=x w/=x
|
||||
|
||||
|
||||
//For Downward L receiver pattern replace line3 with:
|
||||
m/=-s n/=-s o/=-s t=(p*p+q*q+r*r)^h p/=t q/=t r/=t y=q*o-r*n z=r*m-p*o
|
||||
//For Upward L receiver pattern replace line3 with:
|
||||
m/=s n/=s o/=s t=(p*p+q*q+r*r)^h p/=t q/=t r/=t y=q*o-r*n z=r*m-p*o
|
||||
|
||||
|
||||
|
||||
//Globals for Receivers and their coords: SRB(XYZ) SRF(TUV) SRD(QRS)
|
||||
//:jx=p :jy=q :jz=r :hx=y :hy=z :hz=a :ix=m :iy=n :iz=o
|
||||
20
Other/CompassOutputXYZ.yolol
Normal file
@@ -0,0 +1,20 @@
|
||||
a=1000 :kr=0 b=0 c=0 d=0 e=0 f=0 g=0 h=""
|
||||
i=" POS ::\n" j=i+"X: " k="\nY: " l="\nZ: " m="\nS: " n=1
|
||||
o="m/s\nD: " p="m\n" q=0 r=60 s=1000 t=r*s u="min" v="h "
|
||||
|
||||
f=:spd g=:kl d=o+g/a*a+p b=g/f/t*s e=b%r+u q/=b>=r e=b/t*s+v+e
|
||||
q/=::==h+n n=0 h=j+:X/a*a+k+:Y/a*a+l+:Z/a*a+m+f/a*a+d+e ::=h goto5
|
||||
c=""+:: n=1 goto8+5*(c=="reset")+7*(c=="")
|
||||
::=i+"Parsing new Target..." d="98743" w=0 x=-1 b=2
|
||||
y=c y-=c-- z=5*(y>4)+2*(d>(d-y)) z+=y>z z+=y>z w+=z*10^x++ goto9+y<0
|
||||
aa=1 ify=="-"thenaa=-1 c--end
|
||||
ab=ac ac=ad ad=w*aa w=0 x=-1 goto9+3*(--b<0)
|
||||
:wx=ad :wy=ac :wz=ab goto5
|
||||
:kr=-20 ae=24 d="\nreseting"
|
||||
d+="." ::=d goto14-14*(ae--<0)
|
||||
d=i+"Streamer mode" ::=d
|
||||
c=:: ::=d goto16-11*(c!=d)+8*(c=="reset")
|
||||
|
||||
|
||||
|
||||
//Credit to Firestar99
|
||||
19
Other/Cosine (Basic Chip)/README.md
Normal file
@@ -0,0 +1,19 @@
|
||||
# Cosine
|
||||
|
||||
This script calculates the cosine of an angle (in degrees) on an **advanced** level Yolol chip.
|
||||
|
||||
## Inputs
|
||||
|
||||
The input is a single number in the `:i` field.
|
||||
|
||||
- `:i` number (degrees. must be greater than zero)
|
||||
|
||||
## Outputs
|
||||
|
||||
The output is a single number in the `:o` field.
|
||||
|
||||
- `:o` Cosine(:i)
|
||||
|
||||
## Credits
|
||||
|
||||
- Zijkhal#0154
|
||||
7
Other/Cosine (Basic Chip)/cos.yolol
Normal file
@@ -0,0 +1,7 @@
|
||||
// This line sets up some constants. It must be run before the next
|
||||
// line. Ensure you are not using the variable names anywhere else
|
||||
// in your program.
|
||||
b=5.234 c=23.775 d=29.59 x=360 k=x*250
|
||||
|
||||
// This line calculates the cosine of :i and puts the result into :o
|
||||
i=abs(:i%x-180)-90 o=b*i+((d*i^5)/k-c*i^3)/k :o=(o+o%0.3)/300
|
||||
8
Other/Durability.yolol
Normal file
@@ -0,0 +1,8 @@
|
||||
// Durability Monitor - :Info = screen name :DurabilityErrors-screen
|
||||
tm=20 if :Info=="" AND :DurabilityErrors>0 then goto2 else end goto1
|
||||
:Info="\nDurability Error!"
|
||||
if td==tm then td=0 goto4 else td++ end goto3
|
||||
:Info="\nRe-\ndistribute the heavy ore in the storage."
|
||||
if td==tm then td=0 goto6 else td++ end goto5
|
||||
:Info="\nOr check the ship for damage."
|
||||
if td==tm then td=0 :Info="" goto2 else td++ end goto7
|
||||
20
Other/Fuel Calc Time/README.md
Normal file
@@ -0,0 +1,20 @@
|
||||
# Fuel Time Calculator
|
||||
|
||||
This script displays how much more time your ship can fly with current usage of propellant and fuel.
|
||||
|
||||
## Inputs
|
||||
|
||||
The inputs are default variable names:
|
||||
|
||||
- `:GasContainerStoredResource`
|
||||
- `:FuelChamberFuel`
|
||||
|
||||
## Outputs
|
||||
|
||||
The output is a string in the `:Left` text panel.
|
||||
|
||||
- `:Left`
|
||||
|
||||
## Credits
|
||||
|
||||
- Waselon#5191
|
||||
12
Other/Fuel Calc Time/fuel-calc-time.yolol
Normal file
@@ -0,0 +1,12 @@
|
||||
h=3600 k=1000 f=":"
|
||||
ugo=:GasContainerStoredResource rfo=:FuelChamberFuel x=1
|
||||
tg=(ugo/k*k)/(gc+1) tf=(rfo/k*k)/(rfc+1)
|
||||
lg=tg/h/k*k lgm=(tg/h-lg)*60/k*k lf=tf/h/k*k lfm=(tf/h-lf)*60/k*k
|
||||
out="\nGas : "+lg+f+lgm x/=(lgm<10) out-=lgm out+="0"+lgm
|
||||
out+="\nFuel: "+lf+f+lfm x/=(lfm<10) out-=lfm out+="0"+lfm
|
||||
:Left=out
|
||||
//
|
||||
//
|
||||
//
|
||||
gc=(ugo-:GasContainerStoredResource)/2 rfc=(rfo-:FuelChamberFuel)/2
|
||||
goto2
|
||||
20
Other/GalacticAlign.yolol
Normal file
@@ -0,0 +1,20 @@
|
||||
l=.02 pt=100 yt=100 rt=100 w=36 d=6 n="\n" s=" "
|
||||
goto2+:ALIGN
|
||||
ift>8then :CP=0 :CY=0 :CR=0 end ift<wthen t++ goto3end
|
||||
j=:jz<0 i=:iy<0 x=:jx y=:jy z=:hy a=y<-l+y>l b=x<-l+x>l c=z<-l+z>l
|
||||
:DD=l+s+j+i+n+a+b+c+n+y+n+x+n+z+n gotod*:ALIGN
|
||||
d=7 ifa+b+jthen:CP=-:jy*pt-pt*j :CY=:jx*yt+yt*j t=7 goto3end
|
||||
d=6 ifc+ithen:CR=:hy*rt+rt*i t=0 goto3end
|
||||
if(a+b+c)<1then:ALIGN=0 end t=w goto3*:align
|
||||
:DD=n+":Align button"+n+"Missing" goto9
|
||||
//^:Align button missing loop
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
//Reorients ship to align with IPS/ISAN grid pointing Z+
|
||||
//:Align :DD :jx :jy :hy :jz :iy :PCH :ROL :YAW
|
||||
//Original By Thaccus
|
||||
12
Other/General.yolol
Normal file
@@ -0,0 +1,12 @@
|
||||
b=0 a=0 m=0
|
||||
if:Approach or :Laser thenm=1elsem=0end
|
||||
fr=2*(100-:Battery/100)+50*m :FR1=fr*1.5 :FR2=fr :FR3=fr*0.5
|
||||
if:door and not :cruise and :FcuForward>0then:door=0end
|
||||
:approachFlash=:approach and :RangeAhead<500
|
||||
if:Battery>9999thenb++elseb=0end ifb>300then:Collect=0end
|
||||
i=:TSZ
|
||||
:BeaconWarn=:Beacon*(not i)
|
||||
ifi then:TBC=2 a=0else:TBC=0 a=1end
|
||||
if(not b)*a then:Beacon=0 b=1end
|
||||
if(not a)*b thena=0end goto2
|
||||
//generic chip i sometimes use to control various things, ignore.
|
||||
9
Other/Generator.yolol
Normal file
@@ -0,0 +1,9 @@
|
||||
if:MLOS then:GLM=65 goto1end
|
||||
if:B<10000then:GLM=100-:B/100else:GLM=0end goto1
|
||||
|
||||
|
||||
fr=2*(100-:Battery/100)+50*:Collect :FR1=fr*1.5 :FR2=fr :FR3=fr*0.5
|
||||
f=0 if:F1<:F2 thenif:F1<:F3 thenf=:F1 elsef=:F3 endelsef=:F2 end
|
||||
iff>:F3 thenf=:F3 end :FuelRod=f
|
||||
|
||||
// Different generator scrip control examples, use one, not all.
|
||||
20
Other/GenericStates.yolol
Normal file
@@ -0,0 +1,20 @@
|
||||
:Coords=1 b=99 c=10 g=100 m=0.001 :SA=1
|
||||
if:HIthen:CRUS=1 :CF=0 :CB=0 :CV=0 :CH=0 :FS=0 end
|
||||
if:CRUS<mthen:AAS=1 :FS=:FcuForward end :FCURL=g+(:GEN*c)-:BAT/g goto2
|
||||
:FCURL=120-:BAT/g goto2 //Fallthrough Case if fields missing
|
||||
|
||||
|
||||
//If you wand to be able to press buttons and still have autopilot on:
|
||||
if:HI*(:FcuBackward>b)then:CRUS=1 :CF=0 :CB=0 :CV=0 :CH=0 :FS=0 end
|
||||
//and set b to whatever value you like. The ship will now only exit
|
||||
//autopilot when you hold back until the lever reaches b
|
||||
|
||||
|
||||
|
||||
|
||||
//Standard battery manager with cruise control
|
||||
//Name at least 1 :StoredBatteryPower->:Bat Set it highest priority
|
||||
//Name Other :StoredBatteryPower->:Battery
|
||||
//Name :FuelChamberUnitRateLimit->:FCURL
|
||||
|
||||
//No credit. Autogen has been around since the beginning of time AFAIK
|
||||
20
Other/INSRotate.yolol
Normal file
@@ -0,0 +1,20 @@
|
||||
goto2*(:IN!=0)
|
||||
:GC=1 if:IN<0 then ::="reset" :IN=1 end
|
||||
a=cos :GY b=sin :GY d=cos :GP e=sin :GP f=cos :GR g=sin :GR
|
||||
:JZ=a*d-b*g*e :JX=-b*d-a*g*e :JY=f*e :HZ=-b*f :HX=-a*f :HY=-g
|
||||
:IZ=-a*e-b*g*d :IX=b*e-a*g*d :IY=f*d goto3*:IN
|
||||
|
||||
|
||||
:GC=1 if:IN<0 then::="reset" :IN=1 end
|
||||
goto9*:IN
|
||||
|
||||
//If you use the LEQGyro then goto8 on line1 in stead of 2
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
//By Azurethi
|
||||
19
Other/INSTranslateX.yolol
Normal file
@@ -0,0 +1,19 @@
|
||||
t=.2 b=0
|
||||
goto3*:IN
|
||||
a=(:JX*:RZ+:IX*:RY-:HX*:RX) :x+=(a+b)/2*t b=a goto3*:IN
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
19
Other/INSTranslateY.yolol
Normal file
@@ -0,0 +1,19 @@
|
||||
t=.2 b=0
|
||||
goto3*:IN
|
||||
a=(:JY*:RZ+:IY*:RY-:HY*:RX) :y+=(a+b)/2*t b=a goto3*:IN
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
20
Other/INSTranslateZ.yolol
Normal file
@@ -0,0 +1,20 @@
|
||||
t=.2 b=0
|
||||
goto3*:IN
|
||||
a=(:JZ*:RZ+:IZ*:RY-:HZ*:RX) :z+=(a+b)/2*t b=a goto3*:IN
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
19
Other/ISAN-Waypoint System/30WPDTW.yolol
Normal file
@@ -0,0 +1,19 @@
|
||||
ld=" [Loading]" dg=" Deg" s="98743" d1=57.288 s2=0.707 j=1 k=100000
|
||||
ul="WP"+:wpcn+ld :dest=ul :dtw=ul a=:wpc-"\nX:"-"\nY:"-"\nZ:" i=0 o=0
|
||||
c=a c-=a-- d=5*(c>4)+2*(s>(s-c)) d+=c>d d+=c>d o+=d*j j*=10 goto3+c<0
|
||||
v=1 ifc=="-"thenv=-1 ifa!=""thena--endend i++ :dest+="." j=1
|
||||
:wZ=:wY :wY=:wX :wX=o*v o=0 n=""+a goto3+3*(i>2)
|
||||
ifn==""thenn="[Unnamed]"end nm="WP"+:wpn fnm=nm+"\n"+n+"\n" ds="? km"
|
||||
:dest=fnm+"X:"+:wx+"\nY:"+:wy+"\nZ:"+:wz+"\nD:"+ds
|
||||
dx=:X-:wX dy=:Y-:wY dz=:Z-:wZ :wpu=0 goto9+10*:wpu
|
||||
dx-=dx%1 dy-=dy%1 dz-=dz%1 x=dx^2 y=dy^2 z=dz^2 d=sqrt(x+y+z) ds=d
|
||||
ifds>k/10thends/=k ds*=100 ds+=" km"elseds-=ds%1 ds+=" m"end
|
||||
xz=sqrt(dx^2+dz^2) q=abs(dx/xz) r=xz/d // written by LizardFish
|
||||
b1=-dy/d s1=-dz/xz p=(b1<s2)*(b1>-s2)*d1*(b1+b1^3/6)
|
||||
p+=(r<s2)*((dy<=0)*(90-d1*(r+r^3/6))+(dy>0)*(d1*(r+r^3/6)-90))
|
||||
h=(q<=s2)*((dz<=0)*(d1*(q+q^3/6))+(dz>0)*(180-d1*(q+q^3/6)))
|
||||
h+=(s1<s2)*(s1>-s2)*(90-d1*(s1+s1^3/6)) goto16+3*:wpu
|
||||
ifdx>0thenh=360-h end h-=h%1 p-=p%1 goto17+(h!=360)*(p<91)*(p>-91)
|
||||
h="ERR" p="ERR"
|
||||
dtw=nm+"\ndX:"+dx+"\ndY:"+dy+"\ndZ:"+dz+"\nwH:"+h+dg+"\nwP:"+p+dg
|
||||
dtw+="\n"+ds :dtw=dtw if:wpu then:wpl=0 goto2end goto7
|
||||
20
Other/ISAN-Waypoint System/30WPIncrement.yolol
Normal file
@@ -0,0 +1,20 @@
|
||||
i=:wpi d=:wpd s=:wps h=:wph l=:wpl a=10 n=:wpn goto1+(i+d+s+h+l)>0
|
||||
n+=i-d n=n*(n>0andn<=a)+a*(n<1)+1*(n>a) n=h+(1-h)*n :wpn=n k=1000 e=20
|
||||
i=:wpi d=:wpd o=n/2-(n/2000*k) j="WP"+n+" [Loading]" goto4-2*((i+d)>0)
|
||||
t="[Unnamed] \nX:"+:x/k*k+" \nY:"+:y/k*k+" \nZ:"+:z/k*k goto 4.5+n/2
|
||||
ifo thenw=:w1 ifs then:w1=t endelsew=:w2 ifs then:w2=t endendgotoe
|
||||
ifo thenw=:w3 ifs then:w3=t endelsew=:w4 ifs then:w4=t endendgotoe
|
||||
ifo thenw=:w5 ifs then:w5=t endelsew=:w6 ifs then:w6=t endendgotoe
|
||||
ifo thenw=:w7 ifs then:w7=t endelsew=:w8 ifs then:w8=t endendgotoe
|
||||
ifo thenw=:w9 ifs then:w9=t endelsew=:w10 ifs then:w10=t endendgotoe
|
||||
ifo thenw=:w11 ifs then:w11=t endelsew=:w12 ifs then:w12=t endendgotoe
|
||||
ifo thenw=:w13 ifs then:w13=t endelsew=:w14 ifs then:w14=t endendgotoe
|
||||
ifo thenw=:w15 ifs then:w15=t endelsew=:w16 ifs then:w16=t endendgotoe
|
||||
ifo thenw=:w17 ifs then:w17=t endelsew=:w18 ifs then:w18=t endendgotoe
|
||||
ifo thenw=:w19 ifs then:w19=t endelsew=:w20 ifs then:w20=t endendgotoe
|
||||
ifo thenw=:w21 ifs then:w21=t endelsew=:w22 ifs then:w22=t endendgotoe
|
||||
ifo thenw=:w23 ifs then:w23=t endelsew=:w24 ifs then:w24=t endendgotoe
|
||||
ifo thenw=:w25 ifs then:w25=t endelsew=:w26 ifs then:w26=t endendgotoe
|
||||
ifo thenw=:w27 ifs then:w27=t endelsew=:w28 ifs then:w28=t endendgotoe
|
||||
ifo thenw=:w29 ifs then:w29=t endelsew=:w30 ifs then:w30=t endendgotoe
|
||||
ifl then :wpcn=n :wpc=w :wpu=1 :dest=j :dtw=j end :wp=n+"\n"+w goto1
|
||||
9
Other/ISAN-Waypoint System/Deltas.yolol
Normal file
@@ -0,0 +1,9 @@
|
||||
lx=0 ly=0 lz=0 k=100 b="\n"
|
||||
x=:x y=:y z=:z dx=x-lx lx=x dy=y-ly ly=y dz=z-lz lz=z
|
||||
ifdx==0+dy==0+dz==0then:Deltas="\nNot Moving" goto2end
|
||||
wx=x-:wx wy=y-:wy wz=z-:wz adx="Opening" ady="Opening" adz="Opening"
|
||||
if(wx>0)*(dx<0)+(wx<0)*(dx>0)thenadx="Closing"end
|
||||
if(wy>0)*(dy<0)+(wy<0)*(dy>0)thenady="Closing"end
|
||||
if(wz>0)*(dz<0)+(wz<0)*(dz>0)thenadz="Closing"end
|
||||
s=b+"dx:"+dx+b+"dy:"+dy+b+"dz:"+dz+b+"X: "+adx+b+"Y: "+ady+b+"Z: "+adz
|
||||
:Deltas=s goto2
|
||||
20
Other/ISAN-Waypoint System/ISAN.yolol
Normal file
@@ -0,0 +1,20 @@
|
||||
A=1000 n=1000 pr=1 sp=1 di=(9.6+2.4*pr)*n so=1-sp o=160000 e=8*o c=""
|
||||
z="origin_" mr=z+"north" br=z+"south" cr=z+"east" z+="west" sm="\nS: "
|
||||
u=e*3/13 l=2*o mm=l*13/19 k=e*3/19 x/=so sm=c s=c sl="\nsignal lost"
|
||||
rr="ISAN2 :_\n " xm="\nX: " ym="\nY: " zm="\nZ: " nn=l*13/3
|
||||
ej=16*sp h="Q" pj=14-pr b=0.5 p=1000000 :at=mr :bt=br :ct=cr :dt=z x=0
|
||||
t=p-:a t*=t i=p-:b i*=i g=p-:c g*=g f=p-:d f*=f x/=:a*:b*:c*:d goto14
|
||||
h="M" t=p-:a t*=t er=(t-el)/4 el=t x/=:a :at=br x=8 gotopj// ISAN
|
||||
i=p-:a i*=i fr=(i-fl)/4 fl=i x/=:a :at=cr x=9 gotopj// From Collective
|
||||
g=p-:a g*=g gr=(g-gl)/4 gl=g x/=:a :at=z x=10 gotopj// v2.5.3 080921
|
||||
f=p-:a f*=f hr=(f-hl)/4 hl=f x/=:a :at=mr x=7 gotopj
|
||||
st=:_!=c :_=rr+"\n\n "+(:at-"origin_")+sl goto 11*(:a==0)*st
|
||||
st=:_!=c :_=rr+"\n\n can't see\n recievers" goto 12*st
|
||||
t+=er i+=fr g+=gr f+=hr //ISAN doc: isan.to/doc - Starmap: isan.to
|
||||
x+=(6-x)*(x<7) :x=(t+i)/e+g/u-f/k :y=i/l-t/mm+(g+f)/nn :z=(g+f-t-i)/o
|
||||
st=:_==c :_=rr+h+xm+:x/n*A+ym+:y/n*A+zm+:z/n*A+sm+s gotoej+x*so+p*st
|
||||
w+=:x uu+=:y vv+=:z r=w-tu j=uu-uv v=vv-vt ej+=(ii++%3)>1 gotox
|
||||
m=(r*r+j*j+v*v)^b s=m/di*A tu=w uv=uu vt=vv w=0 uu=0 vv=0 ej=16 goto19
|
||||
st=:_!=c :_=rr+"\nSpeed can't run on basic chip. set sp=0" goto 18*st
|
||||
:i=r :j=j :k=v :spd=s gotox //Velocity Exporting
|
||||
st=:_!=c :_=rr+"\n\n ISAN2\n OFFLINE" goto 20*st
|
||||
102
Other/ISAN-Waypoint System/README.md
Normal file
@@ -0,0 +1,102 @@
|
||||
# Version 5.0 - ISAN 2.5.3 + up to 30 Waypoint System + Ship and Waypoint Heading
|
||||
(Thanks to Storm_UK for the 30 waypoint refactor.)
|
||||
### Changes 9/8/21 version 5.0: Increased to 30 waypoints, increased name length to 10 char, added ability to rapidly preview waypoint before selecting it, removed need for warning buttons. IMPORTANT: Waypoints field names on mem chips are now w1 to w30 instead of wp1 to wp30. Waypoint format changed to `"Center \nX:0 \nY:0 \nZ:0"` (yes with the `\n`'s)
|
||||
|
||||
#### Single Board Install
|
||||

|
||||
|
||||
#### Dual Board Install
|
||||

|
||||

|
||||
|
||||
|
||||
This is the ISAN system from the Collective.
|
||||
|
||||

|
||||
|
||||
It has been modified to work with my waypoint system and adding in heading and pitch for both ship and to waypoint. The system will store up to 30 waypoints, cycle up and down (wrapping at the ends) and has an overwrite and home feature (goes to wp1).
|
||||
|
||||
"Pitch is your "vertical" angle from the Z axis with 0 being flat along the plane of the belt, and -90 and 90 being perpendicular.
|
||||
Heading is your "horizontal" angle from the Z axis with 0 being along it pointing into the belt, 90 being along the X axis pointing "left" along the belt, and it wrapping back around to 360 pointing back into the belt"
|
||||
|
||||
To test accuracy, aim at the middle of EOS (the big planet) and fly slowly (like 20m/s or less). You should see a heading of 180 and a pitch of 0.
|
||||
|
||||
# Getting Started
|
||||
You can install all or part of this system. These instructions assume you are installing it all. The ISAN.yolol is the same as the one found on their github as of 9/8/21, except it has been modified for Mono mode accuracry (pr=1), speed indication (sp=1),memory chip storage of X, Y and Z, and support of heading and pitch system. Do not use vanilla ISAN with this system.
|
||||
##### If using quad mode, change pr=1 to pr=0 on line 1 of isan.yolol
|
||||
|
||||
#### Materials List for whole system
|
||||
* (Required) Advanced YOLOL Chip - ISAN.yolol script - This is the ISAN script
|
||||
* (Required) Advanded YOLOL Chip - 30WPDTW.yolol script - This is the current selected waypoint screen info script
|
||||
* (Required) Advanced YOLOL Chip - ShipHeading.yolol script - This is the ships heading screen info script.
|
||||
* (Required) Basic YOLOL Chip - 30WPIncrement.yolol script - This is the script for changing between waypoints.
|
||||
* (Required) 5 Buttons - Used for WP Increment, WP Decrement, WP Save, and WP Home Select and WP Apply. These can be any type, I recommend 4 smalls (12x12) and 1 medium (12x24)
|
||||
* (Optional) Basic YOLOL Chip - Deltas.yolol, needed if display of current deltas is desired.
|
||||
* (Flexible) 3 to 5 YOLOL Memory Chips - One for storing `X`, `Y`, `Z` and current WP's `wx`, `wy`, `wz`, `i`, `j`, and `k`, and `spd`. Another chip for `wpu`, `wpcn`, and`wpc` And then 1 memory chip per 10 waypoints
|
||||
###### Note: If using 6 or fewer waypoints, you can get away with 2 memory chips by putting w1 to w2 on chip 2.
|
||||
* (Flexible) 6 24x24 Text Screens - One for ISAN, one for ships heading/pitch, one for current selected waypoint delta, one for browsing waypoints info, one for destination info, one for current ship delta info
|
||||
###### Note: Any screen can be skipped so long as its :field variable is available somewhere (memory chip, progress bar, whatever)
|
||||
* (Flexible) 1 progress bar - Used to display current WP by the selectors. If not present and you hold inc or dec too long, you might skip over wp number.
|
||||
###### Note: If progress bar not used, then `:wpn` must be available somewhere (memory chip)
|
||||
|
||||
1. Install all components and chips for desired level of system. Be sure to bolt them in where appropriate. Remember Memory chips only go in one way and can vanish if not inserted properly. Recommend inserting memory chip, then yaw slightly on ship, see if its still in place.
|
||||
`Note: All pictures below are from a "live" system. Use the values shown in the Readme instead of the pitcutes.`
|
||||
1. Install Memory Chip 1. On the chip, set the following fields: `X`, `Y`, `Z` to 0, `wx`, `wy`, `wz` to 0, `i`, `j`, `k` to 0, and `spd` to 0
|
||||
|
||||

|
||||
1. Install Memory Chip 2. On it set fields `wpu`, `wpcn` to 1, and set `wpc` to `"Center \nX:0 \nY:0 \nZ:0"` (quotes included).
|
||||
|
||||

|
||||
1. Install Memory Chip 3. On the chip, set the fields to: `w1` to `w10`. Set the values to `"Center \nX:0 \nY:0 \nZ:0"` (quotes included) unless you have specific waypoints you want to put in.
|
||||
|
||||

|
||||
1. (OPTIONAL) Repeat with Memory Chips 4 and 5 if using 20 or 30 waypoints. `w11` to `w20` and `w21` to `w30`
|
||||
1. Install the modified ISAN.yolol from here on an Advanced Chip. Set up the receivers fields and ISAN text screen name (`_`) per https://isan.to/isan.pdf. The Waypoint system doesnt care if you are mono or quad mode. If quad mode, set pr=0 on line 1 to turn off precision.
|
||||
`NOTE: The isan.yolol in this folder is modified, do not use the vanilla ISAN. (Display and Reciever fields should be updated as shown in the PDF)`
|
||||
|
||||

|
||||
1. Install ShipHeading.yolol on an advanced chip.
|
||||
1. On a text screen, rename PanelValue field to `Heading` This will show current live heading after its established.
|
||||
|
||||

|
||||
1. Install 30WPDTW.yolol on an advanced chip.
|
||||
1. On a text screen, rename PanelValue field name to `DTW`. This will display Waypoint Number, WP Heading and WP Pitch, and delta X, Y, Z and distance to it.
|
||||
|
||||

|
||||
1. Install 30WPIncrement.yolol on an basic chip. Set the value of `a` on line 1 to your total maximum number of waypoints.
|
||||
1. On a text screen, rename PanelValue field to `wp`.
|
||||
|
||||

|
||||
1. On a second text screen, rename PanelValue field to `dest`
|
||||
|
||||

|
||||
1. (OPTIONAL) Install Deltas.yolol on basic chip.
|
||||
1. (If deltas.yolol installed) On a Text Screen, rename PanelValue field name to `Deltas`. When moving, this will show your current delta X, Y and Z along with OPENING or CLOSING in reference to X, Y and Z to selected Waypoint.
|
||||
|
||||

|
||||
1. Install 4 buttons. Rename ButtonState field names to `wpi`, `wpd`, `wps`, `wph`. (Increment, Decrement, Save, Home). ButtonStyle should be 0. ButtonColor is user preference.
|
||||
|
||||

|
||||
1. Install 1 button. Rename ButtonState field name to `wpl`. ButtonStyle should be 1 for this button. This is the button you press after you find desired waypoint to send it to system for use.
|
||||
1. Install progress bar near buttons if needed to show currently selected waypoint. Name PanelValue to `wpn`. Minvalue 1, maxvalue 30 (or your total number of waypoints). Set initial value to 1.
|
||||
1. (OPTIONAL) You can put SPD on any extra display you want to display just speed. Currently displayed on ISAN panel and on Ships Heading panel.
|
||||
1. (STREAMERS) You can put `_` on a memory chip or other non-display device and the entire system will work without the ISAN text display. Also the `wp` and `dest` values and screens can be done the same way.
|
||||
|
||||
#### Usage Instructions - Note, if any displays look bad, ensure that all scripts are forced to start from line 1.
|
||||
1. During normal flight:
|
||||
1. The ISAN screen will show you current X, Y and Z and Speed.
|
||||
1. The Deltas screen will show you your current X, Y and Z deltas based on current flight direction and speed along with XYZ OPENING or CLOSING to your current selected waypoint, IF MOVING.
|
||||
1. The DTW screen will show currently selected waypoint number, the WP Heading and Pitch to it, and delta X, Y, Z amd dostamce to it.
|
||||
1. The Heading screen will show heading, pitch and speed. If it says Live at bottom, its updating, if it says Last, you are not moving so its the last reading it calculated.
|
||||
###### NOTE: Ships heading is stable AFTER flying in a straight line for a bit, recommend doing at slow speed till desired heading reached.
|
||||
1. To fly to your waypoint: (recommend using combo of both methods)
|
||||
1. Method1: Use delta X/Y/Z shown on DTW screen and Deltas screen. If DTW says you are dx: -500 then you would want the dx on the deltas screen to say a positive number. Also if all 3 fields on the Deltas screen say CLOSING you are going in right general direction, but note the magnitudes of the deltas. NOTE: This is the most accurate since if it says you are 500 off in X direction, you are 500 off.
|
||||
1. Method2: Use the WH and WP shown on the DTW screen. Start flying VERY slowly (just need relative motion) till your Ships heading stops jumping around (Transmitter related, not ISAN or waypoint code). Then yaw till heading on Ships Heading display is close to WP Heading on DTW display. Then pitch till your ships pitch is close to WP Pitch. Then you can accelerate to full speed. Note: These numbers do sometimes radically shift for a second due to transponder issues, fps issues, lag, etc. Use the stable values. I have twiced tested turning off station markets and flying back to my Origin from 40k in belt in fog with no idea which way to go first. Both times it got me home just fine.
|
||||
##### IMPORTANT: When using the Waypoint buttons, tap them to increment up or down by 1, hold to speed through waypoints. Release button and wait for blinking to stop before pressing another. DTW display will show PARSING WAYPIONT while its changing over.
|
||||
1. To raise or lower current waypoint, tap the Increment or Decrement warning button to change by 1, or hold to change fast to another number. It wraps from 30 to 1 and 1 to 30.
|
||||
1. Once selected, hit the WPL (load button) to force the set current waypoint to the shown waypoint.
|
||||
1. To overwrite current viewed waypoint, press the Save button. This does not change the Set waypoint.
|
||||
### To name a waypoint, on the memory chip after its saved, add the name to the front of the string up to 10 characters, i.e. "home -1943 61723 14740" If no name is present it will just use `[Unnanmed]` as the name.
|
||||
1. To go to waypoint 1 press the Home button. (Saves time if you are on waypoint 15 for example). Waypoint 1 is always considered home.
|
||||
|
||||
IF SOMETHING ISN'T WORKING - Recommend putting chips on a socket or chip reader insert so you can watch them run live and see where they are getting stuck, this will let me give better tech support.
|
||||
10
Other/ISAN-Waypoint System/ShipHeading.yolol
Normal file
@@ -0,0 +1,10 @@
|
||||
st="Live" b1="\n" dx=:X-lx lx=:X ifdx==0thenst="Last Known" goto10end
|
||||
pi=3.142 d=180/pi s2=sqrt(0.5) c=1000 spd=:spd/c*c //by LizardFish
|
||||
i=:i j=:j k=:k xz=sqrt(i^2+k^2) l=sqrt(i^2+j^2+k^2) q=ABS(i/xz)
|
||||
b=j/l s=k/xz r=xz/l p=(b<s2)*(b>-s2)*d*(b+(b^3)/6)
|
||||
p+=(r<s2)*((j>=0)*(90-d*(r+(r^3)/6))+(j<0)*(d*(r+(r^3)/6)-90))
|
||||
h=(q<=s2)*((k>=0)*(d*(q+(q^3)/6))+(k<0)*(180-d*(q+(q^3)/6)))
|
||||
h+=(s<s2)*(s>-s2)*(90-d*(s+(s^3)/6)) //check out isan.to
|
||||
IF i<0 THEN h=360-h END h-=h%1 p-=p%1 goto9+(h!=360)*(p<91)*(p>-91)
|
||||
:Heading="Error\nRecalc" goto1
|
||||
:Heading=b1+h+" Deg"+b1+"Pitch:"+b1+p+" Deg"+b1+"Spd:"+spd+b1+st goto1
|
||||
BIN
Other/ISAN-Waypoint System/images/Coordinates.jpg
Normal file
|
After Width: | Height: | Size: 29 KiB |
BIN
Other/ISAN-Waypoint System/images/DTWScreen.jpg
Normal file
|
After Width: | Height: | Size: 20 KiB |
BIN
Other/ISAN-Waypoint System/images/DeltasScreen.jpg
Normal file
|
After Width: | Height: | Size: 16 KiB |
BIN
Other/ISAN-Waypoint System/images/DestScreen.jpg
Normal file
|
After Width: | Height: | Size: 14 KiB |
BIN
Other/ISAN-Waypoint System/images/FullSystem.jpg
Normal file
|
After Width: | Height: | Size: 172 KiB |
BIN
Other/ISAN-Waypoint System/images/Heading.jpg
Normal file
|
After Width: | Height: | Size: 11 KiB |
BIN
Other/ISAN-Waypoint System/images/ISANScreen.jpg
Normal file
|
After Width: | Height: | Size: 16 KiB |
BIN
Other/ISAN-Waypoint System/images/MemChip1.jpg
Normal file
|
After Width: | Height: | Size: 36 KiB |
BIN
Other/ISAN-Waypoint System/images/MemChip2.jpg
Normal file
|
After Width: | Height: | Size: 30 KiB |
BIN
Other/ISAN-Waypoint System/images/MemChip3.jpg
Normal file
|
After Width: | Height: | Size: 32 KiB |
BIN
Other/ISAN-Waypoint System/images/NavHud.jpg
Normal file
|
After Width: | Height: | Size: 67 KiB |
BIN
Other/ISAN-Waypoint System/images/PilotHud.jpg
Normal file
|
After Width: | Height: | Size: 52 KiB |
BIN
Other/ISAN-Waypoint System/images/WPInc-DecButtons.jpg
Normal file
|
After Width: | Height: | Size: 18 KiB |
BIN
Other/ISAN-Waypoint System/images/WPScreen.jpg
Normal file
|
After Width: | Height: | Size: 9.8 KiB |
20
Other/LDTSForward.yolol
Normal file
@@ -0,0 +1,20 @@
|
||||
m=-30.2 h=.5 a=150 b=.356 c=-5.547 d=1-b
|
||||
:RZ=(:SD*(COS(:SH)^2-SIN(:SV)^2)^h+:SL-b)*m :SL=:SPD/a*c-d goto2
|
||||
goto1 //Error catch
|
||||
|
||||
//Alternate form
|
||||
:RZ=((:SD^2-(:SD*SIN :SH)^2-(:SD*SIN :SV)^2)^h+:SL-b)*m
|
||||
:RZ=(:SD*((COS(2*:SH)+COS(2*:SV))/2)^h+:SL-b)*m
|
||||
:RZ=(:SD*(COS(:SH)^2-SIN(:SV)^2)^h+:SL-b)*m
|
||||
|
||||
//Assign :SL after :RZ calc
|
||||
:SL=:SPD/a*c-d
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
//Requires 30FPS Limit
|
||||
|
||||
//By Thaccus, DarkyShadow, and Azurethi
|
||||
20
Other/LDTSLateral.yolol
Normal file
@@ -0,0 +1,20 @@
|
||||
:SA=1 m=-30.2 :TSPDR=1 goto1+(:TransponderOwner!=0)
|
||||
:SI=:TransponderOwner :TSPDR=0
|
||||
:RX=-m*:SD*SIN :SH :RY=m*:SD*SIN :SV goto3*:SA
|
||||
goto4 //Error catch
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
//Set SI to a custom secret value on line 2. Then feel free to remove
|
||||
//the :TSPDR and :TransponderOwner related code to prevent
|
||||
//transponder flashing first spawn and sensor reset.
|
||||
|
||||
|
||||
|
||||
//By Thaccus and DarkyShadow
|
||||
4
Other/LaserAlignRangeFinder-2.yolol
Normal file
@@ -0,0 +1,4 @@
|
||||
:ML=22*:Mine-:R :RT=90/:R :LT=-:RT goto1
|
||||
// See https://www.youtube.com/watch?v=6hsRsziy02I for full instr.
|
||||
// Credit to Ravaen
|
||||
// Alignes 2 lasers to the contact point of the rangefinder
|
||||
BIN
Other/LaserDesignatorTranslationSensor/FramelessLDTS Demo.fbe
Normal file
@@ -0,0 +1,20 @@
|
||||
:a=cos :H :b=cos :V :c=sin :H :d=sin :V :s=:P :f=h*:R :g=:L goto++:w%m
|
||||
m=5 h=100 f=.5 l=35.6 t=6 z=.001 d=16.68 goto++:w%m
|
||||
:i=:f*:b*:c :j=:f*:a*:d :k=l-h*:g-:f*:a*:b :L=h/(:S+d)-t goto++:w%m
|
||||
n=:s/((:i^2+:j^2+:k^2)^f+z) :x=-:i*n :y=:j*n :z=:k*n goto++:w%m
|
||||
// LEQ Directional-Speedo by NTPS + Thaccus
|
||||
// Inputs:
|
||||
// :P - Speedometer output
|
||||
// :R - Sensor Distance
|
||||
// :V - Sensor Vertical
|
||||
// :H - Sensor Horizontal
|
||||
// :L - Length of Beam
|
||||
|
||||
// Outputs:
|
||||
// :x - Velocity in x direction.
|
||||
// :y - Velocity in y direction.
|
||||
// :z - Velocity in z direction.
|
||||
// :L - Length of Beam
|
||||
|
||||
// Internal Memory:
|
||||
// :a :b :c :d :s :f :g :w :i :j :K
|
||||
BIN
Other/LaserDesignatorTranslationSensor/LDTS.fbe
Normal file
20
Other/LaserDesignatorTranslationSensor/LDTSForward.yolol
Normal file
@@ -0,0 +1,20 @@
|
||||
m=-30.2 h=.5 a=150 b=.356 c=-5.547 d=1-b
|
||||
:RZ=(:SD*(COS(:SH)^2-SIN(:SV)^2)^h+:SL-b)*m :SL=:SPD/a*c-d goto2
|
||||
goto1 //Error catch
|
||||
|
||||
//Alternate form
|
||||
:RZ=((:SD^2-(:SD*SIN :SH)^2-(:SD*SIN :SV)^2)^h+:SL-b)*m
|
||||
:RZ=(:SD*((COS(2*:SH)+COS(2*:SV))/2)^h+:SL-b)*m
|
||||
:RZ=(:SD*(COS(:SH)^2-SIN(:SV)^2)^h+:SL-b)*m
|
||||
|
||||
//Assign :SL after :RZ calc
|
||||
:SL=:SPD/a*c-d
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
//By Thaccus, DarkyShadow, and Azurethi
|
||||
20
Other/LaserDesignatorTranslationSensor/LDTSLateral.yolol
Normal file
@@ -0,0 +1,20 @@
|
||||
:SA=1 m=-30.2 :SI="SecretCodeHere"
|
||||
:RX=-m*:SD*SIN :SH :RY=m*:SD*SIN :SV goto2*:SA
|
||||
goto1
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
//By Thaccus and DarkyShadow
|
||||
10
Other/LaserDesignatorTranslationSensor/readme.md
Normal file
@@ -0,0 +1,10 @@
|
||||
## Laser Designator Translation Sensor
|
||||
|
||||
Outputs relative translation of the ship on three axes to RX, RY, RZ. You can use this to do strafe arresting, emergncy stop, or gravity mitigation.
|
||||
It is also notably smaller/lighter than the required size CLF to do all speeds in all directions.
|
||||
|
||||
Currently requires a 30FPS frame limit and VSYNC off. One can make a 60/90/120 fps version by changing the M constant to one's current framerate(plus a little extra, not sure why that part is) but be aware that it reduces the granularity of your speed. If you have it set for 100fps, your minimum speed precision becomes 0.1m/s rather than the 30fps' 0.030m/s
|
||||
|
||||
Requires calibration every time you move it in the designer. Move it around by 10000ths(you can enter values tha are below the decimal precision of the translation tool readout and have them work, but you still can't read that precision so remember what you entered) until SH and SV are within 0.01 or less when the designator is on and ship is not moving. The closer to 0 that SH and SV are the better, but practically speaking the error below 0.01 is not likely to matter.
|
||||
|
||||
Still very much WIP. There is a 0-1m/s error on the forward speed when travelling laterally that I have yet to pin down. My current assumption is that it is somehow related to the inherent distance between the laser designator and sensor. Despite me placing them so close that they touch and error out movement in many cases, they still sit somewhere around 0.352m apart. I think that this is fairly good evidence that either one or both objects measure from the base of the sensor(the snap point) and not the tip where the art would suggest. I am also interested in building a framerate independent version that multiplies the deflection data by the speed readout to achieve the final result. More to come soonTM.
|
||||
22
Other/MatScanWithMass.yolol
Normal file
@@ -0,0 +1,22 @@
|
||||
a="Valkite" wa=8.08 b="Bastium" wb=wa c="Ajatite" wc=6.31 d="Ice"
|
||||
wd=6.78 e="Vokarium" we=wd f="Nhurgite" wf=wc g="Surtrite" wg=wf
|
||||
h="Charodium" wh=11.25 i="Exorium" wi=14.25 j="Aegisium" wj=7.67
|
||||
k="Arkanium" wk=4.31 l="Karnite" wl=8.08 m="Kutonium" wm=7.36
|
||||
n="Lukium" wn=15.25 o="Corazium" wo=9.95 p="Ymrium" wp=8.78
|
||||
q="Xhalium" wq=wc scn=""
|
||||
r="\n" s=" Ore" t=" Crystal" u=100 v=" Stks" scn=""
|
||||
if:Scanner==0then:Scn="Off"+r+scn goto8end :Scan=1 :Scn="Scan.."+r+scn
|
||||
:ind=0 if:V==0then:Scn="Scan."+r+scn goto8end
|
||||
z=:M-s-t V1=:V/1728 V1=(V1+0.05)/u*u L1=z+r+V1+v goto14
|
||||
:ind=1 z=:M-s-t V2=:V/1728 V2=(V2+0.05)/u*u L2=r+z+r+V2+v goto14
|
||||
P=V2/V1*100 Scn=L1+L2+r+P+"%"+s+r+mt/1000/u*u+" mt" :Scn="Final"+r+scn
|
||||
mt=0 :ind=0 :V=0 goto8
|
||||
:Scn="Calc"+r+scn
|
||||
wt=(z==a)*wa+(z==b)*wb+(z==c)*wc+(z==d)*wd+(z==e)*we+(z==f)*wf
|
||||
wt+=(z==g)*wg+(z==h)*wh+(z==i)*wi+(z==j)*wj+(z==k)*wk+(z==l)*wl
|
||||
wt+=(z==m)*wm+(z==n)*wn+(z==o)*wo+(z==p)*wp+(z==q)*wq
|
||||
mt+=wt*:V goto11+:ind
|
||||
// Scanner is first field name on Button and :Scanner
|
||||
// Scn is first field name of Text Display
|
||||
// On Scanner, rename Volume field to V, Material field to M, and
|
||||
// Index field to ind
|
||||
18
Other/Material-Scanner/README.md
Normal file
@@ -0,0 +1,18 @@
|
||||
# Material Scanner Script
|
||||
This script automates the usage of the Material-Point-Scanner.
|
||||
|
||||
# Setup
|
||||
1. Have a Material-Scanner attached to your ship and properly wired up. You do NOT need to change the default field-names.
|
||||
2. Have a Button of type 1, with it's ButtonState-Field renamed to "Active". (Yes this isn't a really descriptive name, but this way everything can keep the default names.)
|
||||
3. Have a text-panel with it's field renamed to "Materials"
|
||||
|
||||
# Usage
|
||||
1. Press the "Active"-Button. The Scanner is now on and will continously try to scan (until you re-press the button).
|
||||
2. Aim the scanner at an asteroid
|
||||
3. The scanner will now scan the asteroid, print it's content on the text-panel and then shut-off.
|
||||
|
||||
# License
|
||||
MIT
|
||||
|
||||
# Credits
|
||||
github.com/dbaumgarten / dbaumgarten#9279
|
||||
37
Other/Material-Scanner/matscan_basic.nolol
Normal file
@@ -0,0 +1,37 @@
|
||||
include "std/logic"
|
||||
|
||||
// These are the default field-names for the Material-Scanner
|
||||
define MATSCANNER_ACTIVE=:Active
|
||||
define MATSCANNER_SCAN=:Scan
|
||||
define MATSCANNER_INDEX=:Index
|
||||
define MATSCANNER_RESULTS=:ScanResults
|
||||
define MATSCANNER_MATERIAL=:Material
|
||||
define MATSCANNER_VOLUME=:Volume
|
||||
define MATSCANNER_RESET=:Reset
|
||||
define MATSCANNER_OUT=:Materials
|
||||
|
||||
waitmsg="Scanning..."
|
||||
suffix1="ium"
|
||||
suffix2="ite"
|
||||
suffix3=" Ore"
|
||||
suffix4=" Crystal"
|
||||
|
||||
while 1 do
|
||||
logic_wait(not MATSCANNER_ACTIVE)
|
||||
|
||||
while not MATSCANNER_RESULTS do
|
||||
MATSCANNER_OUT=waitmsg
|
||||
MATSCANNER_SCAN=1
|
||||
end
|
||||
MATSCANNER_OUT=""
|
||||
|
||||
while MATSCANNER_INDEX<MATSCANNER_RESULTS do
|
||||
MATSCANNER_ACTIVE=0
|
||||
// remove suffix to save space on textpanel
|
||||
mat=MATSCANNER_MATERIAL-suffix1-suffix2-suffix3-suffix4
|
||||
MATSCANNER_OUT+=mat+":"+MATSCANNER_VOLUME+"\n"
|
||||
MATSCANNER_INDEX++
|
||||
end
|
||||
MATSCANNER_RESET=1
|
||||
end
|
||||
|
||||
6
Other/Material-Scanner/matscan_basic.yolol
Normal file
@@ -0,0 +1,6 @@
|
||||
b="Scanning..." c="ium" d="ite" e=" Ore" f=" Crystal"
|
||||
ifnot :Active thengoto2end
|
||||
ifnot :ScanResults then:Materials=b :Scan=1 goto3end :Materials=""
|
||||
if:Index>=:ScanResults thengoto6end :Active=0 g=:Material-c-d-e-f
|
||||
:Materials+=g+":"+:Volume+"\n" :Index++ goto4
|
||||
:Reset=1 goto2
|
||||
13
Other/MaterialScanner.yolol
Normal file
@@ -0,0 +1,13 @@
|
||||
b="\n" o=" Ore" c=" Crystal" k=100 s=" Stks" :reset=1
|
||||
if:Scanner then:Scn=b+"Scanning..." :Scan=1 goto3end goto1
|
||||
if:Scanner thenif:Scan thengoto4endelse:Scn="Offline" goto1end
|
||||
:i=0 if:V==0then:Scn=b+"Scanning.." goto2end :Scn="Analyzing"
|
||||
V1=:V/1728 V=(V1+0.05)/k*k L1=:M-o-c+b+V+s
|
||||
:i=1 V2=:V/1728 V=(V2+0.05)/k*k L2=b+:M-o-c+b+V+s
|
||||
P=V2/V1*100 :Scn="Result"+b+L1+L2+b+b+P+"%"+o
|
||||
:Scanner=0 goto1
|
||||
|
||||
// Scanner is first field name on Button and :Scanner
|
||||
// Scn is first field name of Text Display
|
||||
// On Scanner, rename Volume field to V, Material field to M, and
|
||||
// Index field to i
|
||||
13
Other/MiningLaserGeneral.yolol
Normal file
@@ -0,0 +1,13 @@
|
||||
if :tcpl!=-10+:tcpr!=10 then:lR=0 :lL=0 :tcl=-10 :tcr=10 goto1 end
|
||||
if :laser == 0 then goto 2 end :Cruise=100 :collect=1 :lR=0 :lL=1
|
||||
:lR=1-:lR :lL=1-:lR if :laser==0 then goto 1 end goto 3
|
||||
|
||||
//TCPL is second field of left laser PITCH
|
||||
//TCPR is second field of right laser PITCH
|
||||
//LR is right laser first field
|
||||
//LL is left laser first field
|
||||
//TCL is first field of left laser pitch
|
||||
//TCR is first field of right laser pitch
|
||||
//Laser is first field of laser button
|
||||
//cruise is already defined.
|
||||
//collect is already defined.
|
||||
13
Other/NumberPad/README.md
Normal file
@@ -0,0 +1,13 @@
|
||||
# NumberPad
|
||||
|
||||
This is the script for a numberpad that allows input of number for use in other systems.
|
||||

|
||||
NOTE: This is a generic example that supports assigning entered number to a user defined variable.
|
||||
|
||||
The comments in the code can be left out of course, but here they are for how to use the system.
|
||||
1. :1 to :0 are number buttons first field name. The On value is the number (i.e. :5 on value is 5), the off value is 0.
|
||||
1. :ent :clr are enter and clear buttons first field name. On value is 1, off value is 0.
|
||||
1. :neg is the negative button first field name. On value is -1, off value is 1
|
||||
1. :dec is the decimal button first field name. On value is 1000, off value is 1
|
||||
1. :Entry is the number panel display. :dbg is the variable the final number will be assigned to, rename this as needed.
|
||||
1. To use: press negative or decimals if needed. Enter the numbers one at a time, making sure they appear on the Entry panel. When complete hit Enter button to assign it to your :dbg variable. You can press Clear button to start over.
|
||||
BIN
Other/NumberPad/images/ExampleNumPad.jpg
Normal file
|
After Width: | Height: | Size: 125 KiB |
20
Other/NumberPad/numberpad.yolol
Normal file
@@ -0,0 +1,20 @@
|
||||
e=:ent ife then:dbg=:entry :ent=0end goto2+2*((e+:clr)>0)
|
||||
goto1+2*((:1+:2+:3+:4+:5+:6+:7+:8+:9+:0)>0)
|
||||
num*=10 num+=:1+:2+:3+:4+:5+:6+:7+:8+:9
|
||||
:1=0 :2=0 :3=0 :4=0 :5=0 :6=0 :7=0 :8=0 :9=0 :0=0
|
||||
:entry=(1-:clr)*num*:neg/:dec goto1+5*((:clr+:ent)>0)
|
||||
num=0 :neg=1 :clr=0 :dec=1 goto1
|
||||
|
||||
// :1 to :0 are number buttons first field name. The On value is the
|
||||
// number (i.e. :5 on value is 5), the off value is 0.
|
||||
// :ent :clr are enter and clear buttons first field name. On value
|
||||
// is 1, off value is 0.
|
||||
// :neg is the negative button first field name. On value is -1, off
|
||||
// value is 1
|
||||
// :dec is the decimal button first field name. On value is 1000, off
|
||||
// value is 1
|
||||
// :Entry is the number panel display. :dbg is the variable the final
|
||||
// number will be assigned to, rename this as needed.
|
||||
// To use: press negative or decimals if needed. Enter the numbers one
|
||||
// at a time, making sure they appear on the Entry panel. When
|
||||
// complete hit Enter button to assign it to your :dbg variable.
|
||||
26
Other/Resource Count/README.md
Normal file
@@ -0,0 +1,26 @@
|
||||
# Resorce Count
|
||||
|
||||
This script displays percentage remaining of all ship resources.
|
||||
|
||||
## Inputs
|
||||
|
||||
The inputs are default variable names:
|
||||
|
||||
- `:GasNetworkMaxResource`
|
||||
- `:FuelChamberMaxFuel`
|
||||
- `:MaxCoolant`
|
||||
- `:MaxRadiatorCoolant`
|
||||
- `:GasNetworkStoredResource`
|
||||
- `:FuelChamberFuel`
|
||||
- `:StoredCoolant`
|
||||
- `:StoredRadiatorCoolant`
|
||||
|
||||
## Outputs
|
||||
|
||||
The output is a string in the `:Resources` text panel.
|
||||
|
||||
- `:Resources`
|
||||
|
||||
## Credits
|
||||
|
||||
- Waselon#5191
|
||||
7
Other/Resource Count/resource-count.yolol
Normal file
@@ -0,0 +1,7 @@
|
||||
f="\n" a="Gas : " b="Fuel: " c="Cool: " d="Rad : " n=100 e="%"
|
||||
maxg=:GasNetworkMaxResource maxf=:FuelChamberMaxFuel
|
||||
maxc=:MaxCoolant maxr=:MaxRadiatorCoolant
|
||||
gas=:GasNetworkStoredResource fuel=:FuelChamberFuel
|
||||
cool=:StoredCoolant radc=:StoredRadiatorCoolant
|
||||
gp=gas/maxg*n fp=fuel/maxf*n cp=cool/maxc*n rp=radc/maxr*n
|
||||
:Resources=f+a+gp/n*n+e+f+b+fp/n*n+e+f+c+cp/n*n+e+f+d+rp/n*n+e goto4
|
||||
20
Other/Scanning.yolol
Normal file
@@ -0,0 +1,20 @@
|
||||
:IDX=0 :RESET=1 b="\n" o=" Ore" c=" Crystal" k=100 s=" kV" v1=0 v2=0
|
||||
s1="Scan." s2="Scan.." a="Analyzing" r="Result"+b :SCN=r+scn
|
||||
goto3+:Scanner
|
||||
:SCAN=1 :SCN=s1+b+scn goto5*:SCANNER
|
||||
if:RSLT<2 then:SCN=s2+b+scn goto4end :SCN=a :IDX=0 i=0
|
||||
i++ goto6+(i>3) //wait loop for full volumes
|
||||
v1=:VOL v=(v1+0.05)/k*k m=:Mat l1=m-o-c+b+v+s
|
||||
:IDX=1 goto8+(:Mat!=m)+(3*(:SCANNER<1)) //IndexWait
|
||||
v2=:VOL v=(v2+0.05)/k*k l2=b+:Mat-o-c+b+v+s
|
||||
t=v1+v2 scn=l1+l2+b+b+t+s :Scanner=0 v1=0 v2=0 :IDX=0 goto1
|
||||
t=v1+v2 scn=l1+l2+b+b+t+s :Scanner=0 goto1
|
||||
scn="Cancelled"+b+l1 goto1
|
||||
//Scanner Field Names
|
||||
//Field 1(andButton): Scanner
|
||||
//Field 2: Idx
|
||||
//Field 3: Rslt
|
||||
//Field 4: Mat
|
||||
//Field 5: Vol
|
||||
//Field 6: Scan
|
||||
//Field 7: Reset stacks s=" stks" V1=:Vol/1728 V2=:Vol/1728
|
||||
19
Other/Square Root (Basic Chip)/README.md
Normal file
@@ -0,0 +1,19 @@
|
||||
# Square Root
|
||||
|
||||
This script calculates the square root of a number on a **basic** level Yolol chip.
|
||||
|
||||
## Inputs
|
||||
|
||||
The input is a single number in the `:a` field.
|
||||
|
||||
- `:a` number
|
||||
|
||||
## Outputs
|
||||
|
||||
The output is a single number in the `:o` field.
|
||||
|
||||
- `:o` Sqrt(:a)
|
||||
|
||||
## Credits
|
||||
|
||||
- Zijkhal#0154
|
||||
1
Other/Square Root (Basic Chip)/sqrt.yolol
Normal file
@@ -0,0 +1 @@
|
||||
x=:a/55+3 x+=:a/x x+=:a/x*4 x=:a/x+x/16 :o=x+:a/x/4
|
||||
4
Other/Throttle.yolol
Normal file
@@ -0,0 +1,4 @@
|
||||
:FcuBackward = -:FcuForward goto1
|
||||
|
||||
// Used to control forward and backward on one centering lever
|
||||
// Leaver should be FCUForward with min -100 max 100
|
||||
11
Other/Transponder.yolol
Normal file
@@ -0,0 +1,11 @@
|
||||
i=:insideSafeZone
|
||||
:BeaconWarn=:Beacon*(not i)
|
||||
ifi then:TBC=2 a=0else:TBC=0 b=0 a=1end
|
||||
if(not b)*a then:Beacon=0 b=1end
|
||||
if(not a)*b thena=0end goto1
|
||||
|
||||
// BeaconWarn, warning button first field name
|
||||
// TBC, warning button, Button Color field name
|
||||
// Beacon, transponder button and transponder first field name
|
||||
// Turns transponder off when crossing zoneline unless you turn it
|
||||
// back on intentionally.
|
||||
11
Other/TransponderWithPing.yolol
Normal file
@@ -0,0 +1,11 @@
|
||||
i=:insideSafeZone x=25 :BeaconWarn=:Beacon*(not i) :TBC=2*i a=1-i
|
||||
if(not b)*a then:Beacon=0 b=1end goto:Beacon*a*b*3
|
||||
x-- if x>0 then goto3 end b=0 goto1
|
||||
// BeaconWarn, warning button button enable blink field name
|
||||
// TBC: warning button Button Color field name
|
||||
// Beacon: warning button and transponder first field names
|
||||
// x: time transponder stays on in unsafe
|
||||
// This code turns off transponder if you cross into unsafe.
|
||||
// If you turn it back on, it stays on for x/5 seconds then turns off.
|
||||
// It also changes the color of the warning button to red if unsafe.
|
||||
// and makes it blink if unsafe and on.
|
||||
20
Other/WPDTW.yolol
Normal file
@@ -0,0 +1,20 @@
|
||||
ld="\n[Loading]" dg=" Deg" s="98743" d1=57.288 s2=0.707 j=1 k=100000
|
||||
ul="WP"+:wpcn+ld :dest=ul :dtw=ul a=:wpc-"\nX:"-"\nY:"-"\nZ:" i=0 o=0
|
||||
c=a c-=a-- d=5*(c>4)+2*(s>(s-c)) d+=c>d d+=c>d o+=d*j j*=10 goto3+c<0
|
||||
v=1 ifc=="-"thenv=-1 ifa!=""thena--endend i++ :dest+="." j=1
|
||||
:wZ=:wY :wY=:wX :wX=o*v o=0 n=""+a goto3+3*(i>2)
|
||||
ifn==""thenn="[Unnamed]"end nm="WP"+:wpn fnm=nm+"\n"+n+"\n" ds="? km"
|
||||
:dest=fnm+"X:"+:wx+"\nY:"+:wy+"\nZ:"+:wz+"\nD:"+ds
|
||||
dx=:X-:wX dy=:Y-:wY dz=:Z-:wZ :WP-=ld goto9+10*:wpu
|
||||
dx-=dx%1 dy-=dy%1 dz-=dz%1 x=dx^2 y=dy^2 z=dz^2 d=sqrt(x+y+z) ds=d
|
||||
ifds>k/10thends/=k ds*=100 ds+=" km"elseds-=ds%1 ds+=" m"end
|
||||
xz=sqrt(dx^2+dz^2) q=abs(dx/xz) r=xz/d // written by LizardFish
|
||||
b1=-dy/d s1=-dz/xz p=(b1<s2)*(b1>-s2)*d1*(b1+b1^3/6)
|
||||
p+=(r<s2)*((dy<=0)*(90-d1*(r+r^3/6))+(dy>0)*(d1*(r+r^3/6)-90))
|
||||
h=(q<=s2)*((dz<=0)*(d1*(q+q^3/6))+(dz>0)*(180-d1*(q+q^3/6)))
|
||||
h+=(s1<s2)*(s1>-s2)*(90-d1*(s1+s1^3/6)) goto16+3*:wpu
|
||||
ifdx>0thenh=360-h end h-=h%1 p-=p%1 goto17+(h!=360)*(p<91)*(p>-91)
|
||||
h="ERR" p="ERR"
|
||||
dtw=nm+"\ndX:"+dx+"\ndY:"+dy+"\ndZ:"+dz+"\nLX:"+:LX+"\nLY:"+:LY
|
||||
if:WPUthen:EDIT=n :XXX=:WX :YYY=:WY :ZZZ=:WZ end
|
||||
dtw+="\n"+ds :dtw=dtw if:wputhen:wpl=0 :wpu=0 goto2endgoto7
|
||||
20
Other/WpImportExport.yolol
Normal file
@@ -0,0 +1,20 @@
|
||||
k=1000 e=19 i=:WIM j=:WEX n=:WPN goto1+(i+j)>0
|
||||
t=:EDIT+" \nX:"+:XXX/k*k+" \nY:"+:YYY/k*k+" \nZ:"+:ZZZ/k*k
|
||||
if:WEC!=0then t=:WEC end o=n/2-(n/2000*k) goto3.5+n/2
|
||||
ifo thenifj then:w1=t endelseifj then:w2=t endendgotoe
|
||||
ifo thenifj then:w3=t endelseifj then:w4=t endendgotoe
|
||||
ifo thenifj then:w5=t endelseifj then:w6=t endendgotoe
|
||||
ifo thenifj then:w7=t endelseifj then:w8=t endendgotoe
|
||||
ifo thenifj then:w9=t endelseifj then:w10=t endendgotoe
|
||||
ifo thenifj then:w11=t endelseifj then:w12=t endendgotoe
|
||||
ifo thenifj then:w13=t endelseifj then:w14=t endendgotoe
|
||||
ifo thenifj then:w15=t endelseifj then:w16=t endendgotoe
|
||||
ifo thenifj then:w17=t endelseifj then:w18=t endendgotoe
|
||||
ifo thenifj then:w19=t endelseifj then:w20=t endendgotoe
|
||||
ifo thenifj then:w21=t endelseifj then:w22=t endendgotoe
|
||||
ifo thenifj then:w23=t endelseifj then:w24=t endendgotoe
|
||||
ifo thenifj then:w25=t endelseifj then:w26=t endendgotoe
|
||||
ifo thenifj then:w27=t endelseifj then:w28=t endendgotoe
|
||||
ifo thenifj then:w29=t endelseifj then:w30=t endendgotoe
|
||||
a=:WPC-:wz-:wy-:wx-" \nZ:"-" \nY:"-" \nX:" ifjthen:WP=n+"\n"+t end
|
||||
:WEC=0 :WEX=0 :WIM=0 ifi then:EDIT=a :XXX=:WX :YYY=:WY :ZZZ=:WZ end
|
||||
20
Other/WpIncrement.yolol
Normal file
@@ -0,0 +1,20 @@
|
||||
a=20 i=:wpi d=:wpd s=:wps h=:wph l=:wpl n=:wpn goto1+(i+d+s+h+l)>0
|
||||
n+=i-d n=n*(n>0andn<=a)+a*(n<1)+1*(n>a) n=h+(1-h)*n :wpn=n k=1000 e=20
|
||||
i=:wpi d=:wpd o=n/2-(n/2000*k) j="\n[Loading]" goto4-2*((i+d)>0)
|
||||
t=:EDIT+" \nX:"+:x/k*k+" \nY:"+:y/k*k+" \nZ:"+:z/k*k goto 4.5+n/2
|
||||
ifothenifsthen:w1=tend w=:w1elseifsthen:w2=tend w=:w2endgotoe
|
||||
ifothenifsthen:w3=tend w=:w3elseifsthen:w4=tend w=:w4endgotoe
|
||||
ifothenifsthen:w5=tend w=:w5elseifsthen:w6=tend w=:w6endgotoe
|
||||
ifothenifsthen:w7=tend w=:w7elseifsthen:w8=tend w=:w8endgotoe
|
||||
ifothenifsthen:w9=tend w=:w9elseifsthen:w10=tend w=:w10endgotoe
|
||||
ifothenifsthen:w11=tend w=:w11elseifsthen:w12=tend w=:w12endgotoe
|
||||
ifothenifsthen:w13=tend w=:w13elseifsthen:w14=tend w=:w14endgotoe
|
||||
ifothenifsthen:w15=tend w=:w15elseifsthen:w16=tend w=:w16endgotoe
|
||||
ifothenifsthen:w17=tend w=:w17elseifsthen:w18=tend w=:w18endgotoe
|
||||
ifothenifsthen:w19=tend w=:w19elseifsthen:w20=tend w=:w20endgotoe
|
||||
ifothenifsthen:w21=tend w=:w21elseifsthen:w22=tend w=:w22endgotoe
|
||||
ifothenifsthen:w23=tend w=:w23elseifsthen:w24=tend w=:w24endgotoe
|
||||
ifothenifsthen:w25=tend w=:w25elseifsthen:w26=tend w=:w26endgotoe
|
||||
ifothenifsthen:w27=tend w=:w27elseifsthen:w28=tend w=:w28endgotoe
|
||||
ifothenifsthen:w29=tend w=:w29elseifsthen:w30=tend w=:w30endgotoe
|
||||
iflthen:wpcn=n :wpc=w :wpu=1 :WIC=w :dtw=j w+=j end :wp=n+"\n"+w goto1
|
||||
9
Other/laseralignrangefinder-1.yolol
Normal file
@@ -0,0 +1,9 @@
|
||||
d=2.16 o=-1.6 p=3.141 x=360/(2*p)
|
||||
l=:d+o c=d/l :MinerPitch=((p/2)-(c+(c^3)/6+(c^5)/40))*x goto1
|
||||
|
||||
// Laser divergence
|
||||
// d=distance laser off axis
|
||||
// o=forward offset of rangefinder
|
||||
//lasers resting point at 0deg face each other directly
|
||||
//and pointing straight forward is 90 deg
|
||||
//Think due to Whitestrake
|
||||