PGD Home

P0-A1: (P175) Part 418: Orbital Mechanics

by on Aug.05, 2018, under Astral Realms, P-0, Software and Games, Spiritus Astrum

I have been able to confirm that the physics and mathematical data used by the Gravity Engine that I am using in my project are accurate.

I have made some extensive changes to this system, and I wasn’t confident that it was still accurate, but I was able to use real-world equations from THIS site, and THIS page of sample problems.

In particular, there was a problem (Problem 4.9) to calculate the eccentricity of an orbit, (using equation 4.27 on the main site) using the radius of the planet, and the velocity and zenith angle of the spacecraft.

I inititally had some issues with this, but it turns out that the Gravitation constant in the Gravity Engine is defined as 1, and not as “6.67259×10-11 N-m2/kg2″. 

In addition, I had to multiply the mass of the planet by the mass scale of the physics simulation, which was not 1, to get the “true” mass.

Once I did this, the eccentricity given by the equation after firing the shuttles main engine was  0.103999, and the eccentricity given by the physics engine was 0.1021635, which is extremely close. Given the fact that I was using 32-bit math for very large values, most of the difference in the two numbers could be explained by 32-bit precision errors.

Additional testing with various types of orbits confirmed that the values matches for even highly eccentric orbits as well, for example an orbit with an eccentricity of 0.9788248 according to the physics system had an eccentricity of 0.978825 according to the equation, which is almost identical.

This is very good news, it means that the project now basically has a very advanced, realistic, physics engine built into it that I use to drive the orbital mechanics and planetary motion systems within the simulation.

 

 

 

 

 

 

 

Facebooktwitterredditpinterestlinkedinmail

Comments are closed.

Looking for something?

Use the form below to search the site:

Still not finding what you're looking for? Drop a comment on a post or contact us so we can take care of it!