Orbital simulation - Calculate object position over time in a 2d plane

In summary, the conversation discusses using various methods to simulate a rocket in orbit, including calculating distance and force, using inverse of tan for angle, and calculating velocity and position. However, there seems to be an issue with the method being used and suggestions are given to try different methods such as Verlet integration or Leapfrog method.
  • #1
ryanie
9
0
Hi

Im busy creating an application to simulation a rocket in orbit. I am having trouble as the results I am getting are incorrect. Could someone please check if I am using the correct method as stated below.

Everything works on a 2d plane, and has a x and y coordinate and a x and y velocity and a mass
coordinates are in meters and the mass is in kg.

Method:
Calculate the distance between the rocket and the planet using the distance formula
distance = sqrt[ ( x2 - x1)^2 - (y2 - y1)^2 ]

calculate the force Earth exerts on the rocket using the The Universal Law of Gravitation where G is the Gravitational constant m is the mass of an object and r is the distance between them
force = (G*m1*m2) / distance^2

Using the inverse of tan get the angle to calculate the the x and y components ( I know for a fact I am getting this is correct, its a bit tricky to explain) I calculate the angle for each quadrant going from the x-axis to the y axis

Calculate the acceleration of the rocket
acceleration = force / mass

Calculate velocity change over timer ( this is usually 0.01 seconds )
deltaVelocity = acceleration * time

Calculate the x velocity component
deltaXvelocity = deltaVelocity * cos(angle)

Calculate the y velocity component
deltaYvelocity = deltaVelocity * sin(angle)

Calculate the new x velocity
newXvelocity = currentXvelocity + deltaXvelocity

Calculate the new y velocity
newYvelocity = currentYvelocity + deltaYvelocity

set the new position of the rocket
newXposition = currentXposition + ( newXvelocity * time )
newYposition = currentYposition + ( newYvelocity * time )

Something is wrong with this method and i do know what.
I know for a fact that a an object in orbit round about 420km traveling at round about 7700 m/s should be in a roughly circular orbit and one that has a high eccentricity.

Currently with the results I am getting to obtain a roughly circular orbit at 420km i need to have a velocity of round about 5500m/s

Thanks for taking the time
 
Physics news on Phys.org
  • #2

1. How does orbital simulation work?

Orbital simulation uses mathematical equations and programming algorithms to calculate the position of an object in a 2D plane over time. It takes into account the object's mass, velocity, and the gravitational pull of other objects in the simulation.

2. What is the purpose of orbital simulation?

The purpose of orbital simulation is to accurately predict and visualize the motion of objects in space. It can be used to study the behavior of planets, satellites, and other celestial bodies, and to plan and execute space missions.

3. What factors affect the accuracy of orbital simulation?

The accuracy of orbital simulation depends on the precision of the initial data input, such as the object's mass, velocity, and gravitational forces. External factors such as atmospheric drag and other forces can also affect the accuracy of the simulation.

4. Can orbital simulation be used for any type of orbit?

Yes, orbital simulation can be used for any type of orbit, whether it is circular, elliptical, or parabolic. The equations and algorithms used in the simulation can be adjusted to accommodate different types of orbits.

5. How is orbital simulation used in real-world applications?

Orbital simulation is used in a variety of real-world applications, such as space exploration, satellite communication and navigation, and asteroid tracking. It is also used in research and education to study the behavior of objects in space.

Similar threads

Replies
14
Views
1K
Replies
2
Views
760
  • Mechanics
Replies
6
Views
910
Replies
2
Views
773
  • Mechanics
Replies
28
Views
3K
Replies
14
Views
1K
Replies
19
Views
1K
  • Classical Physics
Replies
7
Views
827
Replies
4
Views
865
Back
Top