Stormworks: Build and Rescue

Stormworks: Build and Rescue

Not enough ratings
Autopilot Coordinates System ACS
   
Award
Favorite
Favorited
Unfavorite
Vehicles: Air, Sea
Tags: v0.5.2
File Size
Posted
Updated
18.477 KB
5 Dec, 2018 @ 12:55pm
5 Dec, 2018 @ 9:47pm
2 Change Notes ( view )

Subscribe to download
Autopilot Coordinates System ACS

Description
Easy to use autopilot coordinates system. Connect it up as the nodes says.

Requires: A keyboard, a compass, a gps and a toggle button.

Specs:
-Size: 4*2
-Inputs: 6 (5 number, 1 on/off)
..-Target X Coordinate
..-Target Y Coordinate
..-Current X Coordinate
..-Current Y Coordinate
..-Heading(Compass)
..-On/Off toggle
-Outputs: 2 (2 number)
..-Autopilot Output
..-Length to target

Update:
-Added distance to target output.
-Fixed for the 0.5.2 verision.

Math Based on Tajin's Original Full Autopilot Example.

Please comment bugs or features.
8 Comments
Maxwell Snow 20 Jan, 2021 @ 1:07pm 
Thank you! that super helpful. I'll have to go look up the modulo function!
iogic  [author] 20 Jan, 2021 @ 4:45am 
I didn't write that last function on my own, but I know everything it does. Let's say you're creation is pointing towards 10 degrees, and you want to go heading 350 degrees. Instead of turning all the way around, to get to 350, it will just turn 20 degrees the other way. Hard to explain how it achieves this, but it uses the modulo (%) function a lot, which is super helpful in these cases and that you should learn if you haven't already.
Maxwell Snow 19 Jan, 2021 @ 7:32pm 
I'm trying to build my own, and I'm trying to figure out exactly what that last function does.
I realize the first function is calculating rise over run and using atan2 to avoid having to calculate the quadrants (though I could be wrong).
I'm just beginning to learn these things.
Rozoh 17 Feb, 2020 @ 6:52pm 
could you do a fx node that takes the pre-proccesed perfect heading readings?
"'fx' ( x +1) * 360 % 360"
iogic  [author] 12 Mar, 2019 @ 2:40pm 
DestructiveDiamonds, Well, it could, but planes are much more advanced, you can try.
el dorado 12 Mar, 2019 @ 8:56am 
Can it work on planes?
iogic  [author] 15 Dec, 2018 @ 6:41am 
aguirre27, Yes it works very well for my helicopter. It might be very sensitve so maybe divide the Autopilot output by 2,3 or 4.
aguirre27 14 Dec, 2018 @ 1:54pm 
it works with helicopters?