Jump to content

How to Calculate Correct delta-V for Manoeuvre Node


Recommended Posts

I am attempting to calculate a the required dV for a circularisation burn using kOS. I am calculating the required dV for both a prograde burn, as well as the required dV to achieve the desired inclination to cancel out the rotation.

For the prograde burn I am doing:

v_old = sqrt(body:mu * (2/(orbitAlt + body:radius) - 2/(ship:periapsis + orbitAlt + 2*body:radius)))
v_new = sqrt(body:mu * (2/(orbAlt + body:radius) - 2/(2*orbAlt + 2*body:radius)))
dv_prograde = v_new - v_old

For the normal burn I am doing:

i_deg = targetInclination - ship:orbit:inclination.
dv_normal = 2 * orbitalVelocity * sin(i_deg / 2).

I then add the two together to get overall dv required. I then create a manoeuvre node using these values:

burnNode = node(time:seconds + eta:apoapsis, 0, dv_normal, dv_prograde).

This produces a manoeuvre node orbit on the map view which has the correct inclination, but the final apoapsis is way too high ( aiming for 75km circular, get 75km periapsis and 161.268km apoapsis).

I am currently getting round this in my script by checking for ship:periapsis >= orbAlt, but I would really like to know what is going wrong!

I assume that I am missing some magic around adding these two delta-V values together, so if anyone knows why this is and how to fix it I would be grateful!

Edited by Benzyme
Link to comment
Share on other sites

1 hour ago, Benzyme said:

I assume that I am missing some magic around adding these two delta-V values together

I think the problem is that your normal burn isn't simply a pure normal burn.  For example, in stock KSP:  Put yourself in LKO.  Drop a maneuver node.  Grab the :normal: handle and drag it to give it some magnitude.  Now look at your projected Ap, post-node.  It's bigger than the original.  In other words, doing nothing but dragging on :normal:, with no :prograde: component at all, you still raised your Ap.

That's because as soon as the :normal: component has any magnitude at all, it's no longer pure :normal:, because as soon as your inclination has changed a bit, the ship's path is no longer perpendicular to the original :normal: component, and therefore that original :normal: component actually has a certain amount of :prograde: component in the new trajectory.

Here's how it shows up in the math:

  • Your ship has some original velocity, v.  This is a vector quantity with (x,y,z) components.  It has a total magnitude |v|, equal to the Pythagorean sum of its three components.
  • Usually folks deal with vectors in terms of X, Y, and Z components, e.g. v as the vector sum of vx, vy, vz.  But we can use any frame of reference we like, so let's use the current direction vector as a reference, and instead refer to v as the vector sum of v:prograde:, v:radial:, and v:normal: .  So, the magnitude of your initial velocity can be found as:  |v1| = sqrt(v:prograde:2 + v:radial:2 + v:normal:2)
    • Yes, I know that obviously the :prograde: component is the only nonzero one here, and |v1| simply equals v:prograde:.  Bear with me here.  ;)
  • Now let's look at what you're doing.  You're adding a dv:prograde: and a dv:normal:  into the mix.  So, after the burn, your new velocity magnitude uses (v:prograde: + dv:prograde:) and (v:normal: + dv:normal:) for those two components.
  • Therefore, the magnitude of your new velocity is:  |v2| = sqrt((v:prograde: + dv:prograde:)2+ v:radial:2 + (v:normal: + dv:normal:)2)
  • If you crank through the algebra, you'll find that the actual |v2| is therefore bigger than simply |v1| + dv:prograde:.

And that's why your new Ap is higher than you wanted it to be.

Link to comment
Share on other sites

What Snark said for why it doesn't work.

I had a lot of trouble getting inclination corrections right. My interim solution involved the following:

LOCAL dv_pro IS -1 * ABS(dv * SIN(ang / 2)).
LOCAL dv_norm IS dv * COS(ang / 2).

Note that doesn't work accurately if you're burning at a point in your orbit where your flight angle is non-zero (as you need a radial component to the burn too). That's not a problem in this specific case of burning at apoapsis (flight angle is 0 at an apsis or if eccentricity is 0).

My current implementation is more complicated - I calculate the desired final velocity vector, then the difference from the initial velocity vector at the node... then convert that difference vector into pro/radial/normal components.

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