Jump to content

Are the initial starting positions at time zero for bodies in KSP available?


Recommended Posts

The Wiki is populated with enough information to work out *almost* all of the parameters of the ellipse equations for the orbits of planets and moons.

The one thing that's missing is the initial start positions at time zero. (i.e. when you very first start a new campaign of KSP on day zero, hour zero, minute zero, second zero, what are the positions of the bodies?

Basically what I'm trying to do is use the new KOS mod to do some autopiloting and there is no ability to find the positions of planets and moons but I just realized that I should be able to calculate that from my own "on rails" equations if I just had the initial starting positions plus the data from the KSP wiki plus the current exact time in the campaign.

Link to comment
Share on other sites

Start a new save, immediately exit, open persistence file and find the planet positions?

I wasn't aware that planets were stored in the persistence file. I'd assume that since they never come "off" rails that there'd be no need to save anything about them. Everything would just get derived from the game time. But maybe I'm wrong. When I'm back home (I'm on mobile right now) I'll give it a look.

Link to comment
Share on other sites

I wasn't aware that planets were stored in the persistence file. I'd assume that since they never come "off" rails that there'd be no need to save anything about them. Everything would just get derived from the game time. But maybe I'm wrong. When I'm back home (I'm on mobile right now) I'll give it a look.

You are actually right, planets are not store in the save file. Their position are calculated with the time store. They talked about it in the Unite conference.

Link to comment
Share on other sites

You are actually right, planets are not store in the save file. Their position are calculated with the time store. They talked about it in the Unite conference.

Hrm... Well, OP might be able to find those positions in this program's source code:

http://alexmoon.github.io/ksp/

Or, at the very least, a method of finding them.

E: and failing that, you could always write a simple plugin to log the positions. You can ask an orbit what the position is at a given UT.

Edited by regex
Link to comment
Share on other sites

All the info about the celestial bodies for KSP is in this spreadsheet (note the tabs at the bottom):

https://docs.google.com/spreadsheet/ccc?key=0AuySrGPsDeq2dFdaS19xc2lobGc2aWNXUkJsZlVtWFE#gid=0

It was compiled for version .18, but I don't believe anything has changed since then.

Thank you. This contains the information I need. Using the Mean Anomoly stat I can derive the initial position. It's a bit annoying that it's expressed in mean anomoly, as that's several steps removed from what I actually need which is angle from the parent body (true anomaly), but I can derive it from that so it gives me what I need.

Link to comment
Share on other sites

Starting positions... you mean their relative positions from the sun? angles and such?

All bodies' positions are tracked relative to their parent body. I.e. the game doesn't track where the Mun is relative to the Sun. It tracks where the Mun is relative to Kerbin, and then in turn it tracks where Kerbin is relative to the Sun.

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