Space Engineers

Space Engineers

960 ratings
Whip's Artificial Horizon Redux
2
3
4
2
   
Award
Favorite
Favorited
Unfavorite
File Size
Posted
Updated
497.518 KB
Apr 23, 2019 @ 5:48am
Oct 14, 2024 @ 11:30am
18 Change Notes ( view )

Subscribe to download
Whip's Artificial Horizon Redux

In 1 collection by Whiplash141
Whip's Scripts
22 items
Description
Whip's Artificial Horizon Redux


Updated the space orientation indicator to draw 3D arrow heads for better visual clarity



Howdy!

This is my rendition of an artificial horizon for use on the ship cockpit screens and regular LCDs and text panels; I wasn't satisfied with Keen's so I made my own. This script utilizes the new sprite based drawing API to allow the visuals to be much more crisp than my old pixel-based variant.

In atmosphere, the script will display a colored artificial horizon with graphical indicators for velocity, pitch, and roll as well as text displays of altitude, speed, and heading.


When you leave a planet's atmosphere, the horizon disappears and the screen functions as a graphical velocity indicator where speed and acceleration are displayed on screen. Also, the world XYZ axes are drawn to help you orient yourself in space.



  • Works with new cockpit LCDs
  • Prograde and retrograde velocity indicators that never go off screen
  • Fully configurable colors
  • Uses Custom Data for customization (No more need to modify the code!)
  • Uses new sprite drawing API to generate crisp visuals
  • PULL UP warning displays when the script detects that a collision with the ground is imminent
  • Works as a graphical velocity indicator in space
  • World XYZ axes are shown when in space to help you orient yourself


Required Steps
  1. Place this script on your ship
  2. Place one or more ship controllers on your ship (Cockpits, Flight Seats, or Remote Controls)
  3. Add Horizon to the name of text panels or blocks with text surfaces that you want the artificial horizon displayed.
    • Blocks with text surfaces include: Cockpits, flight seats, programmable blocks, and console blocks
    • Configure which text surface the horizon is displayed on within the block's custom data (You don't need to do this for text panels). The default config will be populated automatically.

  4. Enjoy!

Optional steps
  • Place the word Reference in the name of the ship controller that you want use to orient the the artificial horizon.
    • If you do not specify, the code will automatically detect and use the seat you are controlling the ship from.
  • Place the word Horizon in the name of any sound blocks you want to use for ground collision warnings.
    • Make sure to select a sound to play on the sound block. You can configure the loop interval in the custom data of the programmable block.

How to read the XYZ axes



You can change how the artificial horizon looks and behaves within the Custom Data of the programmable block this script is running from. Simply open the custom data, modify it, and click "Ok". The code will update to reflect these changes within 10 seconds at most.



Can I customize the colors?
Yes, in the custom data of this programmable block.

Does this work with the new cockpit LCDs?
Yes.

Can I have an Artificial Horizon and a Radar on different cockpit screens?
Yes, as long as they are configured to write to different cockpit screens, my scripts will not conflict.

Will this work with Configurable Auto LCDs 2?
Yes. Simply append the CAL2 configuration to the END of the Custom Data like so:
Artificial horizon configuration --- Auto LCD configuration
The three hyphens (---) need to go after everything else in the Custom Data, but before the Auto LCD configuration.

Do you have an Elite Dangerous color scheme that matches the Radar script?
Yes! Check out the presets below in the Color Schemes discussion!


Be sure to report any bugs below in the Bug Reports discussion. Hope y'all enjoy :)

(Do not reupload without permission, not even to mod.io)
Popular Discussions View All (3)
11
Oct 17, 2024 @ 4:47pm
PINNED: Bug Reports
Whiplash141
7
May 5, 2021 @ 8:20pm
PINNED: Color Schemes
Whiplash141
0
Apr 27, 2024 @ 3:57am
Feature Idea: In space "reference horizon" within "docking range".
Leconite
219 Comments
Leconite Nov 16, 2024 @ 2:10am 
Works on any LCD.
MARRA92 Nov 15, 2024 @ 3:56pm 
does it work on text panel or other vanilla lcd as replacement of default dotted art-horizon?
Leconite Oct 19, 2024 @ 5:13am 
Would it be workable to integrate, at least, the non radial compass from your other script into the planetary horizon display?

Both scripts already give me a bearing, having all directional info on one display if possible would be great.

I imagine a non radial compass at the top, or a small radial compass in one of the bottom corners of the display, with config options to turn those parts of the display on or off.

Thanks for the great script, much better than the OEM (KSH) supplied alternative. :-)
Whiplash141  [author] Oct 14, 2024 @ 7:37pm 
I fixed it a few hours before you both commented. Please see the change notes :P
Lord Lorcan Oct 14, 2024 @ 4:07pm 
Hi all;
I confirm, strange but true, it's broken since last update
HiroOne™ [XXXV] Oct 14, 2024 @ 2:55pm 
Currently broken due to update
{H.K.}Warlama Jul 30, 2024 @ 4:05am 
ok cool, thank you for this!! i appreciate it!
Whiplash141  [author] Jul 29, 2024 @ 8:07pm 
It is based on estimated time to ground impact and is configurable in custom data via the "Collision warning time threshold (s)" parameter. I used this as opposed to a fixed altitude warning to reduce false positives and make it more of a "you are going to hit the ground" warning and less of a "you are flying low" warning :)
{H.K.}Warlama Jul 29, 2024 @ 6:33pm 
Hello Whip, I have a question about the script. the pull up warning, is that based on how close you are to the ground? if so is there a way to adjust the pull up warning to alert you if your say 50M
or 100M from the ground? or is it based on different factors?
Whiplash141  [author] May 4, 2024 @ 5:28pm 
This is not a mod, it is an in-game script. You do not (and should not) need to add it to your server to use it. You only need to enable in-game scripts in the world options.