Jump to content

Perfect Satellite Orbits (Or, how to Hyper-Edit without Hyper-Edit)


Taki117

Recommended Posts

"How do I get my satellites in a perfect orbit?" This question comes up quite a bit and here's the answer.

Step1: Quicksave (F5) this will make the following process easier because you don't have to restart your game to find out if the following worked. Also you might want to make a backup of your quicksave, in case things go horribly wrong.

Step 2: Find the following bits of code.

cMod = -1
ORBIT
{
SMA = 805260.659353304
ECC = 0.161993880590562
INC = 2.57845212793017
LPE = 175.907355550871
LAN = 205.240397786067
MNA = 2.55585718334257
EPH = 1889.51091796878
REF = 1
}

SMA is the Semi-Major axis of your orbit. This determines your orbital altitude and the values for any major body can be found here

ECC is the Eccentricity of your orbit, if you want a perfectly circular orbit set this to 0.

INC is the Orbital Inclination, for an equitorial orbit set this to 0 to travel with planet rotation or 180 to travel against planet rotation. For polar orbit set to 90 or 270.

LPE is the Longitude of the Periapsis, if you are trying to make a satellite network with all your satellites an equal distance apart this should be the result of the following equation.

LPE = 360/# of satellites * satellite number(Beginning at 0)

For example, we want 4 satellites to be equally spaced, so we take 360/4*0 for the first satellite in our group. Then 360/4*1 for the next and so on until we run out of satellites.

LAN is the Longitude of the ascending node, this really has no bearing on anything if you are trying to make a perfectly circular orbit, so you can either ignore it or set it to 0.

MNA is the Mean Anomaly. Basically it's how fast your satellite is going. You want this to be the same for all your satellites.

EPH is the Epoch, or the time the readings were taking. This should equal UT at the beginning of the file.

REF is the Reference. This is the celestial body you are orbiting.

Step 3: Save your work, then go into KSP and Quickload.

Step 4: Profit!

Note: DO NOT CONTROL OR PASS WITHIN PHYSICS RANGE!!! if you do so it will update that satellite and it will be thrown out of orbit.

More Information here, and here

Link to comment
Share on other sites

  • 2 weeks later...

I just wanted to point out something about the note at the end, about controlling or passing within physics range.

I tested this out to see what would actually happen. I decided to decommission my current comms array and send up a new one. After putting the new one in place, I switched to each old sat and did a deorbit burn. None of them were thrown out of orbit, they maintained their perfect setup for at least 10 minutes while I performed deorbit maneuvers.

Link to comment
Share on other sites

When you switch to a ship, the game converts the orbit information in the save into a different format for use while flying. When you leave the ship, it converts the flying information back into orbit information. There is a loss in precision when it does this, so your orbit changes slightly every time you do it. Same happens for passing into physics range.

It's not by a lot, but over months and years, it will start to show.

Link to comment
Share on other sites

LPE is the Longitude of the Periapsis, if you are trying to make a satellite network with all your satellites an equal distance apart this should be the result of the following equation.

LPE = 360/# of satellites * satellite number(Beginning at 0)

For example, we want 4 satellites to be equally spaced, so we take 360/4*0 for the first satellite in our group. Then 360/4*1 for the next and so on until we run out of satellites.

MNA is the Mean Anomaly. Basically it's how fast your satellite is going. You want this to be the same for all your satellites.

compare to

Meaning the MNA "counts" from the PE?

So setting the LPE as explained above and the MNA to 0 lets every satellite start at its PE?

I presume MNA ranges from 0 to almost 1?

Link to comment
Share on other sites

  • 2 weeks later...
compare to

Meaning the MNA "counts" from the PE?

So setting the LPE as explained above and the MNA to 0 lets every satellite start at its PE?

I presume MNA ranges from 0 to almost 1?

Not in KSP.

In the KSP save files the MNA IS MNA : Mean anomaly at epoch – defines the position of the orbiting body along the ellipse at a specific time.

Say you want to have 4 satellites in the same orbit, (given all other orbit information is the same) MNA for each would need to be different so they don't collide with each other when you load the game save.

Mean anomaly on wikipedia, first paragraph addresses the range of the MNA - The mean anomaly increases uniformly from 0 to 2\pi radians during each orbit.

Link to comment
Share on other sites

For some reason this doesn't work for me. I put up 2 sats set it up as below. However, they end up 45 degrees apart instead of 180. What am I doing wrong?

ORBIT Sat 1

{

SMA = 2000000

ECC = 0

INC = 0

LPE = 0

LAN = 0

MNA = 2.5

EPH = 1889.51091796878

REF = 1

}

ORBIT 2

{

SMA = 2000000

ECC = 0

INC = 0

LPE = 180

LAN = 0

MNA = 2.5

EPH = 1889.51091796878

REF = 1

}

Link to comment
Share on other sites

For some reason this doesn't work for me. I put up 2 sats set it up as below. However, they end up 45 degrees apart instead of 180. What am I doing wrong?

The information about MNA in the OP is wrong. To fix your problem, set the LPE of both satellites to the same value (0), then set the MNA for the first one to 0, for the other one to Pi. Leave the rest as you already have.


ORBIT 1
{
...
LPE = 0
MNA = 0
...
}

ORBIT 2
{
...
LPE = 0
MNA = 3.1415926535897932384626433832795
...
}

Link to comment
Share on other sites

Hi Scottiths,

LPE is the longitude of periapsis, it defines the position of the periapsis as an angle relative to a reference direction. I don't know how it is internally handled in KSP, but for a perfectly circular orbit (ECC = 0), it doesn't make sense to talk about any periapsis (or apoapsis). I recommend you leave LPE = 0.

As Fett2oo5 has pointed out,

the MNA IS MNA : Mean anomaly at epoch – defines the position of the orbiting body along the ellipse at a specific time.

where the epoch (time elapsed since a time reference, the time t = 0) is defined by EPH. MNA is not "how fast your satellite is going". To set up satellites 180 degrees apart, you can set one of the MNA = 0 and another to MNA = 3.1416 (MNA is expressed in radians, and 180 degrees is pi radians), and make sure that the two orbits have the same EPH.

EDITED: got beaten! DAT Pi though :P

Link to comment
Share on other sites

Oh, ok. Thanks :)

If I wanted to have 4 (On bigger planets like Eve and Jool) what should I set MNA to for them?

The size of the body you are orbiting doesn't matter (speaking relative to the MNA). As, (in KSP) the MNA is the position of the object in it's oribit as relative to the Epoch.

So the same orbit settings you have for Kerbin will work for any other body, EXCEPT for the SMA "altitude" (I use altitude loosely here.)

Link to comment
Share on other sites

  • 2 years later...

sry im a noob at this game what code snipit would i punch in for 4 satellites 90deg apart and at an altitude of 1000000 and what are the values of the pi like how many digits of pi should i divide multiply by

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