Jump to content

Plotting an orbit


Sam Kennedy

Recommended Posts

I watched Scott Manley's videos on doing orbital mechanics by hand (

), and I found it very interesting, especially how you could calculate the velocity at a specific radius of the orbit. My question is, given the Apoapsis, Periapsis (or Semi-Major Axis and eccentricity), is it possible to calculate the radius, r, at a specific angle in the orbit?

Here is a brilliant diagram I spent many hours creating using very expensive image editing software:

263cv7m.jpg

How would I go about calculating and plotting the radius and ellipse given the other orbital elements?

Thank You :)

Link to comment
Share on other sites

Thank you, I found the answer to my question, with this formula:

ca3ef71179cb1500f1e96dbde349fd33.png

If anyone else happens to be interested, you can play around plotting orbits with www.fooplot.com, I entered (8000*(1-(0.6^2)))/(1 + (0.6*cos(theta))) where 8000 is the semi-major axis and 0.6 is the eccentricity, it's interesting to see what happens as the eccentricity changes.

Link to comment
Share on other sites

I watched Scott Manley's videos on doing orbital mechanics by hand (
), and I found it very interesting, especially how you could calculate the velocity at a specific radius of the orbit. My question is, given the Apoapsis, Periapsis (or Semi-Major Axis and eccentricity), is it possible to calculate the radius, r, at a specific angle in the orbit?

Here is a brilliant diagram I spent many hours creating using very expensive image editing software:

http://i61.tinypic.com/263cv7m.jpg

How would I go about calculating and plotting the radius and ellipse given the other orbital elements?

Thank You :)

Your equations are wrong

2a = diameter(central body) + Apo + Pe

e =( Apo - Pe)/ 2a

b = a (1-e2)0.5

https://en.m.wikipedia.org/wiki/Semi-minor_axis

https://en.m.wikipedia.org/wiki/Kepler_laws#First_law

r is defined in second link.

I should point out that KSP uses SOI. These are defined by a point mass at the center of the central body, in our solar system the systems center is not the center if the sun.

Altitude = r - Central body surface radius

Edited by PB666
Link to comment
Share on other sites

Thank you, I found the answer to my question, with this formula

Yup. Just keep in mind that theta doesn't change uniformly with time. Theta is what's known as true anomaly. The parameter that changes uniformly with time is the mean anomaly. So if you want to plot actual position of the craft as a function of time, make sure to look up how to convert from mean anomaly to true anomaly.

But if all you want is the shape of the orbit, that formula is all you need. Just plot theta from 0 to 2 pi.

Link to comment
Share on other sites

Sorry to bump an almost week old thread, I thought it would be better than starting a new thread.

I wrote a piece of code to output the eccentric anomaly (calculated from mean anomaly) and true anomaly against time. I was wondering if it looked correct? Green line is true anomaly, blue line is eccentric anomaly and black line is the central body.

Here is the image:

rj8v7.gifvia Imgflip GIF Maker

Link to comment
Share on other sites

I have no idea what you are even trying to plot. Just do normal Cartesian plots of M(t), E(t), and θ(t), and I should be able to tell if they look right. Then your 2D plot of trajectory should simply be {r(θ(t)) cos(θ(t) + É), r(θ(t)) cos(θ(t) + É)} for t in [0, T], where r(θ) is given by equation you've posted above and É is the argument of periapsis.

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