Jump to content

[1.12.x] PAPI Lights (Precision approach path indicator)


linuxgurugamer

Recommended Posts

Originally written by @asarium way back in the early days, thread is here:  https://forum.kerbalspaceprogram.com/index.php?/topic/38153-023-

Continued by @bssthu, thread is here:https://forum.kerbalspaceprogram.com/index.php?/topic/101446-wip

I've picked it up and updated it.

Config File Documentation

Spoiler

Config file documentation:

This is done by the LightGroup config node type. Every node represents an object which groups multiple lights together.

You can find an example of that config file here: https://github.com/asarium/PAPIPlugin/blob/master/assets/GameData/PAPIPlugin/lights.cfg

The options on a LightGroup are:

 

  • Name: The name of the group (optional)
  • Body: The name of the body the group is located on (e.g. Kerbin) (required)

 

To add actual light arrays you need to add LightArray entries inside the group node. Each entry needs a Type value and may have a Namespace value. These are used to identify the class which is used for the light array.

Possible values are:

 

  • Type: PAPIArray
    Namespace: PAPIPlugin.Arrays
    Options:
    • Latitude: The latitude of the array location (required)
    • Longitude: The longitude of the array location (required)
    • Heading: The heading the array points to. This is used to aligned the array and also to make the array fade out when viewed from behind.(required)
    • TargetGlideslope: The target path where the array will be half white half red, default is 6. (optional)
    • GlideslopeTolerance: The difference from the target glidepath where the array will not be entirely red or white, default is 1.5.(optional)
    • Height: The actual height of the array above the terrain below (optional)
    • PartCount: The number of lights in the array (optional)
    • LightRadius: The radius of the lights (optional)
    • LightDistance: The distance between two lights, excluding the actual light radius (optional)


How to create new arrays

Spoiler

 

  • Install Vessel Mover,  Waypoint Manager, HyperEdit and NavHud
  • Launch a plane or rover (small rover is more accurate), and move it to the desired runway.  Depending on what mods you have installed, you might be able to launch it at the new location, otherwise you can use HyperEdit or any other method to move the vessel to the new location
  • Use Vessel Mover to position the vessel where you want the lights to be.  The lights are normally at the left side of the runway (as you approach)
  • Use Waypoint Manager to create a waypoint where the vessel is.
  • Create a new file in the PAPIPlugin directory called PAPI.config.  Add the following to the file. For the second section, move to the other end of the runway, turn around, and repeat

    
 


LightGroup
{
    Name = (replace with location name)
    Body = (replace with planetary body name)
    LightArray 
    {
        Type = PAPIArray
        Namespace = PAPIPlugin.Arrays
        Latitude = (replace with Latitude of array location)
        Longitude = (replace with Longitude of array location)
        Heading = (direction of runway MINUS 90)
        GlideslopeTolerance = 1.5
        TargetGlideslope = 3
        HeightAboveTerrain = 7
        PartCount = 4
        LightRadius = 8
        LightDistance = 6
    }
    LightArray 
    {
        Type = PAPIArray
        Namespace = PAPIPlugin.Arrays
        Latitude = (replace with Latitude of array location)
        Longitude = (replace with Longitude of array location)
        Heading = (direction of runway PLUS 90)
        GlideslopeTolerance = 1.5
        TargetGlideslope = 3
        HeightAboveTerrain = 7
        PartCount = 4
        LightRadius = 8
        LightDistance = 6
    }
}


 

 

There are two config files (file names are case sensitive):

  • light.cfg    Loaded at boot time, modifiable by ModuleManager
  • PAPI.config    Loaded at run time, not modified by ModuleManager

The PAPI.config is used to dynamically load new settings during run time.

The dialog has two save options:

  • Save Std    Saves the settings loaded from light.cfg, back into light.cfg
  • Save All    Saves both light.cfg and PAPI.cfg back into light.cfg

Thanks to @JadeOfMaar for the Island Airfield indicators

Dependencies

Availability

CKAN soon

Edited by linuxgurugamer
Link to comment
Share on other sites

Hi, @linuxgurugamer

I downloaded this just to test it, but it spawn this error:

 

LOG 20:07:22.850] Incorrect PAPIPlugin Installation: PAPIPlugin has been installed incorrectly and will not function properly. All files should be located in KSP/GameData/PAPI Lights/Plugins. Do not move any files from inside that folder.

Your .zip has inside the path: [...] Gamedata/Papiplugin/Plugins/.....
I corrected mine, locally, as asked by the log, but it could useful an "update" also on your front, with a correct path ^_^

Link to comment
Share on other sites

Hello @linuxgurugamer

I noticed now on this landing, that sometimes the PAPIs don't appear, I am not sure yet why, but maybe is related with db armory?

( you can skip for 8 min after assault, and landing moment )

 

LOGS: https://www.dropbox.com/s/h5sy3fv2rkamwuz/no-papi.zip?dl=0

 

It worked like last week, am I not sure why it does not... I will keep an eye on it!

Link to comment
Share on other sites

56 minutes ago, pmborg said:

Hello @linuxgurugamer

I noticed now on this landing, that sometimes the PAPIs don't appear, I am not sure yet why, but maybe is related with db armory?

I actually saw it about 3 minutes in, there weren't PAPI lights on the other end either.  Log files didn't show anything.

However, you have BDArmory installed, and I have no idea what it does internally.  I can't and won't support installs with BDArmory installed for reasons I won't go into.  I will add a debug mode to try to track this down, but am not going to expend much effort beyond this.  Please try it without BDArmory and let me know if it happens that way.  It will be released soon, you will need to go into the stock settings to find the PAPI page and enable debug mode.

Link to comment
Share on other sites

3 hours ago, linuxgurugamer said:

I actually saw it about 3 minutes in, there weren't PAPI lights on the other end either.  Log files didn't show anything.

However, you have BDArmory installed, and I have no idea what it does internally.  I can't and won't support installs with BDArmory installed for reasons I won't go into.  I will add a debug mode to try to track this down, but am not going to expend much effort beyond this.  Please try it without BDArmory and let me know if it happens that way.  It will be released soon, you will need to go into the stock settings to find the PAPI page and enable debug mode.

Hello!

Inspired on the recent news about several comets that have 2.5% of prob. collision with earth in next decades and/in 2029

Yes, I installed yesterday DBArmory to test it, actually I found it as a very complete and differentiated mod, I was looking for a laser/weapon to destroy an asteroid, but I think that will not work as expected I mean don't work at all..

I confirm that after remove the DBArmory addon PAPIs are back :)

146ewmw.png

 

Trying now to activate debug mode and give another try with dbarmory

Thanks!

 

Edited by pmborg
Link to comment
Share on other sites

It seams that PAPI lights are back somehow, I will keep an eye on lights and on PAPI log, as well.

But by default I need to keep log off, once my system very often with engines off, pull about 100FPS I get:

[LOG 17:54:34.411] PAPIPlugin: GetArrayPartColor, Returning white, difference > GlideslopeTolerance
[LOG 17:54:34.411] PAPIPlugin: GetArrayPartColor, Returning white, difference > GlideslopeTolerance
[LOG 17:54:34.411] PAPIPlugin: GetArrayPartColor, Returning white, difference > GlideslopeTolerance
[LOG 17:54:34.411] PAPIPlugin: GetArrayPartColor, Returning white, difference > GlideslopeTolerance
[LOG 17:54:34.411] PAPIPlugin: GetArrayPartColor, Returning red, difference < -GlideslopeTolerance
[LOG 17:54:34.411] PAPIPlugin: GetArrayPartColor, Returning red, difference < -GlideslopeTolerance
[LOG 17:54:34.411] PAPIPlugin: GetArrayPartColor, Returning red, difference < -GlideslopeTolerance
[LOG 17:54:34.411] PAPIPlugin: GetArrayPartColor, Returning red, difference < -GlideslopeTolerance
[LOG 17:54:34.411] PAPIPlugin: GetArrayPartColor, Returning red, difference < -GlideslopeTolerance
[LOG 17:54:34.411] PAPIPlugin: GetArrayPartColor, Returning red, difference < -GlideslopeTolerance
[LOG 17:54:34.411] PAPIPlugin: GetArrayPartColor, Returning red, difference < -GlideslopeTolerance
[LOG 17:54:34.411] PAPIPlugin: GetArrayPartColor, Returning red, difference < -GlideslopeTolerance
[LOG 17:54:34.422] PAPIPlugin: GetArrayPartColor, Returning white, difference > GlideslopeTolerance
[LOG 17:54:34.422] PAPIPlugin: GetArrayPartColor, Returning white, difference > GlideslopeTolerance
[LOG 17:54:34.422] PAPIPlugin: GetArrayPartColor, Returning white, difference > GlideslopeTolerance
[LOG 17:54:34.422] PAPIPlugin: GetArrayPartColor, Returning white, difference > GlideslopeTolerance
[LOG 17:54:34.422] PAPIPlugin: GetArrayPartColor, Returning red, difference < -GlideslopeTolerance
[LOG 17:54:34.422] PAPIPlugin: GetArrayPartColor, Returning red, difference < -GlideslopeTolerance
[LOG 17:54:34.422] PAPIPlugin: GetArrayPartColor, Returning red, difference < -GlideslopeTolerance
[LOG 17:54:34.422] PAPIPlugin: GetArrayPartColor, Returning red, difference < -GlideslopeTolerance
[LOG 17:54:34.422] PAPIPlugin: GetArrayPartColor, Returning red, difference < -GlideslopeTolerance
[LOG 17:54:34.422] PAPIPlugin: GetArrayPartColor, Returning red, difference < -GlideslopeTolerance
[LOG 17:54:34.422] PAPIPlugin: GetArrayPartColor, Returning red, difference < -GlideslopeTolerance
[LOG 17:54:34.422] PAPIPlugin: GetArrayPartColor, Returning red, difference < -GlideslopeTolerance

 

Link to comment
Share on other sites

Actually the problem is back, I think that it happens as soon as we enter in tracking station and we return to space center again, they are gone.

The log don't help, they don't appear and don't log...

 

Just this:

$ grep "PAPI" KSP.log
[LOG 18:19:47.081] Load(Assembly): PAPIPlugin/Plugins/PAPIPlugin
[LOG 18:19:47.081] AssemblyLoader: Loading assembly at K:\SteamLibrary\steamapps\common\Kerbal Space Program\GameData\PAPIPlugin\Plugins\PAPIPlugin.dll
PAPIPlugin v0.5.0.4 / v0.5.0.0
PAPIPlugin
[LOG 18:19:47.744] [AddonLoader]: Instantiating addon 'Startup' from assembly 'PAPIPlugin'
[LOG 18:20:03.100] [PAPIPlugin Continued] Version PAPIPlugin, Version=0.5.0.4, Culture=neutral, PublicKeyToken=null
[LOG 18:21:46.589] Config(LightGroup) PAPIPlugin/lights/LightGroup
[LOG 18:21:46.589] Config(LightGroup) PAPIPlugin/lights/LightGroup
[LOG 18:21:46.589] Config(LightGroup) PAPIPlugin/lights/LightGroup
[LOG 18:21:46.589] Config(LightConfig) PAPIPlugin/settings/LightConfig
  PAPIPlugin                              0.5.0.4                  0.5.0.0                                           fc10614f2c410de9986ce726b9c6a4bb279d2c273719ca5e8c2be142506a8140
[LOG 18:20:33.490] :BEFORE[PAPIPLUGIN] pass
[LOG 18:20:33.490] :FOR[PAPIPLUGIN] pass
[LOG 18:20:33.490] :AFTER[PAPIPLUGIN] pass
[LOG 18:20:49.045] :LAST[PAPIPLUGIN] pass
[LOG 18:27:39.220] [GameParameters]: Loaded custom parameter class PAPI.
[LOG 18:27:46.870] [AddonLoader]: Instantiating addon 'InstallChecker' from assembly 'PAPIPlugin'
[LOG 18:27:46.872] [AddonLoader]: Instantiating addon 'RegisterToolbar' from assembly 'PAPIPlugin'
[LOG 18:32:44.999] [AddonLoader]: Instantiating addon 'PPAPIAddonSpaceCentre' from assembly 'PAPIPlugin'
[LOG 18:32:45.005] PAPIPlugin: Awake!
[LOG 18:32:45.008] PAPIPlugin: Starting to parse light definitions...
[LOG 18:32:45.025] PAPIPlugin: Found light group Squad: KSC on body Kerbin.
[LOG 18:32:45.039] PAPIPlugin: Found array of type PAPIPlugin.Arrays.PAPIArray.
[LOG 18:32:45.065] PAPIPlugin: PAPIPlugin.Impl.DefaultLightGroup
[LOG 18:32:45.085] PAPIPlugin: Found array of type PAPIPlugin.Arrays.PAPIArray.
[LOG 18:32:45.089] PAPIPlugin: Found light group Squad: Island Airfield on body Kerbin.
[LOG 18:32:45.095] PAPIPlugin: Found array of type PAPIPlugin.Arrays.PAPIArray.
[LOG 18:32:45.095] PAPIPlugin: PAPIPlugin.Impl.DefaultLightGroup
[LOG 18:32:45.100] PAPIPlugin: Found array of type PAPIPlugin.Arrays.PAPIArray.
[LOG 18:32:45.100] PAPIPlugin: Found light group Squad: Dessert Airfield on body Kerbin.
[LOG 18:32:45.105] PAPIPlugin: Found array of type PAPIPlugin.Arrays.PAPIArray.
[LOG 18:32:45.105] PAPIPlugin: PAPIPlugin.Impl.DefaultLightGroup
[LOG 18:32:45.110] PAPIPlugin: Found array of type PAPIPlugin.Arrays.PAPIArray.
[LOG 18:32:45.156] PAPIPlugin: Finished parsing definitions. Found 3 light groups with a total of 6 light arrays in a time of 00:00:00.1445029.
Assembly: PAPIPlugin, Version=0.5.0.4, Culture=neutral, PublicKeyToken=null
[LOG 18:33:09.567] PAPIPlugin: OnDestroy!
[LOG 18:36:51.755] [AddonLoader]: Instantiating addon 'PPAPIAddonSpaceCentre' from assembly 'PAPIPlugin'
[LOG 18:36:51.755] PAPIPlugin: Awake!

 

Edited by pmborg
Link to comment
Share on other sites

1 hour ago, pmborg said:

Actually the problem is back, I think that it happens as soon as we enter in tracking station and we return to space center again, they are gone.

The log don't help, they don't appear and don't log...

 

Ummm, with or without bDArmory?

and you do know the PAPI lights aren't shown in the space center?

 

Link to comment
Share on other sites

2 minutes ago, linuxgurugamer said:

 

Ummm, with or without bDArmory?

and you do know the PAPI lights aren't shown in the space center?

 

I am with bDArmory again, as soon as I entered in tracking station and went back to space center they were gone, even in space center.

Link to comment
Share on other sites

6 hours ago, linuxgurugamer said:

Do you run on MacOS or Windows?

Hello back, Windows.

In begging I was thinking that this was due db Armory but is not.

Actually is very easy to replicate.

Load game PAPI lights are there, went in "Tracking Station" exit... to main menu (KSC) and PAPI light are gone.

Edited by pmborg
Link to comment
Share on other sites

On 2/26/2020 at 2:03 PM, pmborg said:

Hello back, Windows.

In begging I was thinking that this was due db Armory but is not.

Actually is very easy to replicate.

Load game PAPI lights are there, went in "Tracking Station" exit... to main menu (KSC) and PAPI light are gone.

The order to set the stage is:

  1. Main Menu
  2. Space Center
  3. Flight (to see the lights)
  4. Tracking station
  5. Main menu (via space center?)

and then

  1. Space Center
  2. Flight

and at this point, no lights?

 

Please confirm

Link to comment
Share on other sites

3 minutes ago, Daniel Prates said:

One thing I never understood about PAPI lights, where exactly is the exact glidepath? Is it where I get two reds and two whites?

Yes.  The lights are precisely aligned.  When you have 2 and 2, that means you are lined up.  If you get 3 and 1, or 4 and 0, you are out, and need to adjust appropriately

Link to comment
Share on other sites

Just now, linuxgurugamer said:

Yes.  The lights are precisely aligned.  When you have 2 and 2, that means you are lined up.  If you get 3 and 1, or 4 and 0, you are out, and need to adjust appropriately

Thanks linux. By the way, saving settings during a flight does not seem to work, it doesn't matter what I do and next flight it will be back to the original setting (3 degrees glidepath, 1.5 degrees deviation). I went directly into the config and changed it there to have a permanent alteration. 

Link to comment
Share on other sites

This thread is quite old. Please consider starting a new thread rather than reviving this one.

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...