Jump to content

[1.8.x+] Waypoint Manager [v2.8.1] [2019-10-22]


nightingale

Recommended Posts

Okay, fair enough. I guess in all my years of GIS I've so rarely seen somebody deliberately choose 0-359 intervals in lieu of ±180 intervals, so I assumed it was a formatting error. But upon looking to it, there is some precedent for 0-359 intervals in the case of planets that are not Earth. Wikipedia: Planetocentric Longitude

Anyway, I also thought I'd give you a heads up since I see you're calculating geodesic distances using the Haversine formula. If you ever get bad answers from that, it's probably because the points are antipodal, which it's ill-condiioned for. Vincenty's formulae suffers similarly. Meanwhile Spherical Law of Cosines is ill-conditioned for short distances. Karney's solution avoids any such problems, and suffers an error of less than 15 nanometers and calculates faster than Vincenty's (pdf).

But with it just being a game and all, I'm not sure it's worth that much effort :)

Link to comment
Share on other sites

Okay, fair enough. I guess in all my years of GIS I've so rarely seen somebody deliberately choose 0-359 intervals in lieu of ±180 intervals, so I assumed it was a formatting error. But upon looking to it, there is some precedent for 0-359 intervals in the case of planets that are not Earth. Wikipedia: Planetocentric Longitude

Perhaps I should do [-180, 180] for Kerbin, and [0, 360] everywhere else and confuse everyone? :)

Anyway, I also thought I'd give you a heads up since I see you're calculating geodesic distances using the Haversine formula. If you ever get bad answers from that, it's probably because the points are antipodal, which it's ill-condiioned for. Vincenty's formulae suffers similarly. Meanwhile Spherical Law of Cosines is ill-conditioned for short distances. Karney's solution avoids any such problems, and suffers an error of less than 15 nanometers and calculates faster than Vincenty's (pdf).

I do remember playing around with thin in testing when I was developing it, and things seems reasonably well behaved enough. Considering the distances are just one of the numbers that are spit out to the player and don't really do anything (ie. aren't spit out into another formula), I can't imagine it causing too much grief.

But with it just being a game and all, I'm not sure it's worth that much effort :)

Yup, far more fun things for me to spend my limited modding "budget" on. :D

Link to comment
Share on other sites

There's some ugly stuff in there with the FinePrint waypoint code throwing exceptions. Can you send your save file?

Link to comment
Share on other sites

Here's a zip with three recent custom quicksaves (2 being the earliest): https://drive.google.com/file/d/0BwS8HpVnXfpJNlJsYVBFMkVqTlU/view?usp=sharing

Sorry, I haven't had much time to look into this. From what I can tell from the files you've provided, there isn't an issue with Waypoint Manager specifically. A couple questions:

  1. If you create a new game, does Waypoint Manager work correctly there (I suspect yes, based on what I've seen).
  2. If you remove Waypoint Manager, do you still have the issues in your save (Again, I suspect yes). Specifically, the million instances of this error:

NullReferenceException: Object reference not set to an instance of an object
at FinePrint.WaypointManager.OnGUI () [0x00000] in <filename unknown>:0

Link to comment
Share on other sites

Something useful for people using this mod. I set up some waypoints at KSC to represent approach paths. The outer markers are at a distance of 20 km from their respective touchdown 'ILS' markers. The 'ILS' waypoints are centerline on the runway and at the same position as the PAPI mod's approach path lights. The glide slope here is for 3 degrees.

The image below shows the four waypoints and their coordinate values.

KSC_GlideSlopeMarkers_zpsclidkvgu.jpg




WAYPOINT
{
name = ILS West
celestialName = Kerbin
icon = dmMultiSpecIcon
latitude = -0.0487450872686923
longitude = 285.29809245388
altitude = 6.07553003530482
index = 2
seed = 269
}
WAYPOINT
{
name = KSC - W - Outer Marker
celestialName = Kerbin
icon = dmMultiSpecIcon
latitude = -0.0487450872630472
longitude = 283.39
altitude = 846.068560969085
index = 3
seed = 180
}
WAYPOINT
{
name = ILS East
celestialName = Kerbin
icon = dmMultiSpecIcon
latitude = -0.0500653061004908
longitude = 285.488275570882
altitude = 8.25404603441712
index = 4
seed = 269
}
WAYPOINT
{
name = KSC - E - Outer Marker
celestialName = Kerbin
icon = dmMultiSpecIcon
latitude = -0.050065288617271
longitude = 287.401
altitude = 1118
index = 5
seed = 747
}

Edited by AdmiralTigerclaw
Link to comment
Share on other sites

Something useful for people using this mod. I set up some waypoints at KSC to represent approach paths. The outer markers are at a distance of 20 km from their respective touchdown 'ILS' markers. The 'ILS' waypoints are centerline on the runway and at the same position as the PAPI mod's approach path lights. The glide slope here is for 3 degrees.

The image below shows the four waypoints and their coordinate values.

http://img.photobucket.com/albums/v430/admiraltigerclaw/KSC_GlideSlopeMarkers_zpsclidkvgu.jpg

Very cool! Don't forgot there's an export/import custom waypoints button in the settings that will let you transfer those waypoints between saves (or share them with others).

Also in the settings you can turn on the glide-slope angle display for the active waypoint. :)

Link to comment
Share on other sites

Very cool! Don't forgot there's an export/import custom waypoints button in the settings that will let you transfer those waypoints between saves (or share them with others).

Also in the settings you can turn on the glide-slope angle display for the active waypoint. :)

Ah, forgot about the export feature. But Remembered the angle-to-waypoint (glide slope) thing. (I have that all turned on anyway.)

Link to comment
Share on other sites

Sorry, I haven't had much time to look into this. From what I can tell from the files you've provided, there isn't an issue with Waypoint Manager specifically. A couple questions:

  1. If you create a new game, does Waypoint Manager work correctly there (I suspect yes, based on what I've seen).
  2. If you remove Waypoint Manager, do you still have the issues in your save (Again, I suspect yes). Specifically, the million instances of this error:

NullReferenceException: Object reference not set to an instance of an object
at FinePrint.WaypointManager.OnGUI () [0x00000] in <filename unknown>:0

I haven't fully tested it but I'm not surprised. This is happening on a new computer with files transferred straight from my old system. Plus a lot of mods I use have been updated lately, so starting a new fresh game (I can imagine) might clear this up.

If it seems important enough to you I can test it, but I'm not really wanting to start a new game right now.

Link to comment
Share on other sites

I haven't fully tested it but I'm not surprised. This is happening on a new computer with files transferred straight from my old system. Plus a lot of mods I use have been updated lately, so starting a new fresh game (I can imagine) might clear this up.

If it seems important enough to you I can test it, but I'm not really wanting to start a new game right now.

Nope, as long as you're fine with it.

Link to comment
Share on other sites

Loving this addon! Thank you.

I'm wondering if there's a way to change the font color or add a background color to the HUD display, as very often -- particularly when flying planes -- the HUD text is un-readable.

If not ... pretty please? :kiss:

Link to comment
Share on other sites

  • 1 month later...
I'm experiencing a weird issue with the version 2.4.3 for 1.0.5:

if any waypoint is active on Tracking Station Map, planets and background image (stars) are shifted to the right (leaving a black band on the left), with waypoints, orbits and PE-AP markers displaying where they are supposed to be...

... BUT if I'm using 2.4.2 (the latest build for 1.0.4) all is working as intended...
Link to comment
Share on other sites

[quote name='Araym']I'm experiencing a weird issue with the version 2.4.3 for 1.0.5:

if any waypoint is active on Tracking Station Map, planets and background image (stars) are shifted to the right (leaving a black band on the left), with waypoints, orbits and PE-AP markers displaying where they are supposed to be...

... BUT if I'm using 2.4.2 (the latest build for 1.0.4) all is working as intended...[/QUOTE]

That is extremely strange, but I thought I saw a bug report for stock 1.0.5 about something similar?

2.4.3 and 2.4.2 should be [I]exactly[/I] the same. The only reason I recompiled it was to change the version number to make CKAN happy...
Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...