Stormworks: Build and Rescue

Stormworks: Build and Rescue

Not enough ratings
Navigator
   
Award
Favorite
Favorited
Unfavorite
Vehicles: Air, Sea, Land
Tags: v0.10.14
File Size
Posted
Updated
43.089 KB
21 Apr, 2020 @ 7:42pm
23 Apr, 2020 @ 6:08pm
6 Change Notes ( view )

Subscribe to download
Navigator

Description
GPS-based navigation, with PID rudder control.

Composite boolean channel 1 input activates navigation mode. When active, a course is calculated to your target coordinates and a deviation (in degrees) is output. Distance is also output. Negative means turn left, positive turn right.

Composite boolean channel 2 input activates automatic steering mode. When active with navigation mode on, you are steered to the designated target location. When active without navigation mode on, your you are steered to maintain the heading you had when you switched steering mode on. This heading setting is maintained so long as you don't switch off steering mode (navigation mode will override it, but not replace it - so upon turning navigation off you'll steer back to the original heading). The steering output is ranged -1 to 1, so if you have some other mechanic for turning your vehicle, it should be easy enough to scale or invert as necessary.

Out-of-the-box the PID is performing only proportional control and is not intelligent. You can set the parameters either in the properties, or via composite number channels 30 (for Kp), 31 (for Ki), and 32 (for Kd). A toggle property determines whether to take the parameters from properties or composite. This is not automatic. A Kp parameter of 1/90 seems to work well enough, albeit not exactly agile. The Ki and Kd parameters will need tuning for your vehicle. You might not even need to set them.