Completely confused with orbiting planets maths

In summary, The conversation is about trying to create a basic animation of a spaceship traveling from one planet to another. The main issue is figuring out the correct math and equations for the animation, as the spaceship has to "curve" around the moving planets. The idea of using a Hohmann transfer orbit is discussed, but it requires knowledge of gravitational parameters which the animation does not take into account. Other suggestions, such as using a JS library or a simpler circular transfer orbit, are also mentioned. The conversation ends with a summary of how to calculate the transfer time and angular speed for the spaceship to travel from one planet to another.
  • #1
sirchick
51
0
Hey

I've been trying to make a basic animation which involves launching a spaceship from one planet to another. Both planets orbit at different rates from the star with fixed speeds.

The spaceship also has a fixed speed from start to finish.


What i don't understand is how you measure how long it takes given both the destination is moving and the spaceship has to "curve" around and not just going a completely straight line.

My animation is here if you are curious to see it in action: http://jsfiddle.net/5Mx2t/

I don't know how to actually work out the correct maths for it! I have all kinds of problems with my animation attempt, such as the ship traveling faster if the planets are closer.

Note: gravitational pull is not taken into account as I am not going quite that far with realism.

So yeah some help explaining how i would work this out would be very helpful! :)
 
Last edited:
Mathematics news on Phys.org
  • #2
In real life one of the simplest trajectories that bring a spaceships from planet A to planet B is an elliptical orbit called a Hohmann transfer orbit [1]. If you are making animations that are supposed to be realistic to some degree (guess the square star and planets also need a bit of work then), you may want to use such an orbit if you can handle the math involved.

If this is too much math for you, you should also be able to settle for something less complicated, but I suspect that even with a fairly simple straight-line, constant-speed spaceship it is going to involve some math and equation solving in any case.

Perhaps, if you can state what your goal or purpose with this animation is, people here can better point you in the right direction?

By the way, you may also be interested in using some JS library that can handle all the drawing and animation for you, like for instance KineticJS [2] or similar.

[1] http://en.wikipedia.org/wiki/Hohmann_transfer_orbit
[2] http://kineticjs.com/
 
Last edited:
  • #3
I don't like to work with JS libraries, its simple enough to animate its just working out the equation - i suck at maths ! :)

As for using Hohmann transfer orbits, what initial values must one know in order to use those equations? It seems to require gravitational parameters which i am not using, as I am not going quite that deep into realism.

The only values i know are of the orbit's and the speed of rotation, and the spaceship speed is measured as radians per second.

My goal is to create a curved path for the spaceship to travel to an inner or outer orbit at a set speed and calculate the time it would take.

I don't know if my example link is easy to understand the maths but i went wrong some where, in that as the planets are closer together the ship travels faster which is obviously incorrect.
 
Last edited:
  • #4
sirchick said:
As for using Hohmann transfer orbits, what initial values must one know in order to use those equations?

Since the transfer orbit is exactly half of a complete revolution along the ellipse and the speed at various point along this ellipse is the determined solely by the shape and size of it, the transfer time from A to B is known in advance. Or in other words, given the orbital radius of planet A and B we can determine the time T a spaceship needs to travel from A to B along a Hohmann transfer orbit. Now we want to search for a relative position of the two planets such that when we launch at time t0 from planet A, planet B will time T later be 180 degrees opposite, that is, if planet A is at longitude L0 at time t0, planet B must be at longitude L1 = L0+180° at time t1. If the angular rate of the two planets is nA and nB, planet B must at time t0 be at longitude L1 - nBT, so we want to search for a time t0 when the difference in longitude between the two planets is ΔL = L1 - nBT - L0 = 180° - nBT. In actual calculations you need to be careful about the signs of values and also treat angular values as module 360 (or 2∏) when relevant.

If you want a simpler model for animation only, you may want to use a circular transfer orbit instead, that is, a circle that is tangent to the orbit of planet A on one side of the star and planet B on the other side. If you let the spaceship travel with fixed angular rate you can easily calculate how long it takes the spaceship to move 180 degrees and you can make the same search for a relative position of the planets as mentioned above.

If you want to make a launch at a specific time and then give it an angular speed so that it intercepts B, you can calculate the transfer time T (and hence angular speed of the spaceship) from the actual value of ΔL at time of launch.
 
  • #5



Hi there,

I understand your confusion with the maths involved in orbiting planets. It can definitely be a complex topic, but with some basic principles, it can be broken down into more manageable steps.

First, it's important to understand that the speed of an object in orbit is determined by its distance from the center of mass (in this case, the star). The closer an object is to the center of mass, the faster it needs to move to maintain its orbit. This is why your animation shows the spaceship traveling faster when the planets are closer together.

To calculate the time it takes for the spaceship to travel from one planet to another, you will need to use the formula for orbital period, which is T = 2π√(a^3/GM), where T is the orbital period, a is the semi-major axis (distance from the center of mass), G is the gravitational constant, and M is the mass of the central body (in this case, the star).

To account for the curving motion of the spaceship, you will also need to use the formula for centripetal acceleration, which is a = v^2/r, where a is the centripetal acceleration, v is the velocity of the spaceship, and r is the radius of the curved path.

Combining these two formulas, you can solve for the time it takes for the spaceship to travel from one planet to another. Keep in mind that this calculation will be an approximation, as there are many other factors involved in real-life situations such as gravitational pull and the shape of the orbits.

I hope this explanation helps clarify some of your confusion. If you need further assistance, I recommend consulting with a physics or astronomy expert who can provide more specific guidance for your animation project. Best of luck!
 

1. What is the formula for calculating the orbit of a planet?

The formula for calculating the orbit of a planet is known as Kepler's Third Law, which states that the square of a planet's orbital period is proportional to the cube of its average distance from the sun.

2. How do you determine the orbital speed of a planet?

The orbital speed of a planet can be determined by dividing the circumference of its orbit by the time it takes to complete one full orbit. This can be represented by the equation v = 2πr/T, where v is the orbital speed, r is the radius of the orbit, and T is the orbital period.

3. What is the difference between orbital eccentricity and inclination?

Orbital eccentricity refers to the shape of a planet's orbit, with a higher eccentricity indicating a more elliptical orbit. On the other hand, orbital inclination refers to the angle at which a planet's orbit is tilted in relation to the plane of reference, usually the ecliptic plane.

4. How do you calculate the gravitational pull between two orbiting bodies?

The gravitational pull between two orbiting bodies can be calculated using Newton's Law of Universal Gravitation, which states that the force of gravity is directly proportional to the product of the masses of the two objects and inversely proportional to the square of the distance between them.

5. Can the orbit of a planet change over time?

Yes, the orbit of a planet can change over time due to various factors such as interactions with other planets, gravitational pull from other objects, and changes in the planet's mass or velocity.

Similar threads

  • Sci-Fi Writing and World Building
Replies
18
Views
1K
  • Sci-Fi Writing and World Building
Replies
1
Views
935
  • Astronomy and Astrophysics
Replies
1
Views
413
  • Special and General Relativity
Replies
14
Views
691
  • Special and General Relativity
3
Replies
98
Views
2K
  • Sci-Fi Writing and World Building
Replies
13
Views
1K
  • Astronomy and Astrophysics
Replies
17
Views
2K
  • Sci-Fi Writing and World Building
Replies
0
Views
739
  • Introductory Physics Homework Help
Replies
1
Views
829
  • Sci-Fi Writing and World Building
Replies
9
Views
2K
Back
Top