Space Engineers

Space Engineers

Not enough ratings
Nav Sensors Users Guide
By SinBad
How to install and set up my Nav Sensors Ingame Script.
   
Award
Favorite
Favorited
Unfavorite
Installation
To install:
subscribe to the Nav Sensors Script
Then in game, select the Edit button on your programmable block (in game scripts must be enabled in the world settings)
Select the Browse Scripts button at the bottom right of the window
Find the Nav Sensors script in the left hand panel and select it.
select Copy to Editor at the bottom right.
select Check Code, if any errors are listed here, please let me know in the comments on the script page, if not, select OK, and OK again.
you are ready to configure the Script.

Setup
Any Block that you would like to use with this script requires [NAV] included in its custom name.
Minimum required blocks are
  • Cockpit with the word Origin as part of its name in addition to the [NAV] tag. The script makes all position and orientation measurements from this Origin block. Only have One block with this in its name.
  • AProgrammable Block to run the script. This only requires the [NAV] tag if you want to use it's screens with the script.
  • A Display of some kind. Text or LCD panels of all sizes and shapes, or any other block that has a screen you can write text to. All of them will need a [NAV] tag as part of their names. Most Cockpits and Control seats have screens, and can be used as displays even if they are not the Origin block.
Optional Blocks
  • Remote Control Block. you can use a remote control block as the origin instead of a cockpit. It will need to have Origin in its name, as well as the [NAV] tag.
  • Cameras. This script supports using cameras as rangefinders. The camera needs a [NAV] tag and can still be used as a camera while the script is running.
I have not tested the script with modded screens, cameras or ship controllers, give it a go and let me know how it works.
Single Display Configuration
Single Displays
This includes Text Panels, LCD Panels, Transparent LCD Panels and Edge LCD Panels.
The Panel will require [NAV] in it's name to be recognized by the script.

The script detects when you are in Planetary gravity and will automatically switch between Space and Surface modes. Because of this, each display must be configured for both modes. Displays are configured from their Custom Data panels. Each line of text in the custom data of the screen will produce a line of text on the display. Each line must have a configuration for Surface mode and Space mode separated by a space.
surface space surface space surface space
The automatically selected mode will change the display to the configured data for that mode.
When you are sure you will be operating in surface mode only (like a rover), the space configurations may be skipped, but this will cause the script to crash if you take it to space.

Surface Data
Configuration Word
Description
Lat
Displays your Latitude
Long
Displays your Longitude
Elevation
Displays your height above or below the surface in Meters
Altitude
Displays your height above or below Sea Level in Meters
Attitude
Displays combined Heading, Pitch and Roll reading on a single line
Heading
Displays your heading in degrees
Pitch
Displays your Pitch in degrees positive or negative
Roll
Displays your Roll in degrees L (counter clockwise) or R (clockwise)
None
Displays a blank line in Surface Mode

Space Data
Configuration Word
Description
GPS
Displays GPS co-ordinates on a single line
GPSX
Displays GPS X co-ordinates on a single line
GPSY
Displays GPS Y co-ordinates on a single line
GPSZ
Displays GPS Z co-ordinates on a single line
Vector
Displays combined motion vector information on one line. This is the direction and speed your ship is Moving in Heading, Pitch and Meters per Second
VectorBearing
Displays your motion vector on the XZ plane in degrees
VectorElevation
Displays how much your motion vector deviates above or below the XZ plane in degrees
VectorVelocity
Displays your current velocity in Meters per second
Attitude
Displays which direction your ship is facing on a single line, Heading, Pitch and Roll on the XZ plane in degrees
Heading
Displays the direction your ship is facing on the XZ plane in degrees
Pitch
Displays the direction your is facing above or below the XZ plane in degrees
Roll
Displays your ships roll relative to the XZ plane. a roll of 90degrees indicates your ship is standing on a wingtip relative to the XZ plane, readings in excess of 90 degrees indicate your craft is inverted.
None
Displays a blank line in Space Mode

These can be combined on each line of the Panel's Custom Data to configure each line of the display.
for example
Lat GPSX
Long GPSY
Elevation GPSZ
would display
Lat
Long
Elevation
on the surface
and
GPSX
GPSY
GPSZ
in space.

Note that both configuration words need to be included for the script to keep working when moving between modes.

Rangefinder Configuration
Setting up your cameras as rangefinders
Cameras need to have [NAV] as part of their custom name in order to work with the script.
Like a display, a camera is configured in its custom data window.
They use a three part configuration line.
  1. the first part identifies it as a range finder
  2. the second part is the name of the rangefinder, this doesn't need to match the name of the camera.
  3. the third part is the desired maximum scanning range in meters. This is included because cameras need a charge time before they can do a range measurement. that time is longer for longer ranges, so balance you need to measure things far away with your need for rapidly changing range readings.
These three parts are assembled on a single line in the custom data window with a single space between each part.

for example
RangeFinder GunSight 1000

would be for a camera you want to use as a rangefinder, that you will call GunSight when configuring displays, and that you only want to scan to 1000 meters.

Setting up your Rangefinder Displays
The Rangefinder Display is configured in the custom data of the display you wish to use. Rangefinder configuration lines can be mixed in with other configuration lines on the same display. Unlike Surface or Space Data, Range Data is visible in both modes. Because of this, Range configuration words dont need to be paired, instead they have three parts.

  1. First use the word Range to indicate that this line is for range data.
  2. Then use the Name of the ranging camera that you want to display. this is the same name you used in the camera configuration above.
  3. Finally add a display option from the table below.

Configuration Option
Description
NameRangeAndCharge
Displays all Range Finder information on one line
NameAndRange
Displays the Name of the Range Finder and the Detected Range only
NameOnly
Displays only the Name of the Range Finder
RangeOnly
Displays only the detected range of the range finder
ChargeOnly
Displays the Charge state of the range finder only
The three parts should be assembled on a single line of the Display's Custom Data with a single space between them.

for example
Range GunSight NameRangeAndCharge
would display
GunSight:420m(Chrg:69%)

and this
Range GunSight NameOnly
Range GunSight RangeOnly
Range GunSight ChargeOnly
would display
GunSight:
420m
(Chrg:69%)

Note: The Range finder will automatically measure range when its charge reaches 100%
the displayed range will hold on the last detected range until a new measurement is made. if no object is detected the range will display No_Detection
Blocks with Multiple Displays (Cockpits and stuff)
Configuration
Blocks with multiple displays may be used by multiple scripts at the same time. This makes it important to separate Nav Sensor configuration data from the configuration data for other scripts.
To achieve this, a header word and footer word are used to enclose the data.
the Header word is
StartNAV
and should be put by itself on its own line Before the Nav Sensors data.
the Footer word is
EndNAV
and should be put by itself on its own line After the Nav Sensors data.

Using these will cause the script to ignore anything in the custom data before StartNAV, and anything after EndNAV. Many scripts have features similar to this to ensure they play well together with others.

To Tell the script which of the displays you want to use, add
Panel
followed by a single space and the number of the panel you wish to use.
If you want to know what the panel numbers are, look at the display selection box on the block's system menu. The panels are listed in order, just count down the list to the panel you want, starting at zero.

an example
Some Other
Excellent Scripts
Stuff
StartNAV
Panel 1
Heading Heading
Pitch Pitch
Roll Roll
Range GunSight NameAndRangeOnly
Panel 2
Range RadarAltimeter NameRangeAndCharge
Elevation VectorBearing
Altitude VectorElevation
EndNAV
More Stuff From
Other Great Scripts

would display

Heading: 270
Pitch: 2
Roll: R0.5
GunSight:No_Detection
Really usefull
content from
other scripts
RadarAltimeter:540m(Chrg:25%)
Ele: 540m
Alt: 2230m
when in a planet's gravity.

Problems with the guide?
leave a comment if anything is unclear, i'll change things until it makes sense.
4 Comments
SinBad  [author] Apr 24, 2022 @ 9:07pm 
@Kein, is this for use with one of the aerodynamics mods? I could try to add aviation style outputs. Altitude rate, angle of attack, sideslip, turn rate, forward speed indicator etc. let me dig into what else might be handy. leave it with me me a couple of days.
Kein Apr 14, 2022 @ 7:14pm 
Is there a way that you can add directional velocity to the list of options, allowing you to see how fast you are going in the forward or backward direction, vs left/right.
I would like to use it for flying a plane, and knowing if I have enough forward momentum to keep lift is a good idea.
you have velocity in space, but would like it on the planet and parsed out by how much is drop vs forward momentum vs side momentum
SinBad  [author] Mar 5, 2021 @ 5:37am 
too many commas?
SevenofThr4wn Feb 28, 2021 @ 11:16pm 
Hmm, interesting, that is, complicated you are - custom Yoda speak