Jump to content

[1.12.x] NavUtilities continued, ft. HSI & Instrument Landing System


linuxgurugamer

Recommended Posts

Originally written by @kujuman, adopted by @Ser, and now it's my turn.  Note that @Serhas indicated that if sometime in the future, if he comes back, he may take the mod back.

Original thread here: https://forum.kerbalspaceprogram.com/index.php?/topic/77062-11-navutilities-ft-hsi-instrument-landing-system/

@Ser's thread here: https://forum.kerbalspaceprogram.com/index.php?/topic/162967-140-181-navutilities-continued-ft-hsi-instrument-landing-system-v072-2018-apr-1/

 

Note: This version is forked from @Lisias's version which he maintains for his own use.  It has a lot of bug fixes and improvements, I've removed the need for his KSPe library.  My thanks to him for his permission to use it

 

NavUtilities for KSP

Featuring Instrument Landing System and Horizontal Situation Indicator

Standalone and for Raster Prop Monitor

  • Standalone version is a popup window, but the information displayed is the same

 

Adds a horizontal situation indicator with integrated ILS functionality to a popup window or your RPM cockpit.

The standalone version can be accessed (along with the options page and custom runway page, for controlling the current runway and GUI scale) via the toolbar or Blizzy toolbar.

ILS style localizer, glideslope indicator, distance measuring equipment, and backcourse indicator.

Outer, Middle, and Inner Markers are fully functional, with the audio cue volume controlled by your Voices volume setting (WARNING: Middle and Inner marker audio cues are high pitch and, depending on your settings, may be loud). Currently, volume settings will not update when in flight, but going to the space center should update them.

The window GUI auto hides when you enter IVA. Current runway and glideslope selection remain synced between the standalone GUI and the version for RPM.

Included selectable runways:

  • KSC 09
  • KSC 27
  • Island 09
  • Island 27
  • VAB Helipad East
  • VAB Helipad West
  • Administration Helipad

Included glideslopes range from default 3° to 25°

More runways and glideslopes can be added via config file or in game.

Helpful images of 0.4.0+ features 

qQLYLdE.png

QumfZPa.png

DNNRTOw.png

Zup7lfe.png

 

Please note that if you are using KSI MFD, you can also select the HSI by cycling between this and the landing screen. Thanks to @Tahvohck !

The settings window holding Alt when pressing the toolbar button, or by right-clicking on the toolbar button

 

Copy the contents of GameData folder into your main KSP/GameData/ folder. The other files are not required for the plugin to function.

To enable some third party MFD support or to be able to modify runway data in a convenient way you'll need

Dependencies

Module Manager by sarbian

New Dependencies

For RPM integration you'll additionally need

 

Availability

Software License: © 2014-2016. All rights reserved.

Permission is granted to any current, former, or future members of the KSP community (e.g.; non-professional modification makers and forum members) to update, maintain, use portions of the code, and/or release derivatives provided that 1) the new work is solely to be used as a modification for Kerbal Space Program (and future versions thereof) and 2) the new work is freely distributed and may not be sold or exchanged.

Artwork License: Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License

Edited by linuxgurugamer
Link to comment
Share on other sites

22 minutes ago, Daniel Prates said:

many custom runway configs for his many kerbin side gap strips.

Also the JNSQ-KSRGAP mod has complete custom runways for the JNSQ Airbases. The files are in the patches folder and can be used with or without the contracts

Link to comment
Share on other sites

Initial beta is now available here:  https://github.com/linuxgurugamer/NavInstruments/releases/tag/0.8.0

Partial list of changes by LGG:

  • Added support for Toolbarcontroller
  • Added support for ClickThroughBlocker
  • Removed direct Blizzy toolbar support, replaced with ToolbarController
  • Removed direct stock toolbar support, replaced with ToolbarController
  • Added new dependeicies
    • ToolbarController
    • ClickThroughBlocker
    • SpaceTuxLibrary
  • Removed KSPe dependency
  • Replaced KSPe methods with equivilent from ToolbarController and SpaceTuxLibrary
  • Moved directories to generally accepted locations by most mod authors
  • Removed special logging classes (multiple), replaced with KSP_Log from SpaceTuxLibrary
  • Fixed duplicated AnalogGaugeUtils definition by making one local
  • Converted textures to DDS
  • Removed "goto" statements 
  • Added right-click on button to bring up settings in addition to alt-click on button
  • Removed the AircraftAutoPilot DLL since there was no code there
  • Removed the NavUtilToolBar DLL since there was no code there
  • Disabled the NavUtilLib/AnalogGauges.cs, since it wasn't being used by anything

Changes done by @Lisias:

  • Fixed the Dessert Airfield `shortId` as [suggested](https://github.com/SerTheGreat/NavInstruments/pull/1#pullrequestreview-341004160) by [MatthieuLemaile](https://github.com/MatthieuLemaile)
  • Moving on-demand loading assets into PluginData, saving a bit of time on KSP loading (as they would be loaded again anyway)
  • Fixing a weird issue that was provoking the "Matrix stack full depth reached" bug from Unity.
  • Adding Dessert Airfield runway, as suggested by [Sppion1](https://forum.kerbalspaceprogram.com/index.php?/profile/198924-sppion1/) [here](https://forum.kerbalspaceprogram.com/index.php?/topic/162967-140-181-navutilities-continued-ft-hsi-instrument-landing-system-v072-2018-apr-1/&do=findComment&comment=3716551). 
  • The instrument graphics doesn't deteriorates anymore when using Texture Quality less then 1/1 !
  • Added KSP-AVC support

Changes by @Ser:

  • Fixed marker sounds positioning so they are not muffled by Audio Muffler mod anymore 
  • Added a runway selection window
  • Fixed customRunways file overwrite when adding a new runway 
  • Added a setting to hide NavBall waypoint icon
  • Runways made loadable as regular KSP configs and thus modifiable by Module Manager
  • Only the runways belonging to the current celestial body are selectable
  • Fixed INS waypoint names displayed
  • Simplified folder structure for the mod not being that dependent on it 


 

14 hours ago, Caerfinon said:

Also the JNSQ-KSRGAP mod has complete custom runways for the JNSQ Airbases. The files are in the patches folder and can be used with or without the contracts

Would you mind if I merged those custom runways in with the mod?

Link to comment
Share on other sites

45 minutes ago, linuxgurugamer said:

Would you mind if I merged those custom runways in with the mod?

Not at all. They should be available to players who just want to use Kerbin Side Remastered without having to use the GAP mod if they don't want to.

Link to comment
Share on other sites

I'd appreciate some testing done for the following scenario.  There is a user I've been working with who is playing 1.12.2 on Ubuntu, and is having a strange problem.  I've been unable to replicate issue:

The system slows down to system lock up if the NavUtils compass window is open while the secondary mouse button is held.  This was a clean install, with only NavInstruments and it's dependencies installed.

There is nothing in the code that I can tell which would cause this, and am starting to think that it's something to do with the Linux implementation of Unity.  It would be good to get more people testing this

For reference, this is what he sent me:

Protocol:

  1. Start KSP and make a start a new game
  2. Go to the SPH and load up an Aeries 3E and go to the runway
  3. Waited a while, not touching the keys or mouse
  4. Do some basic things with the mouse and keys (change camera angle, brakes, lights)
  5. (If available) Click on the NavInstruments Icon to bring up the compass
  6. Waited a while, not touching the keys or mouse
  7. Do roughly the same set of action as step 4
Link to comment
Share on other sites

20 hours ago, linuxgurugamer said:

Would you mind if I merged those custom runways in with the mod?

Not the best of the ideas. By doing that, every time he does any change on his add'on, you will need to update yours.

Unless you plan to change the format of the RunWay (a situation in which you would induce him to update his add'on), the best line of action is keeping the artefacts that change with the Add'On on the Add'On.

Link to comment
Share on other sites

7 minutes ago, Lisias said:

By doing that, every time he does any change on his add'on, you will need to update yours

Actually I never make changes to the runways as they are owned by other mods. I just provide contracts that make use of the runways. So even having the information in my mod is one step removed. I have no issue with updating the information via a pull request, but if the data is with the NavUtilities mod, then players who choose to have nothing to do with my contract packs (I know it's surprising players like this even exist) can use NavUtils without my stuff thrown in to the mix.

Link to comment
Share on other sites

2 hours ago, Caerfinon said:

Actually I never make changes to the runways as they are owned by other mods. I just provide contracts that make use of the runways. So even having the information in my mod is one step removed. I have no issue with updating the information via a pull request, but if the data is with the NavUtilities mod, then players who choose to have nothing to do with my contract packs (I know it's surprising players like this even exist) can use NavUtils without my stuff thrown in to the mix.

Point taken. The problem I see is not on making a pull request, is on accepting it. LGG has hundreds of add'ons on his tenure, and some of them are getting behind due his high load of work.

My guess is that these runway definitions will end up rusting on the distribution, with some frustration on the users and also the maintainer itself as changes happen.

I think we need a better way of handling these situations.

Link to comment
Share on other sites

1 hour ago, Lisias said:

I think we need a better way of handling these situations.

Sort of like a Community Navigation Tool Settings mod that could house MM patches for NavUtilities, MechJeb Runways, Kramax Autopilot and any other mods that need runway definitions.

Link to comment
Share on other sites

Gold Star to you guys for reviving this absolutely mandatory mod for any airliner :)

Thank you @linuxgurugamer & @Lisias !

Having multiple runways added is nice, but because you cycle the choice, it becomes tricky if you have plenty, so the order is key here.

Mod detection can be an option ?  Runways to be populated if that specific mod is installed ?

 

On another hand, could runways in general be made available with a proximity trigger, i.e. Desert Runway may not be available if you're near KSC.

This is just a suggestion, not sure if it's feasible.

I'll try give it a try soon as I can

Edited by Demcrew
Link to comment
Share on other sites

45 minutes ago, Demcrew said:

Mod detection can be an option ?  Runways to be populated if that specific mod is installed ?

Yes

45 minutes ago, Demcrew said:

On another hand, could runways in general be made available with a proximity trigger, i.e. Desert Runway may not be available if you're near KSC.

It's a good idea, not sure how feasable it is.  But I will look into it

Link to comment
Share on other sites

5 hours ago, linuxgurugamer said:
6 hours ago, Demcrew said:

On another hand, could runways in general be made available with a proximity trigger, i.e. Desert Runway may not be available if you're near KSC.

It's a good idea, not sure how feasable it is.  But I will look into it

I have this working now

Link to comment
Share on other sites

New release, 0.8.0.1

  • Added additional runways, thanks to contribution from @Caerfinon
  • Added filtering of runways, to limit runways selectable to within configurable distance.  Accessed in the settings window (right-click on the toolbar button)

https://github.com/linuxgurugamer/NavInstruments/releases

Edited by linuxgurugamer
Link to comment
Share on other sites

On 9/23/2021 at 3:19 AM, linuxgurugamer said:

Added a setting to hide NavBall waypoint icon

Very good, had to edit the file before to get it back. The settings window is really and asset here.

Suggestion: if RPM or KSI are there, switching to IVA view should make the floating window disappearing. N/A to the settings window which is usefull somehow.

Just a QoL thing, else everything is fine and I'm so glad to find this back in my setup!

Tested it and seems fine by me, here the folder struct, pretty much neat config.

0Ng5hMT.png

 

Link to comment
Share on other sites

Just firing up KSP (since what feels like a year+) and figured I would finally update to 1.12.x and try out some of the latest updated bits.

The new NavInstruments works great, but I'm not seeing the KSR runways. KSR is definitely installed and working fine. The runway listing in the config panel is just the stock game runways as usual. I've double-checked I am on the beta version, and the runway configs for KSR (and JNSQ) are present.

While I go remember where my log files are kept, etc. has anyone else running Kerbinside Remastered or JNSQ seen the new airports listed?

Link to comment
Share on other sites

57 minutes ago, Beetlecat said:

has anyone else running Kerbinside Remastered or JNSQ seen the new airports listed?

@linuxgurugamer The issue is with the new MM patches. The configs I supplied are for Ser's version so the node name for a runway is NavUtilRunway. The node name in NavInstruments is just Runway.  A simple replace fixes the issue.  (Issue  #4 raised in GitHub)

Also on line 1 of the KerbinSideRemastered.cfg file there is an 'i' character in front of the comments.

Edit:
Also confirming that the airports in range function is working nicely. the first runway loaded with KSR installed is Baikerbaunur 20, however once you cycle through airports within 100kms, only runways within the distance are displayed. Very nice indeed.

Edited by Caerfinon
Link to comment
Share on other sites

9 minutes ago, Caerfinon said:

@linuxgurugamer The issue is with the new MM patches. The configs I supplied are for Ser's version so the node name for a runway is NavUtilRunway. The node name in NavInstruments is just Runway.  A simple replace fixes the issue.

Also on line 1 of the KerbinSideRemastered.cfg file there is an 'i' character in front of the comments.

Edit:
Also confirming that the airports in range function is working nicely. the first runway loaded with KSR installed is Baikerbaunur 20, however once you cycle through airports witnin 100kms only runways within the distance are displayed. Very nice indeed.

Oh! ezpz.  Thank you.

 

 

Link to comment
Share on other sites

@linuxgurugamer@Caerfinon

Hey folks,

I have been trying out the latest 0.8.0.2 release of this mod with JNSQ and the corresponding GAP contract packs (thank you for the updates!) installed via CKAN, and I ran into an issue in which the NavUtils and all other modded toolbar GUI windows disappear when NavUtils is active. This initially occurred while using the tool to approach a modded runway, and persisted until the game was closed. Logs, screenshots, and the full mod list are included at the link below. Let me know if I can provide any other information.

Logs, Screenshots, Full Mod List

KSP: 1.12.2 Windows

Problem: NavUtils GUI and other modded Toolbar GUIs disappear with NullReferenceException thrown

Mods installed: (Full mod list in zipfile given above)

  • JNSQ (JNSQ 0.10.0)
  • Kerbal Konstructs (KerbalKonstructs v1.8.3.0)
  • Contract Pack: GAP for JNSQ (ContractConfigurator-JNSQ-GAP 1.0.4)
  • JNSQ-KSRGAP  (JNSQ-KSRGAP v1.0.1)

Initial Trigger:

  1. Take off from KSC Runway and fly toward C. McAuliffe airport with NavUtils active and set to one of its runways
  2. As you come <30 seconds to landing at the specified runway, observe the NavUtils (and other) mod toolbar GUIs disappear

After Initial Occurrence: (Note: The screenshots show that the option "Don't show runways further than:" is checked; but this occurred initially without that option checked, and continued with and without that setting toggled)

  1. In the NavUtils settings, select "Runway list" and select "Island ILS 09" (a working option)
  2. Click the NavUtils icon so the navigation GUI window appears
  3. In the NavUtils settings, select "Runway list" and select "Welcome ILS 09L" (a non-working option) -> Observe that all modded toolbars disappear
  4. Click the NavUtils icon a few times -> Observe that the modded toolbars reappear and disappear as NavUtils is deactivated and reactivated

Selected from logs/stack-trace:

System.ArithmeticException: Function does not accept floating point Not-a-Number values.
  at System.Math.Sign (System.Double value) [0x00034] in <9577ac7a62ef43179789031239ba8798>:0 
  at Orbit.solveEccentricAnomalyExtremeEcc (System.Double M, System.Double ecc, System.Int32 iterations) [0x00017] in <cd473063d3a2482f8d93d388d0c95035>:0 
[FlightGlobals]: Active Vessel is in atmosphere. Cannot save. 
(Filename: C:\buildslave\unity\build\Runtime/Export/Debug/Debug.bindings.h Line: 35)

PlayOneShot was called with a null AudioClip. 
(Filename: C:\buildslave\unity\build\Runtime/Export/Debug/Debug.bindings.h Line: 35)

Uploading Crash Report
NullReferenceException
  at (wrapper managed-to-native) UnityEngine.AudioSource.Stop(UnityEngine.AudioSource,bool)
  at UnityEngine.AudioSource.Stop () [0x00001] in <ef5b8cd90213481289b135c5e24d44ad>:0 
  at NavInstruments.NavUtilLib.GlobalVariables.Audio.Stop () [0x0000b] in <dcb068ecb806472da9cc11d466a22007>:0 
  at NavInstruments.NavUtilLib.DisplayData.DrawHSI (UnityEngine.RenderTexture screen, System.Single aspectRatio) [0x00671] in <dcb068ecb806472da9cc11d466a22007>:0 
  at NavInstruments.NavUtilLib.NavUtilLibApp.DrawGauge (UnityEngine.RenderTexture screen) [0x00020] in <dcb068ecb806472da9cc11d466a22007>:0 
  at NavInstruments.NavUtilLib.NavUtilLibApp.OnWindow (System.Int32 WindowID) [0x002a0] in <dcb068ecb806472da9cc11d466a22007>:0 
  at UnityEngine.GUI.CallWindowDelegate (UnityEngine.GUI+WindowFunction func, System.Int32 id, System.Int32 instanceID, UnityEngine.GUISkin _skin, System.Int32 forceRect, System.Single width, System.Single height, UnityEngine.GUIStyle style) [0x00078] in <58f888e0d56a4620958c8e58a768c70d>:0 
UnityEngine.DebugLogHandler:Internal_LogException(Exception, Object)
UnityEngine.DebugLogHandler:LogException(Exception, Object)
ModuleManager.UnityLogHandle.InterceptLogHandler:LogException(Exception, Object)
UnityEngine.Logger:LogException(Exception, Object)
UnityEngine.Debug:CallOverridenDebugHandler(Exception, Object)
 
(Filename: <ef5b8cd90213481289b135c5e24d44ad> Line: 0)

 

Link to comment
Share on other sites

5 hours ago, cosmicennui said:

I ran into an issue in which the NavUtils and all other modded toolbar GUI windows disappear when NavUtils is active.

Can confirm.  Issue starts when aircraft reaches the "outer marker" at 10 kms range. the audio file doesn't start to play and all open GUI windows disappear.  If you right click the NavInstruments icon on the toolbar then all the GUI windows become visible again, except for the NavInstruments main display (but the settings GUI does appear again).

Test run using Kerbin Side Remastered and stock runways. Log files

Edited by Caerfinon
Link to comment
Share on other sites

1 hour ago, Caerfinon said:

Can confirm.  Issue starts when aircraft reaches the "outer marker" at 10 kms range. the audio file doesn't start to play and all open GUI windows disappear.  If you right click the NavInstruments icon on the toolbar then all the GUI windows become visible again, except for the NavInstruments main display (but the settings GUI does appear again).

Test run using Kerbin Side Remastered and stock runways. Log files

You have a LOT of mods installed, and have quite a number of exceptions in the log, to the point it was rather difficult to identify the correct exception. 

 

Anyway, I've added some checks, and have this debug version which I'd like you to try, this has some additional debugging statements which will help any logs:

 

https://www.dropbox.com/s/fur8gqzgjcix8hx/NavInstruments-0.8.0.3-beta.zip?dl=0

 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...