## NewtonBodyGetAcceleration()

A place to discuss everything related to Newton Dynamics.

Moderators: Sascha Willems, walaber

### Re: NewtonBodyGetAcceleration()

is in file ../applications\demosSandbox\sdkDemos\toolBox\PhysicsUtils.cpp
by the end.
Julio Jerez
Moderator

Posts: 11039
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

### Re: NewtonBodyGetAcceleration()

Julio Jerez wrote:is in file ../applications\demosSandbox\sdkDemos\toolBox\PhysicsUtils.cpp
by the end.

Got it, thanks! I thought it was a part of main Newton
Misho Katulic
CTO, FSX SpacePort
TerraBuilder
www.terrabuilder.com
misho

Posts: 552
Joined: Tue May 04, 2010 10:13 am

### Re: NewtonBodyGetAcceleration()

Hi Julio,

Thanks again for the acceleration equation! Unfortunately - it does not work. It is giving me near zero acceleration on the earth surface, and zero values for the acceleration calculated for contacts.

As I mentioned before, I managed to get "my version" showing me values I expect, for (so far) all cases: in orbit, on the ground, and during powered flight:

Code: Select all
`   // G factor: Add up force of gravity, centripetal force and any force due to the powered flight:   dVector dvFG = dVector(0.0f, 0.0f, 0.0f);    entSource->GetGravityForce(dvFG);#if 1   dVector dvFC = dVector(0.0f, 0.0f, 0.0f);   dVector dvFB = dVector(0.0f, 0.0f, 0.0f);//   entSource->GetCentripetalForce(dvFC);   dvFB = dvAccelerationTotal.Scale(entSource->GetCurrentBodyMass());   dVector   dvForceSum = dvFG + dvFC - dvFB;#else   dVector   dvForceSum = entSource->GetTotalAcceleration();#endif   NavData.dGFactor = abs(vLength(dvForceSum) / vLength(dvFG));`

As you can see, I skipped adding centripetal acceleration - body in orbit seems to already have that "resolved", as my call GetGravityForce(dvFG); gives me a value of 0 in orbit, and a value of -9.81 on earth surface.
This value is NOT CRITICAL, as it is used only for instrument display purposes, and not in any calculations. Let me know if you have any ideas on what may be wrong, but again, this is nothing urgent, I can live with it for now.

Thanks,
Misho
Misho Katulic
CTO, FSX SpacePort
TerraBuilder
www.terrabuilder.com
misho

Posts: 552
Joined: Tue May 04, 2010 10:13 am

Previous