1. Limited time only! Sign up for a free 30min personal tutor trial with Chegg Tutors
    Dismiss Notice
Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Creating an equation of a 2D path of an orbit

  1. Aug 11, 2014 #1
    Hi all

    This question came up to me when I was playing a game called KSP (a space sim game):

    Given an initial velocity and starting altitude, how do you create a 2D Cartesian equation of the orbit of that projectile around earth?

    For example if I told you a projectile is travelling at a speed of 8000 m/s, an altitude of 350km and tangential to the surface of the earth, how do you create an 2D Cartesian equation of the orbit?

    Also, assume (0,0) is the center of the earth.

    So, the equation of the earth would simply be

    [itex]y = \sqrt{6378.1^2 - x^2}[/itex]

    (The radius of the earth is 6378.1 km)

    Any input would be appreciated. Thanks!
    Last edited: Aug 11, 2014
  2. jcsd
  3. Aug 11, 2014 #2


    User Avatar
    Staff Emeritus
    Science Advisor
    Homework Helper

    What is 'x' supposed to represent?

    Where is the altitude considered?

    The velocity of the projectile in orbit?

    What do you mean by 'the equation of the earth'?
  4. Aug 11, 2014 #3
    Sorry for being unclear.

    "x" is supposed to represent the path of the orbit of the projectile.

    The altitude is basically the distance from the surface of the earth to the object.

    By 'the equation of the earth' I meant a cross section of the earth, projected onto a 2D Cartesian plane.

    The velocity is the instantaneous velocity of the object at that moment. For example, if a satellite orbits the earth at an altitude of 350 km, its velocity must equal:

    [itex]v = \sqrt{Gm/r}[/itex] ; where G is the gravitational constant, r is the distance from the center of the earth to the object, and m is the mass of the earth.

    for the orbit to be circular. In this case, the velocity of the satellite is approximately 7.7 km/s and it will be always be constant.

    Since the satellite will be perfectly circular, the equation of the path of the satellite in this case will be:


    However, the equation will become much more complex if the satellite is at an altitude of 350km but is traveling faster than the orbital velocity (>7.7 km/s) since it will begin to follow an elliptical path.

    I have attempted this before but failed to find a solution so I would appreciate it if you guys could enlighten me on how to solve this problem.

    Update: Here's a rough diagram I drew that will hopefully clarify it even further.

    Basically, find the equation of the blue dotted line, given that the velocity of the satellite is 8 km/s (tangeant to surface) when it is exactly at 350 km above the surface of the earth.

    Last edited: Aug 11, 2014
  5. Aug 12, 2014 #4

    Is my explanation above clear enough? Do you have any question about what I posted above?

    Any suggestion/input will be highly appreciated!
  6. Aug 12, 2014 #5
    If you haven't looked at these, please do:

    I'll be back after lunch and look at this. You orbit will be an ellipse and you're starting at the perigee - along the major axis of the ellipse.
    There's a way to get the apogee altitude from the perigee altitude and velocity - but you need to work through a couple of equations and a quadratic.
  7. Aug 12, 2014 #6
    So, let's look at your 8Km/s example.
    For the Earth, the standard gravitational parameter is [itex]\mu_{e} = 398600.4418 Km^{3}/s^{2}[/itex].
    So the escape speed at radius is [itex]v_{e}(r) = \sqrt{2\mu_{e}/r}[/itex].
    At 350Km MSL, it will be [itex]v_{e}(6378.1+350Km) = \sqrt{2\cdot 398600.4418/6728.1} = 10.885Km/s[/itex].

    If we were at escape speed, we would be following a parabolic path. Since we are slower than escape speed, we are in an elliptical orbit with the Earth center. The major axis of the ellipse will pass through our space craft and the Earth center, and the Earth center will be at one focus point of the ellipse.

    The speed for a circular orbit at that altitude is: [itex]v_{o}(r) = \sqrt{\mu_{e}/r} = \sqrt{398600.4418/6728.1} = 7.697Km/s[/itex]. Just as you computed.

    So we are faster than a circular orbit, slower than escape speed, and traveling horizontally. So we are at perigee and the Earth is at the near focus point of the ellipse that we are following.

    There will be two things that don't change during our orbit:
    1) The amount of energy required to reach escape velocity will always be the same. So [itex]v_{e}(r)^2 - v^2[/itex] will be constant.
    2) Thanks to Kepler, we know that we will always be sweeping out area with our orbit at a constant rate. So [itex]v_{t}r[/itex] will be constant, where [itex]v_{t}[/itex] is the tangential component of our velocity.

    At apogee and perigee, our tangential velocity will equal our orbital velocity. So using subscript "a" for apogee and "p" for perigee:
    3) [itex]v_{e}(r_{a})^2 - v_{a}^2 = v_{e}(r_{p})^2 - v_{p}^2[/itex]
    4) [itex]v_{a}r_{a} = v_{p}r_{p}[/itex]

    Working with equation 3:
    5) [itex]2\mu_{e}/r_{a} - v_{a}^2 = 2\mu_{e}/r_{p} - v_{p}^2[/itex]
    6) [itex]2\mu_{e}(1/r_{p} - 1/r_{a}) = v_{p}^2 - v_{a}^2[/itex]
    7) [itex]2\mu_{e}(r_{a}-r_{p}) = r_{p}r_{a}v_{p}^2 - r_{p}r_{a}v_{a}^2[/itex]

    We're looking to solve [itex]r_{a}[/itex] in terms of [itex]r_{p}[/itex] and [itex]v_{p}[/itex], so we need to get rid of the [itex]v_{a}[/itex]'s.
    We do this by using equation 4 to substitute in equation 7.
    8) [itex]2\mu_{e}(r_{a}-r_{p}) = r_{p}r_{a}v_{p}^2 - r_{p}^2v_{p}v_{a}[/itex]
    9) [itex]2\mu_{e}(r_{a}-r_{p}) = r_{p}v_{p}(r_{a}v_{p} - r_{p}v_{a})[/itex]

    Multiply through by [itex]r_{a}[/itex]:
    10) [itex]2\mu_{e}r_{a}(r_{a}-r_{p}) = r_{p}v_{p}(r_{a}r_{a}v_{p} - r_{a}r_{p}v_{a})[/itex]

    Using equation 4 we can substitute in equation 10.
    11) [itex]2\mu_{e}(r_{a}^2-r_{p}r_{a}) = r_{p}v_{p}(v_{p}r_{a}^2 - r_{p}^2v_{p})[/itex]
    12) [itex](2\mu_{e}-r_{p}v_{p}^2)r_{a}^2 - (2\mu_{e}r_{p})r_{a} + (r_{p}^3v_{p}^2) = 0[/itex]

    In that last equation is a quadratic of [itex]r_{a}[/itex]. Solving that messy quadratic, we actually get both the apogee and perigee. Here's the apogee:
    13) [itex]r_{a} = r_{p}(r_{p}v_{p}^2)/(2\mu_{e}-(r_{p}v_{p}^2))[/itex]

    For our case:
    [itex](r_{p}v_{p}^2) = 6728.1\cdot8^2 = 430598.4[/itex]
    [itex]r_{a} = r_{p}(430598.4/(2\cdot398600.4-430598.4)) = 1.174565r_{p} = 7902.6Km[/itex]

    The MSL apogee would be 7902.6 - 6378.1 = 1519.5Km.
  8. Aug 12, 2014 #7


    User Avatar
    Science Advisor
    Homework Helper
    Gold Member

Share this great discussion with others via Reddit, Google+, Twitter, or Facebook