Report any bugs here and we'll post fixes
Moderators: Sascha Willems, Thomas
by 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
-
- Posts: 12249
- Joined: Sun Sep 14, 2003 2:18 pm
- Location: Los Angeles
-
by 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
-
- Posts: 673
- Joined: Tue May 04, 2010 10:13 am
by 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
-
- Posts: 12249
- Joined: Sun Sep 14, 2003 2:18 pm
- Location: Los Angeles
-
by misho » Fri Nov 01, 2019 4:06 pm
Sounds good!
I "think"
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
-
- Posts: 673
- Joined: Tue May 04, 2010 10:13 am
Return to Bugs and Fixes
Who is online
Users browsing this forum: No registered users and 2 guests