Two problems , both with this sqrtshipbodymu orbitaltitude . The first r should be the radius of the orbitelipse the semimajor axis . So not just the altitude , but the distance from the center of the orbit aswell , which is the center of the planet for circular orbits , and at some other point for any other kind of orbit . ~~~~ On top of that , what you are trying to figure out is the change in velocity needed . sqrtshipbodymu o r bitaltitudeshipbodyradius gives you only your speed at apoapsis in a circular orbit . You also need to calculate what your velocity will be at apoapsis in your current orbit . Then , you have to subtract your 2 nd calculation from the 1 st , and that is what you set the delta v as . vivaequationWritten in very long form SET SUBV TO SQRTSHIPOBTBODYMU 2 S HIPAPOAPSISShipBodyRadius 1 S H I P A P O A P S I S S h i p B o d y R a d i u s S H IPPERIAPSISShipBodyRadius 2 . SET SUBV 2 TO SQRTSHIPOBTBODYMU 2 S HIPAPOAPSISShipBodyRadius 1 S HIPAPOAPSISShipBodyRadius . SET BRN TO SUBV 2 SUBV .