Space Engineers

Space Engineers

Not enough ratings
Flight Navigator + ADF v1.0 by DurFea
   
Award
Favorite
Favorited
Unfavorite
File Size
Posted
731.000 B
14 Jan, 2015 @ 12:10pm
1 Change Note ( view )

Subscribe to download
Flight Navigator + ADF v1.0 by DurFea

Description
For those not familiar with real world pilot jargon and lingo, an ADF is an Automatic Direction Finder.
It is an older navigational system (one of the first actually) that uses ground-based beacons and radio transmitters that pilots can tune an ADF receiver to and it will indicate how far left or right the pilot needs to turn his aircraft to "home in" on the signal source.

This script performs the same function except that in addition to left and right, it will also indicate if the ship needs to pitch up or down in order to set a heading for a predetermined destination.

The destination is provided as a set of XYZ coordinates. The default destination in the script is 0,0,0 -- or the center of the game world. Coordinates are provided by the script itself and it will determine its current location whether the programming block is mounted to a ship or a stationary object. This core functionality is based on the source code provided by CMDR Bad_Idea with his "Easy to Use XYZ Coordinate System" script.

The ADF function uses four navigational gyros to determine the ship's orientation with respect to the destination coordinates. A port-starboard pair of gyros is used to determine if the ship should turn to the left or right. And a top-bottom pair of gyros is used to determine pitch up or down.

The primary cockpit or piloting console is renamed and can be set to display the navigational information on the HUD overview with a broadcasting antenna.

A timer block is used to repeat the script as often as needed for real-time position and distance information.

The turn indicators are added to the end of the position and distance information as a "Helm" indication:
<<< indicates turn left
>>> indicates turn right

Once the left/right heading is on target, a pitch indication is provided:
vvv indicates pitch nose-down
^^^ indicates pitch nose-up

When a correct heading and pitch are indicated, you will see a crosshair indicator showing that your heading is on target. (X)

The navigational gyros should be named as follows:
NAV - GyroTop
NAV - GyroBtm
NAV - GyroPort
NAV - GyroStbd

The port/starboard pair must be aligned on the same horizontal plane (side-by-side) at an equal distance from the front of the ship and be as far apart as possible for more accuracy.

The top/bottom pair must also be mounted in the same vertical plane (over-and-under each other) and be an equal distance from the front of the ship and as far apart as possible for better accuracy.

If you are looking at the front of the ship, imagine the nav gyros mounted in a diamond formation with one at the top, one at the bottom, one at the far right and one at the far left.


Future OBVIOUS enhancements:
#1 -- The code can be optimized with functions to handle the multiple gyro points and distance calculations. That's a given so don't bother telling me the code is dirty and ugly and way too long. Duh.

#2 -- There's no comments in the code. Yea...see #1 above.

OK, more to the point:
#3 -- I'm playing with using indicator lights or sounds to give visual and audible indications of course corrections in stead of dinky little text arrows. Yea! Bells and whistles!

#4 -- The purpose of using the four gyros is because I plan to use control overrides to allow the script to make automatic course corrections without user input. ie: Autopilot, course heading lock, self-guided cruise missiles, etc.

#5 -- Yes, #4 can be accomplished with a single gyro...but everyone loves putting more gyros on their ships. Just going with the flow here.

#6 -- Would like to enable the script to activate dampeners and retro thrusters when arriving at the destination.

#7 -- Would like to add some sort of collision avoidance but the only way to do that at this point is to actually survey and catalog the coordinates of every known asteroid or obstacle within your local system. That's right, put those relay satellites to good use, eh? Break out the spreadsheets and hop to it.

#8 -- While you're at it, how about a list of waypoints? Sure, why not! I have no life...let me get right on that!

#9 -- How about some real-world motivation? Donations anyone? PayPal me! MIKE(at)NTELEKT(dot)Come_On_Man

#10 -- YES....I will blueprint this in large and small ship format for you lazy bums. See #9 above!

--Durf
1 Comments
Shurtugalskulblaka 1 Nov, 2018 @ 4:48pm 
I absolutly love this idea. Totally going to use this on my new ship and am going to instal it on my released ship in her refit. Bravo zulu man. I cant wait to put this in more systems. And as for collision avoidance XD It should enforce people to pay more attention to their radars or at least bother to install them