Simulating orbit trajectory based on position and velocity

In summary: No, this is incorrect. You should multiply the result with R_1.Yes, multiplying by R_1 should give you the result of 1/R.
  • #1
AlenC
7
0
Hi!

I hope I'm posting in the correct section. I found this very similar topic in this forum: https://www.physicsforums.com/threads/orbital-ellipse.482713/

Aside from very helpful formula for calculating semi-major axis, the question was left unanswered.

I have a working simulation of orbital motion of satellites and spaceships, but I'd like to visually represent this flight path based on distance from planet's center of mass and satellite's velocity.

I assume the best way to do this is by drawing an ellipse, for which I need to know semi-major axis, semi-minor axis and eccentricity or focus. What would be the best process to do this? I don't mind doing some research and reading myself, but I'd like to understand at least the sequence of calculations I need to do.

Thanks for help in advance.

Edit: I forgot to mention that I'm simulating everything in two dimensional plane.
 
Last edited:
Astronomy news on Phys.org
  • #2
Start with this:
Position in two dimensional plane is determined by single variable - distance. Right?
And for velocity, you need two variables: radial and tangential velocity. Correct?
 
  • Like
Likes AlenC
  • #3
snorkack said:
Start with this:
Position in two dimensional plane is determined by single variable - distance. Right?
And for velocity, you need two variables: radial and tangential velocity. Correct?

Yes. I know these values. What can I do next based on this?
 
  • #4
Calling the velocities Vr and Vt, we can note that kinetic energy Ek=mv2/2=m(Vr2+Vt2)/2 - at every point of orbit.
 
  • Like
Likes AlenC
  • #5
Ok, I'm still with you.
 
  • #6
The second constraint is that the potential energy Ep=-MmG/R.
Now, conservation of energy means that the total energy
E=m[(Vr2+Vt2)/2-MG/R]
is constant. If it´s positive, then the orbit is hyperbolic and the satellite escapes; if it is zero then the orbit is parabolic and the satellite also escapes..
If the energy is negative then the orbit is elliptical or circular.
Now, the tangential velocity has another constraint: second law of Kepler:
VtR must be constant.
Therefore Vt, and therefore also Vt2 cannot go to zero.
 
  • Like
Likes AlenC
  • #7
So: E/m=(Vr2+Vt2)/2-MG/R
Also Vt=(L/m)/R, for every R.
Thus: E/m=Vr2/2+[(L/m)2/2]/R2-MG/R
rearranging, I get
Vr2/2=E/m+MG/R-[(L/m)2/2]/R2
multiplying by 2
Vr2=2(E/m)+2MG/R-(L/m)2/R2
Observe that this is a quadratic equation for (1/R).
 
Last edited:
  • Like
Likes AlenC
  • #8
I'll need some time to process this, but I think I understand the general meaning: I can calculate energy from velocity and distance.

Would you just mind explaining what M, L and R stand for?
 
  • #9
Now, Vr2 as a square cannot be negative. Whereas the member -(L/M)2/R2 is negative and can get arbitrarily small (?) as 1/R increases.
Therefore, you can solve the quadratic equation for Vr2=0, and get the two R values where Vr2=0.
These R values are the distances to apsides.
Major axis of ellipse is Rmax+Rmin.
Eccentricity is (Rmax-Rmin)/(Rmax+Rmin)
 
  • Like
Likes AlenC
  • #10
AlenC said:
Would you just mind explaining what M, L and R stand for?
M is the mass of the planet.
L is the angular momentum of the satellite. I preferred to use the expression (L/m), where m is the mass of satellite.
R is the distance between planet and satellite.
 
  • Like
Likes AlenC
  • #11
I tried using these equations in my simulation, but I'm getting strange results. Either too big or too small. Would you mind checking my numbers?

I first tried calculating total energy:

E = 10000000kg*( (7563.49ms²/2) - ((6E+24kg*6.67408E-11)/7000000m) )
Mass of the planet is approximate. I didn't include radial velocity, because at this point is zero. Tangential velocity is calculated by the simulation for a circular orbit and it works correctly (as far as I can tell). If I boost this value manually, orbit becomes an ellipse and satellite returns to its starting position.

Result calculated by the computer is: -286032000000000
But this is the result I got from windows calculator: -57206399999713968094999500

I'm obviously making a mistake somewhere...
 
  • #12
AlenC said:
E = 10000000kg*( (7563.49ms²/2) - ((6E+24kg*6.67408E-11)/7000000m) )
I get:
Vt2/2=+2,8E+7
GM=4E+14
GM/R=-5,7E+7
Your Windows calculator looks like you´ve put too many zeros to the GM/R part.
Yes: if you increase tangential speed from a circular orbit, the point becomes a perigee. If the speed remains below the escape speed, the satellite will acquire an elliptical orbit and return to the point of origin.
 
  • Like
Likes AlenC
  • #13
I checked the results coming out of program and they match with your calculations and my original value of E: -286032000000000

So now comes the difficult part where I'm probably making a mistake. If I understood correctly, next I have to solve quadratic equation with two results:
Vr2=2(E/m)+2MG/R-(L/m)2/R2

I used this formula:

R_1={ -B + [ sqrt(B²- (4AC) ) ] } / 2 * A
R_2={ -B - [ sqrt(B²- (4AC) ) ] } / 2 * A

I identified these elements from the formula you provided:

A = (L/m)²*-1 (should this be negative?)
B = 2MG
C = 2*(E/m)

Am I doing this correctly? Also, if I understand what you said, the result is actually 1/R, so I should multiply the result with itself?
 
  • #14
AlenC said:
So now comes the difficult part where I'm probably making a mistake. If I understood correctly, next I have to solve quadratic equation with two results:
Vr2=2(E/m)+2MG/R-(L/m)2/R2
Yes - solve it for Vr=0
AlenC said:
I used this formula:

R_1={ -B + [ sqrt(B²- (4AC) ) ] } / 2 * A
R_2={ -B - [ sqrt(B²- (4AC) ) ] } / 2 * A

I identified these elements from the formula you provided:

A = (L/m)²*-1 (should this be negative?)
Yes, negative - so no -1 there
A=-(L/m)2
AlenC said:
B = 2MG
C = 2*(E/m)

Am I doing this correctly? Also, if I understand what you said, the result is actually 1/R, so I should multiply the result with itself?
No. You need to take inverse - divide 1 by 1/R
As it happens, the expression you need to take inverse of is already expressed as a ratio, so that´s easy:
1/R1=[-B+sqrt(B2-4AC)]/2A
therefore
R1=2A/[-B+sqrt(B2-4AC)]
 
  • Like
Likes AlenC
  • #15
Thank you so much, it's finally working:
http://image.prntscr.com/image/60331e210381452ab979dd775141e760.png
 

1. How do we determine the position and velocity of an object in orbit?

The position and velocity of an object in orbit are determined by using mathematical equations and models, such as Kepler's laws of planetary motion, to calculate the object's position and velocity at any given time. This requires inputting data such as the object's mass, the mass of the body it is orbiting, and the distance between them.

2. What factors affect the trajectory of an orbit?

The trajectory of an orbit is affected by factors such as the mass and distance of the objects involved, the shape and size of the orbit, and external forces such as gravitational pull from other objects.

3. How accurate are simulations of orbit trajectories?

The accuracy of simulations of orbit trajectories depends on the quality of the data and equations used, as well as any simplifications or assumptions made. However, with precise data and advanced models, simulations can closely match real-life observations.

4. Can we simulate the orbit trajectory of any object?

In theory, the orbit trajectory of any object can be simulated as long as enough information about the object's position, velocity, and the forces acting on it is known. However, the complexity and accuracy of the simulation may vary depending on the object's characteristics and the data available.

5. How can simulations of orbit trajectories be useful in scientific research?

Simulations of orbit trajectories can be used in various fields of scientific research, such as astronomy, astrodynamics, and space exploration. They can help us understand the behavior of objects in space, predict and plan future missions, and study the effects of different factors on orbit trajectories.

Similar threads

  • Astronomy and Astrophysics
Replies
1
Views
2K
  • Astronomy and Astrophysics
Replies
3
Views
1K
  • Mechanics
Replies
6
Views
1K
Replies
4
Views
2K
  • Astronomy and Astrophysics
Replies
1
Views
2K
  • Engineering and Comp Sci Homework Help
Replies
2
Views
1K
  • Astronomy and Astrophysics
Replies
1
Views
1K
  • Astronomy and Astrophysics
Replies
5
Views
4K
  • Astronomy and Astrophysics
Replies
3
Views
3K
  • Electrical Engineering
Replies
2
Views
422
Back
Top