Jump to content

Are There any tool to calculate Delta V for Satalite in Kerbol(sun) orbit


Recommended Posts

Need a tool to calculate the Delta V required to position in polar orbit of Kerbol(the sun). This is for a contract. The info provieded is Ap/Pe, inclination, longitude of the ascending node, argument of the Pe.

Looking for something like this http://alexmoon.github.io/ksp/ which doesn't work for me in this case.

Thanks for the help in advance.

Link to comment
Share on other sites

@Gaarst How so I tried entering the parameter as an added vessel but couldn't figure how. any advice?

I'm having problems finding the Semi-major axis and the Eccentricity and time to periapsis passage.

Edited by AlanP
Link to comment
Share on other sites

1 hour ago, AlanP said:

@Gaarst How so I tried entering the parameter as an added vessel but couldn't figure how. any advice?

I'm having problems finding the Semi-major axis and the Eccentricity and time to periapsis passage.

The semimajor axis is half the distance between the narrow, elongated ends of an ellipsis. In a fully circular orbit, this means it is equal to the radius, which is also equal to both apopasis and periapsis. In an ellipitical orbit, add periapsis and apoapsis together, then divide by 2. That is your SMA. (Always use SI base units in these kinds of math, so distances/altitudes in meters.)

Note: ordinarily, the game gives you AP and PE as altitudes above the celestial body's radius. The above math expects altitude including the body's radius. You can fix this manually by looking up the Sun's radius ingame, via selecting the Sun in map mode and calling up the info window. Add it to both AP and PE.

The eccentricity can be calculated from apoapsis and periapsis (again, adjusted for the Sun's radius), in this way: e = 2 / ((apoapsis height / periapsis height) +1). Just substitute your two given numbers and solve.

 

Finally, the "time of periapsis passage" (note that this is a calendar date, not a period of time remaining!) is used by Alexmoon's planner to determine your custom vessel's position in time and space. In other words, by telling the planner that the vessel passes periapsis on on a very specific date, you allow the planner to extrapolate the position of the vessel at any other date. However, you are targeting an empty orbit, not a vessel at a specific point in its orbit. You want the minimum energy solution for any point in this orbit. This is kind of a problem, because you don't know the value that needs to go into this field in order to produce the minimum energy solution. So have no choice but to guess.

First, you need to constrain your space of possible values. Calculate the orbital period of your target orbit like so: T = 2 x pi x SQRT( SemimajorAxis^3 / ( MassOfSun * 6.674×10^−11 )). Sun's mass must be in kg. You can look it up ingame in the same info window where you looked up its radius. The resulting orbital period T will be given in seconds. You'll need to transform this into Kerbin days, which are 6 Earth hours long. Let's hope you won't need more than 426 days**.

As an example, assume the resulting period is 300 days. After that, the orbit loops back on itself, so there is no reason to guess any date later than year 1, day 301. The format the planner wants is "year/day hh:mm:ss". So you start with "1/1 00:00:01". This one second into the first day of the first year - in other words, the moment you create a new savegame. And the highest possible value you can enter is "1/301 00:00:01". This is exactly 300 days after the creation of the savegame - the length of the orbital period in this example. Note that your current date, or the date you will launch from, does not matter here.

It does, however, matter when you start testing. Because you must test your guesses. Enter any date between the game start and the end of the orbital period you calculated, and save the custom vessel. Then, enter your current ingame date as the earliest departure in the planner, and put exactly one year after that as the latest departure (via advanced options). Then calculate the transfer. Write down the dV cost it offers you. Then edit your custom orbit, and choose a different value. Calculate the transfer again, write down the dV cost again. Did it get lower? Then move your next guess further into that direction. If it got higher, try guessing in the other direction instead. Eventually, this will lead you to a value for "time of periapsis passage" that results in something close to a minimum energy solution.

This, finally, is the dV value (and associated departure time and vector) you were looking for.

 

 

** It is most convenient for you if the orbital period is shorter than one Kerbin year, because then you don't have to deal with the fact that Kerbin's year doesn't smoothly transition. Just like Earth, there's a fraction of a day left before it rolls over. But unlike on Earth, where this fraction is close enough to an even quarter of a day to make math effortlessly easy, Kerbin has an awful fraction remaining. Like, the Kerbal calendar would be such a mess of leap days, leap hours, leap minutes and leap seconds at completely irregular intervals IRL that it would be borderline unusable. Send a thank you to your divine being of choice for Earth to have such a naturally agreeable relation between its rotation speed and its orbit :wink: Anyway, Kerbin years are 426 days and some assorted time fragments, and by ignoring said assorted time fragments, day 427 would be year 2, day 1. You probably don't need to be precise enough in your guess that the few hours you ignore by doing that matter. But if you want to be super precise, you can caluclate Kerbin's orbital period in the same way as you calculated it for your target orbit.

Edited by Streetwind
Link to comment
Share on other sites

Yeah, that's not going to be cheap.

...I actually wonder what's going to be more efficient in this case - folding the giant plane change into the ejection burn for pythagoran savings, or doing it later-on at apoapsis when you're going nice and slow. Be sure to set the planner to transfer type "optimal", so you can get a two-burn trajectory if it turns out to be cheaper.

Link to comment
Share on other sites

1 hour ago, AlanP said:

@Gaarst How so I tried entering the parameter as an added vessel but couldn't figure how. any advice?

I'm having problems finding the Semi-major axis and the Eccentricity and time to periapsis passage.

If you have the apoapsis and periapsis, finding the SMA and eccentricity is rather easy.

The semi-major axis is given by: a = (Rap + Rpe) / 2,  where Rap and Rpe are the distances to the "center" of your orbit at apoapsis and perisapsis. Note that the apoapsis height and periapsis heights that the game gives you do not include the size of the body you're orbiting (they are measured from the surface rather than from the center); to obtain the proper distances, you need to add the radius of the body you are orbiting (600,000m for Kerbin, 261,600,000m for the Sun).

From then, the eccentricity is given by: e = (Rap - Rpe) / (2a)

The time to periapsis is trickier as it would be a value for a body in your target orbit, not the orbit itself (I'm realising I was wrong saying that the calculator would be enough for this and I apologise :blush:).

Forget all the above! The launch window calculator is helpful if you want to plan an encounter with a body (ie: be at a given position at a given time to encounter your target), but in your case it is not because it will not tell you the dV required to perfectly match your target orbit so the launch window planner will be utterly useless!

 

So, now time for actually useful stuff.

What you want is to combine an inclination change with a Hohmann transfer orbit. Note that for Hohmann transfer orbits, we will be assuming that your start and final (target) orbits are circular because otherwise the maths becomes horrendous (even more than what's below). So if your target orbit is highly elliptical you're basically screwed.

The easiest way to do this is to use velocities vectors (they allow us to consider angle and magnitude tied together and avoid a lot of trouble with equations). A simple cosine rule shows that the result for a single maneuver is:

tPPayMW.png, where vi and vf are the initial and final velocities and θ is the inclination change.

Since we want to completely change orbits (ie: do a full Hohmann maneuver + inclination change) we need two of these equations, put together, giving the total delta-v required from a sun orbit:

QJmveXQ.png; let's consider the two terms separately to understand the equation:

  • the 1st term: all velocities are those at the point of the first maneuver, vi is the velocity of the initial orbit and vt,a is the velocity of the transfer orbit
  • the 2nd term: all velocities are those at the point of the second maneuver, vt,b is the velocity of the transfer orbit and vis the velocity of the final orbit
  • θ is the inclination difference. The inclination change is split in the two maneuvers with a weighing coefficient s, this is so to do the transfer more efficiently

s is found by solving a transcendental equation (which by definition you can't solve) but we can find an approximation when θ = π/2:

ycjk5Eu.png

Now, remember that we are starting from Kerbin, therefore, considering ΔvS is a bit wrong: the first maneuver will be done in Kerbin's reference frame, and the Δv required will therefore be different. Using the law of cosines (again!) we find that the excess hyperbolic velocity at Kerbin after the first maneuver is:

EEpMvvm.png, which is really familiar! Since we start in orbit of Kerbin, we can consider that vi = vK (Kerbin's orbital velocity about the Sun). v is then equal to the Δv required for our first maneuver, about the Sun. Using a bit of orbital mechanics, we can now write the  Δv for the first maneuver done starting in a circular orbit with radius r around Kerbin:

C7fTsOL.png, note that here we are using µK Kerbin's standard gravitational parameter which is different from the Sun's standard gravitational parameter denoted as µS (we will need it later).

This first maneuver must be done in the direction of Kerbin's motion (pro- or retrograde) at an angle α relative to Kerbin's equatorial plane such that:

qXiFIbz.png

Using the vis-viva equation and assuming that the target orbit is circular, we can express our different speeds (vt,a, vt,b and vf) in terms of distances to the Sun's center:

E1rr8UL.png

Finally, after replacing values and rearranging a bit, we can express the total Δv needed for our mission:

V1mVQM5.png

With:

WNrLoei.png

This isn't pretty but (hopefully) correct. Note that since we have assumed that most of our orbits were circular, the different orbital values you mentioned earlier are not important (you can fine tune your orbit after doing the bulk of the maneuver); the only important thing is that you have to do your maneuvers at the ascending or descending nodes of your target orbit, ie: eject when Kerbin crosses your destination orbit's plane.

Link to comment
Share on other sites

Please take this with the humor that is intended!

I was looking for a tool to use not looking for someone to be a tool.

 

I love your explanation. I always wanted to be a mathematician and now you have reminded me why I'm not.

Perhaps we can suggest someone in the mod forum do something with all this great math.

Thanks for the entertainment.

Link to comment
Share on other sites

19 minutes ago, AlanP said:

Please take this with the humor that is intended!

I was looking for a tool to use not looking for someone to be a tool.

 

I love your explanation. I always wanted to be a mathematician and now you have reminded me why I'm not.

Perhaps we can suggest someone in the mod forum do something with all this great math.

Thanks for the entertainment.

Yeah, I realised not long after starting that this would never end up as something one could use as is but rather as a complete mess...

I don't know of any tool or mods that can calculate transfers to specific orbits but it shouldn't be too hard to make. Or you could just write a quick program calculating the thing for you.

Just out of curiosity, what are the parameters of the orbit you have to reach?

Edited by Gaarst
Link to comment
Share on other sites

It might be advisable to wait for a launch window to Jool such that it will be crossing the plane of the particular polar orbit when you arrive, and use its gravity to throw you into a polar orbit. Then it would be a relatively low Delta-V maneuver to adjust your periapsis and apoapsis to the proper altitudes.

Link to comment
Share on other sites

@Gaarst the parameters are basically a polar orbit a little inside dres orbit on one side and a little outside dres orbit on the other.

@EpicSpaceTroll139 sound like a plan, if a little tricky to setup do you think i could do the same at dres. I've done it accidentally at the mun but never on purpose. I'll have to play around and try it out. i've got 35years

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