Jump to content

GPS, MechJeb, Stock Coodinate system all disagreeing


Recommended Posts

There are several issues with the code that displays latitude and longitude on the map screen in KSP. Youve run into the most-commonly reported one; That the game doesn't properly rectify the longitudes into the 180°E to 180°W range. Mechjeb and and Figaro do. That said, this bug's been in the game long enough that, if you /were/ to put in the improperly-rectified values into, say, Mechjeb's Landing Autoplilot, MJ will put you down on the appropriate site without problems.... As long as you don't run into one of the /other/ bugs in how the map screen displays longitude and latitude.

Link to comment
Share on other sites

I don't know Figaro, so I don't know if it can translate the values directly without you having to convert the values.

If you have to convert, though, you'd need to take the longitude value as a number, and consider it positive if it's East, and Negative if it's west.

If the value is more than 180° after doing that, subtract 360° repeatedly until it's between -180° and 180°.

If the value is less than -180°, similarly add 360° repeatedly until it's between between -180° and 180°.

Then convert back to East and West longitude using convention mentioned above.

Example: 217°17'8" E

+(217°17'8") - 360° = - (142° 42" 52")

Therefore, the corresponding rectified longitude is 142° 42" 52" W.

Edited by maltesh
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...