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

AI Thread Summary
The discussion focuses on issues with simulating a rocket's orbit in a 2D plane, where the user is experiencing incorrect results in velocity and position calculations. The method outlined involves calculating gravitational force, acceleration, and updating velocity and position iteratively, but the user notes discrepancies in expected orbital velocity. Respondents suggest that the Euler method may be numerically unstable for this simulation and recommend alternative integration methods such as Verlet integration or Runge-Kutta for improved stability. The user is encouraged to explore these methods to achieve more accurate orbital dynamics. The conversation highlights the importance of numerical methods in simulating physical systems accurately.
ryanie
Messages
9
Reaction score
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
The rope is tied into the person (the load of 200 pounds) and the rope goes up from the person to a fixed pulley and back down to his hands. He hauls the rope to suspend himself in the air. What is the mechanical advantage of the system? The person will indeed only have to lift half of his body weight (roughly 100 pounds) because he now lessened the load by that same amount. This APPEARS to be a 2:1 because he can hold himself with half the force, but my question is: is that mechanical...
Some physics textbook writer told me that Newton's first law applies only on bodies that feel no interactions at all. He said that if a body is on rest or moves in constant velocity, there is no external force acting on it. But I have heard another form of the law that says the net force acting on a body must be zero. This means there is interactions involved after all. So which one is correct?
Let there be a person in a not yet optimally designed sled at h meters in height. Let this sled free fall but user can steer by tilting their body weight in the sled or by optimal sled shape design point it in some horizontal direction where it is wanted to go - in any horizontal direction but once picked fixed. How to calculate horizontal distance d achievable as function of height h. Thus what is f(h) = d. Put another way, imagine a helicopter rises to a height h, but then shuts off all...
Back
Top