My satellite should go in a circle, not an ellipse

In summary: The V-grav vector causes the object to move downwards a certain distance in one...second.So, as long as the V-thrust vector is always greater than the V-grav vector, the object will remain in a circular orbit.In summary, In one second gravity at this point causes the object to fall towards the planet a certain distance and also causes the object to attain a downward velocity of V-grav.
  • #1
Rapidrain
31
0
I have been toying with a java programming project for a few months now. I want to
depict a satelite orbiting a planet (2 dimensional).

I've scaled down certain constants to fit the screen and have put GM (mu) at 200000 and
the distance from the gravitaional body, a planet, at 200 (pixels). Using the equations
where a perfect orbital velocity is equal to sqrt(GM/dist), I must have a velocity of
sqrt(1000) 31.62 pixels/sec to remain in a circle.

Problem is my model depicts an ellipse.

The distance starts at 200, drops down to nearly 150 halfway around and climbs up again
(!) to 200 when it reaches the starting point. This is better than crashing into the
planet or flying away in a straight line...but still it should be a "perfect" circle.

I could understand it if my crude iteration method made a consistently "too small" or
"too big" quantity and cause the satellite to slowly spiral into the planet and crash or
caused the satellite to slowly spiral away from the planet. However the satellite
creeps down and then creeps up in a single orbit. Very strange. Why the wobble?

Yes, I am moving in singular one second steps around the planet and complete the orbit
in about 24 steps. And yes, if I took infinitely small steps an infinite number of
times, instead of a finite number of iterations, then I would come out with a perfect
circle. I am not Isaac Newton though.

Can I compensate in any way? Multiply the vector magnitude by sqrt(1/pi) or something
like that? Tilt the initial velocity vector away from the planet by 1/distance degree or
something?
 

Attachments

  • Orbit with 1sec Iteration.jpg
    Orbit with 1sec Iteration.jpg
    15 KB · Views: 469
Physics news on Phys.org
  • #2
A general problem with iterations like this is "round off error". You are keeping only a limited number of decimal places and the error, unless you are very careful, can add up. That will result, eventually, not just in an ellipse rather than a circle but in a spiral that ends up going off to infinity.
 
  • #3
Thanks HallsofIvy, I've thought about it, the fact that in some cases 1.0 is depicted as 0.9999999999. I'd like to understand however why any discrepency in accuracy leads to this yo-yo effect.

If my discrepency in accuracy lead 'a spiral that ends up going off to infinity' then okay. I'm happy. It's a discrepency with a uniform effect. Constantly moving away.

However the radius of the orbit goes down and then comes up again. Down and then up. This is not uniform. This is wierd.

But now I must sleep.
 
  • #4
rapidrain said:
I've scaled down certain constants to fit the screen and have put GM (mu) at 200000 and
the distance from the gravitaional body, a planet, at 200 (pixels). Using the equations
where a perfect orbital velocity is equal to sqrt(GM/dist), I must have a velocity of
sqrt(1000) 31.62 pixels/sec to remain in a circle.

Problem is my model depicts an ellipse.

The distance starts at 200, drops down to nearly 150 halfway around and climbs up again
(!) to 200 when it reaches the starting point. This is better than crashing into the
planet or flying away in a straight line...but still it should be a "perfect" circle.

Where are you measuring the distance from? The image you included seems to have the sun at one of the foci of the ellipse, so if you're measuring the distance from the sun to the planet, and the planet is traveling in an elliptical orbit, then the distance should go up and down as you describe.

If I do some rough eyeball measurements using your drawing, it looks like the sun is located about 40 to 50 pixels to the right of the center of the ellipse. That would account for the discrepancy you are seeing in the distance.
 
  • #5
Can you show us code snippets or at least your algorithm?
 
  • #6
to Mark44, I am measuring the distance from the center of the planet (sun, gravitational object). And I *know* it is traveling in an elliptical orbit. I want it to travel in a pure circular orbit. The planet in the center is *indeed* located 50 pixels off-center.

to olivermsun, okay.
I have two vectors.
The first is visible in the screen shot, going off to the right. That is my V-thrust vector. The spaceship fired his engines and attained a velocity of 31.62 which would generate a circular orbit--I wish.

The second is the V-grav caused by gravity after falling one second, calculated each time at the beginning of the interation as 1 sec*GM/(dist**2)

The iteration : In one second gravity at this point causes the object to fall towards the planet a certain distance and also causes the object to attain a downward velocity of V-grav.

The V-thrust vector causes the object to move to the right a certain distance in one second and retains this V-thrust velocity.

I move the object according to the two movements described above.

I give the object a *NEW* V-thrust vector = old-V-thrust + V-grav.
V-grav becomes zero again.

End of the iteration. I start again at this new position, about 14 degrees clockwise from the starting position. Adding the V-grav vector has tilted the V-thrust vector a bit downward.

I've added a screenshot of one single hop.
 

Attachments

  • HopOnce.jpg
    HopOnce.jpg
    23.6 KB · Views: 390
Last edited:
  • #7

1. Why should my satellite go in a circle instead of an ellipse?

The shape of an orbit is determined by the laws of physics and the balance between the gravitational pull of the planet and the velocity of the satellite. A circular orbit means that the satellite is traveling at a constant speed and distance from the planet, while an elliptical orbit means that the satellite is sometimes closer and sometimes farther away from the planet.

2. Is it possible to change the shape of my satellite's orbit from an ellipse to a circle?

Yes, it is possible to change the shape of an orbit through the use of propulsion systems. However, this requires precise calculations and adjustments to the satellite's velocity and trajectory. It is not a simple or easy task.

3. What are the advantages of a circular orbit for my satellite?

A circular orbit allows for a more consistent and predictable path for the satellite, which can be beneficial for tasks such as remote sensing or communication. It also requires less fuel for the satellite to maintain its orbit compared to an elliptical orbit.

4. Are there any disadvantages to having a circular orbit for my satellite?

One potential disadvantage is that a circular orbit may limit the coverage area of the satellite compared to an elliptical orbit. Additionally, if the satellite needs to be positioned at a specific point above the planet, an elliptical orbit may be more suitable as it allows for the satellite to spend more time at that point.

5. How do I ensure that my satellite maintains a circular orbit?

To maintain a circular orbit, the satellite must have a specific velocity relative to the planet. This velocity, known as the orbital speed, is determined by the mass of the planet and the distance between the satellite and the planet. Propulsion systems can be used to adjust the satellite's speed and trajectory to keep it in a circular orbit.

Similar threads

  • Introductory Physics Homework Help
Replies
1
Views
824
  • Classical Physics
Replies
7
Views
827
  • Special and General Relativity
2
Replies
42
Views
4K
Replies
2
Views
836
  • Introductory Physics Homework Help
2
Replies
39
Views
3K
  • Astronomy and Astrophysics
Replies
11
Views
2K
  • Introductory Physics Homework Help
Replies
3
Views
1K
  • Introductory Physics Homework Help
Replies
15
Views
1K
  • Astronomy and Astrophysics
Replies
10
Views
2K
Replies
6
Views
2K
Back
Top