Observing odd behavior with orbital dynamics

Report any bugs here and we'll post fixes

Moderators: Sascha Willems, Thomas

Re: Observing odd behavior with orbital dynamics

Postby Julio Jerez » Thu Oct 31, 2019 1:17 pm

is that this actual function you are using in the code?
void TBEntity::GetGravityForce(dVector &dvGravityForce)
Julio Jerez
Moderator
Moderator
 
Posts: 11045
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Re: Observing odd behavior with orbital dynamics

Postby misho » Thu Oct 31, 2019 3:34 pm

Yes, it is. I'm still getting a "drift" of values that should not be changing. I can quantify it, if you'd like. It doesn't seem like a lot, but, for example, if a trip to the Moon took 2-3 days, the error would accumulate to thousands of km, which is, I think, a lot...
Misho Katulic
CTO, FSX SpacePort
TerraBuilder
www.terrabuilder.com
misho
 
Posts: 553
Joined: Tue May 04, 2010 10:13 am

Re: Observing odd behavior with orbital dynamics

Postby Julio Jerez » Fri Nov 01, 2019 3:32 pm

we has gone over this so many time, and each time I say something you get a different interpretation of what I said, it only when there was a repro demo that you have been able to make any progress.

ok, this weekend I will try to use that function and put it the repro demo that I think is still there.
then we move form there.
Julio Jerez
Moderator
Moderator
 
Posts: 11045
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Re: Observing odd behavior with orbital dynamics

Postby misho » Fri Nov 01, 2019 4:06 pm

Sounds good!

I "think" :roll: I got in everything that you suggested. I am using backward Euler:

dvNewPos = dvCurrentPos + dvCurrentVel.Scale(SystemVars->m_SimTimeStep);
Code: Select all

and Newton's law of universal gravitation formula:

Code: Select all
double dtotalForce = -G*EARTH_MASS*dBodyMass / (dRadius*dRadius);


As for the repro demo, I am not sure if the old one will work with this case. For this to be reproduced, there has to be a point-gravity source (gravity well) and a body that needs to be in its orbit on a highly eliptical path.
Misho Katulic
CTO, FSX SpacePort
TerraBuilder
www.terrabuilder.com
misho
 
Posts: 553
Joined: Tue May 04, 2010 10:13 am

Previous

Return to Bugs and Fixes

Who is online

Users browsing this forum: No registered users and 2 guests