NewtonBodyGetAcceleration()

A place to discuss everything related to Newton Dynamics.

Moderators: Sascha Willems, walaber

NewtonBodyGetAcceleration()

Postby misho » Fri Apr 05, 2019 2:55 pm

Hi everyone,

As the topic says, I'm trying to figure out if NewtonBodyGetAcceleration() is deprecated, and if not, what is it supposed to return?

On the ReadtheDocs site, the function is completely absent, while on Wiki, it only has a stub with the wrong usage description.
Misho Katulic
CTO, FSX SpacePort
TerraBuilder
www.terrabuilder.com
misho
 
Posts: 673
Joined: Tue May 04, 2010 10:13 am

Re: NewtonBodyGetAcceleration()

Postby Julio Jerez » Fri Apr 05, 2019 3:28 pm

it returns the acceleration on the body.
But if you have to use that function for any calculation you are doing some thing wrong.

an acceleration is a result, not an input variable, I added that function reluctantly to satisfy
a user that want to read it to compare to some theoretical result.
very few cases an acceleration is a predictable variable. cases when all external forces are known in advance for example.
Julio Jerez
Moderator
Moderator
 
Posts: 12249
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Re: NewtonBodyGetAcceleration()

Postby misho » Fri Apr 05, 2019 3:38 pm

Julio Jerez wrote:it returns the acceleration on the body.
But if you have to use that function for any calculation you are doing some thing wrong.

an acceleration is a result, not an input variable, I added that function reluctantly to satisfy
a user that want to read it to compare to some theoretical result.
very few cases an acceleration is a predictable variable. cases when all external forces are known in advance for example.


Ok - I understand. I have G-meter on my instruments (a rather important readout) and I only want to calculate G forces on the object and display the value, so NOT using it as an input var. And, I am getting valid values when on the ground (that launch escape sequence is showing ~9G, which is about right)

What is confusing me is when my spacecraft is in orbit. I get a value of 1G, instead of zero. I was expecting zero (for obvious reasons), plus, yes, I am applying a force of gravity (adjusted for altitude), but internally, the solver should compute for centripetal force that cancels gravity and gives a net zero G... After all, the spacecraft is steady in orbit and not falling down, and yet it shows 1G. :?:
Misho Katulic
CTO, FSX SpacePort
TerraBuilder
www.terrabuilder.com
misho
 
Posts: 673
Joined: Tue May 04, 2010 10:13 am

Re: NewtonBodyGetAcceleration()

Postby Julio Jerez » Fri Apr 05, 2019 5:06 pm

After all, the spacecraft is steady in orbit and not falling down, and yet it shows 1G

ah that's the thing, the rocket is actually falling, don't you remember Newton insight about about the falling apple?
https://www.physicsclassroom.com/class/circles/Lesson-3/The-Apple,-the-Moon,-and-the-Inverse-Square-Law
the effect of gravity on the rocket is to make it fall by the same amount of the curvature of the orbit.

no the solver do not compute centripetal acceleration. that's a confusion people get, a body in orbit is still under the gravity influence, that's what the engine returns, centripetal accelerations are fictitious forces. The Nasa accelerometer should measure the same as the engine because accelerometers measure change in velocity, but since the change is so smooth the accelerometer is probably calibrated to add the theoretical centripetal as v^2/r which is the curvature of the orbit.
Look it up it should be documented some where in the Nasa files.
Julio Jerez
Moderator
Moderator
 
Posts: 12249
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Re: NewtonBodyGetAcceleration()

Postby misho » Fri Apr 05, 2019 5:37 pm

Julio Jerez wrote:no the solver do not compute centripetal acceleration. that a confusion people get, the body is orbit is still in the gravity influence, that what the engine returns, centripetal accelerations are fiction forces.
the Nasa accelertume should measure the same this if they were very accurate.

accelerometer measure the change in velocity, by since the change is so smooth the accelerometer is probably calibrated to add the theoretical centripetal as v^2/r
Look it up is should be documented some where in the nasa files.


Oh, I understand that. The source of confusion is:

  • When on the ground, NewtonBodyGetAcceleration() returns 0
  • When in steady orbit, NewtonBodyGetAcceleration() returns 8.6 (which is altitude adjusted gravitational constant, 9.81 m/s2)

What is this value which is returned when in orbit, but not on the ground?
Misho Katulic
CTO, FSX SpacePort
TerraBuilder
www.terrabuilder.com
misho
 
Posts: 673
Joined: Tue May 04, 2010 10:13 am

Re: NewtonBodyGetAcceleration()

Postby Julio Jerez » Sat Apr 06, 2019 11:35 am

the equation of motion is m * a = sum (forces)
sum of forces is the weight plus the contact reaction and any othe extra force acting on the body.
centripetal acceleration is not a force, it is an effect created by change of direction of a velocity.
it is a pure mathematical effect that result of the calculus but that happens to be real.

when the rocket is at rest of the ground the contact forces are equal to the weight and the rocket acceleration is zero because the net force acting on it is zero.
when the body is in propelling the acceleration is the gravity plus the thrust
when is in orbit is only the gravity.

is you want your accelerometer to account for the weightless of space you need to calibrated it by adding the centripetal acceleration which is always present. you can calculate the calibration factors like this
Code: Select all
vector radii = bodyPosition.Scale (-1) ;
vector unitRadii = radii.Normalize()
//find the tangent velocity
vector tangentVeloc = bodyGetVelocity() + unitRadii.Scale (dostProduct (bodyGetVelocity(), unitRadii))
float radiiMag = sqrt (dotProduict (radii, radii));
vector centripelaAccel = unitRadii.Scale ((dotProduct (tangentVeloc, tangentVeloc)/ radiiMag )
then the weighless acceleration inside the rocket is
vector accel (GetNewtonAcceleration + centripelaAccel);


this is general everywhere.
when the is on the ground it speed is too small so centripelaAccel is insignificant.
if the body is really far away like beyond the moon, the radii is huge and again centripelaAccel is insignificant.
it is only when the tangent velocity is precisely enough that its centrical effect matches the gravity that the body is weightless.
this also apply for every thing inside the rocket because everything inside the rocket moves with the rocket.
Julio Jerez
Moderator
Moderator
 
Posts: 12249
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Re: NewtonBodyGetAcceleration()

Postby misho » Sun Apr 07, 2019 10:17 pm

Julio Jerez wrote:
Code: Select all
vector accel (GetNewtonAcceleration + centripelaAccel);


this is general everywhere.


Thanks Julio,

Yes, I have similar calculation in place - but, as it stands, it is not general everywhere. On the ground, NewtonBodyGetAcceleration() returns zero. And since centripetalAccel is also zero on the ground, this formula will yield zero gravity on the ground! And obviously, here on earth we have 1G :wink:

I know this is basic physics, but there is obviously a term missing in this equation which yields 1G on the ground - and I am trying to wrap my head as to how to properly calculate it so that it gives correct result in any part of the universe :mrgreen:

Now, I was taught in school that we here on Earth are always under 9.81 m/s2 acceleration. The hard ground under our feet makes it feel like weight. Therefore, I would expect NewtonBodyGetAcceleration() to return a value of 9.81. And, if it did, your equation would work anywhere in the universe. But, I also know that acceleration is a change in speed over time, so obviously, if the body is at standstill on earth's surface, it's acceleration is zero, which is the correct value NewtonBodyGetAcceleration() is returning.

So - the question still is - what is the missing term in your equation above that will give the correct G reading for any location in the universe?
Misho Katulic
CTO, FSX SpacePort
TerraBuilder
www.terrabuilder.com
misho
 
Posts: 673
Joined: Tue May 04, 2010 10:13 am

Re: NewtonBodyGetAcceleration()

Postby Julio Jerez » Sun Apr 07, 2019 10:28 pm

There are not missing term, believe me, is right everywhere. the acceleration on the ground is not 1g, if it was the body would be falling.
When on the ground the contact with the ground cancel the gravity.
Think this way, if you are resting on the ground you are not moving, so not change in velocity g must be zero.
If you jump, you move up and down, while you are on the air your acceleration is one g.
Julio Jerez
Moderator
Moderator
 
Posts: 12249
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Re: NewtonBodyGetAcceleration()

Postby misho » Sun Apr 07, 2019 11:03 pm

Julio Jerez wrote:There are not missing term, believe me, is right everywhere. the acceleration on the ground is not 1g, if it was the body would be falling.
When on the ground the contact with the ground cancel the gravity.
Think this way, if you are resting on the ground you are not moving, so not change in velocity g must be zero.
If you jump, you move up and down, while you are on the air your acceleration is one g.


Hold on - G-factor is not the same as g acceleration. G factor is a dimensionless quantity. That's what I'm trying to calculate and display. The term 1G is used as the standard "G" term, denoting the feeling of weight on the surface of the Earth. I am pretty sure that the G-meter instrument somewhere in a Space Shuttle is showing 1G when on the launch pad, then around 3Gs when launching to orbit, then 0G when in orbit. And I simply can't have my instrument showing 0G on the launch pad :mrgreen:

So - how do I have an unifying formula that calculates the proper G-factor? I'm about to post this question on SpaceStackExchange because, to my amazement, I can't find an answer anywhere on-line :?:
Misho Katulic
CTO, FSX SpacePort
TerraBuilder
www.terrabuilder.com
misho
 
Posts: 673
Joined: Tue May 04, 2010 10:13 am

Re: NewtonBodyGetAcceleration()

Postby Julio Jerez » Sun Apr 07, 2019 11:51 pm

G is just the magnitude. And yes the instrument should show 0G when in the launch pad. Any other value would be wrong.
You have it right already.
Julio Jerez
Moderator
Moderator
 
Posts: 12249
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Re: NewtonBodyGetAcceleration()

Postby misho » Mon Apr 08, 2019 12:50 am

Ok - thanks. That's interesting... I'll try to research this a bit more. There's a space simulator/game out there with literally millions of users, (Kerbal Space Program), and their G-scale instrument shows 1G on the surface. I can't believe no one ever noticed this... :roll:
Misho Katulic
CTO, FSX SpacePort
TerraBuilder
www.terrabuilder.com
misho
 
Posts: 673
Joined: Tue May 04, 2010 10:13 am

Re: NewtonBodyGetAcceleration()

Postby Julio Jerez » Mon Apr 08, 2019 3:14 pm

ok Michio I added function
dFloat ForceBodyAccelerationMichio (NewtonBody* const body)
you can just call it and will give you the acceleration of a body the is reference to the earth center.
I deleted my previous two comment the are no right or wrong. is how the date is more useful.

This function provide there is not bug on it, will give you the acceleration on the ground even is the body is a rest, It also account fro the centripetal so it must be generate anywhere is space.

you just has to copy it and paste in your code, and try it out, see if it work.
I did no test it but I fairly confident i works as you want to.
Julio Jerez
Moderator
Moderator
 
Posts: 12249
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Re: NewtonBodyGetAcceleration()

Postby Julio Jerez » Tue Apr 09, 2019 5:23 pm

misho wrote:Ok - thanks. That's interesting... I'll try to research this a bit more. There's a space simulator/game out there with literally millions of users, (Kerbal Space Program), and their G-scale instrument shows 1G on the surface. I can't believe no one ever noticed this... :roll:


I try to question and I accidentally delete you post, but here is the respond anyway

...and I DID get results I expected, but I tested it on a limited number of scenarios (on the launch pad, in orbit, re-entry and under parachute). I'm guessing, under certain conditions I would get erroneous results, but I left it as is for now and implemented a few other things that depended on a G-factor, even if not entirely properly implemented...

It should work 100% of the time and give correct result.

and this is the last answer I am going to give regarding this issue.

first of all the question you ask was no what I said.
...I was told that technically, G-force readout should actually indicate zero-G on the earth's surface, as well as in a stable orbit. This is due to the fact that G-force is measured using accelerometers (which measure a change in velocity) and since we down here on Earth surface, when standing still, don't change our velocity (neglecting earth's rotation effects), our G-factor should be 0.

I said the acceleration you measure should be zero on the landing pad and 1 g what in orbit, I did not say should be zero I said 1 G.

but never mind what I said this si what IO go by.

Acceleration is measured as the rate of change of velocity over time is no the value of G
form the newton secund Law of motion, on an inertial frame, the acceleration of a body is give by this
m * dv / dt = f1 + f1 + f2 + ....

one of the f is the gravity, so what an accelerometer measure is the value

dv / dt = (f1 + f2 + 3 + .....) / mass

when mass is the mass of the piezo electric device, if you do not believe me then I do no know what else to say, but a look at how they device work will tell you exactly what I said.
https://www.omega.com/prodinfo/accelerometers.html

now when you posted the question, there a bunch foe people provide lot and answer what are all incorrect or partially right for the wrong reason.

The person who said this:
"Accelerometers do not measure change in velocity. An accelerometer in a non-rotating, non-thrusting spacecraft above the Earth's atmosphere will register 0 g, even though the spacecraft's velocity vector is changing all the time"

immediately follow by this.
....Accelerometers do not measure change in velocity".
does not seems to realized he is contradicted himself, he mentioned a lot stuff, bungee jumper, Iphone, self driving car and even pluto, to drive home he used to work a NASA,
But work for NASA does not make him an expert, and judging by his answer I do not think he is knows what this devices work the way the do.
He is confusing accelerometers with scales.
Scale like the accelerometers of phones measure displacement,
accelerometers measure velocity changes.

The reason an accelerometer on the space craft measure zero G is because the device is in the same frame as the Rocked, so there is no relative change of velocity between the rocket and the accelerometer.
The part he got right is when he said this
That accelerometers do not measure acceleration due to gravity presents a challenge for spacecraft that self-navigate their position/velocity state. Such spacecraft need to have an onboard model of gravitation so that the acceleration due to gravity can be added to the accelerometer reading. This calculated value will be somewhat erroneous

basically this is that in order for the instrument give you the values as if the frame of the aircraft was an inertia frame reference *(want tat is no rotation or accelerating which the rocket is),
the instrument has to be calibrated which is what the function that I gave you does.

He know the instruments calibrates and he mention a bunch of unrelated stuff to justifies his answer be to mu knowledge he does no really know what he is talking abut. He is talking like a person who drive a car how has experiment with car but the does no know how car really work.


The point is the NewtonGetAcceleration function returns the Inertia acceleration (meaning relative to the origin of the world) of the body, according to newton equation of motion form there you can make any calculation you want.

ask for the second dude who said this:
Code: Select all
This is incorrect. G is not zero on Earth's surface. You're conflating two things: G-force, which is a force as a result of gravity, and acceleration, which produces a force as a result of movement.

I do not even know what to said here, this self appointed expert super moron just straw man what I sad, I never said G is zero on the surface for the earth, I said when the body is a rest the sum of the weight plus the ground reaction forces is zero. so the acceleration will be zero.

But at this point I believe you have what you need, you are free to use it or do something else.
It does not make any difference to me.
Julio Jerez
Moderator
Moderator
 
Posts: 12249
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Re: NewtonBodyGetAcceleration()

Postby misho » Tue Apr 09, 2019 9:01 pm

Julio Jerez wrote:But at this point I believe you have what you need, you are free to use it or do something else.
It does not make any difference to me.


Hi Julio!

There is nothing really in dispute - you are the author of the physics engine that does everything I ever needed (and more), so I consider you an absolute authority on the subject. And yes, the discussion there only complicated the subject (notice, in the comments to the original question one guy started talking about mountains and tides :roll: ) so then I had to simplify the case. And finally, after all that winded discussion, there is still no definitive answer to what I think was a simple question: How is the G-load factor calculated...

I REALLY appreciate you providing a custom solution for this. I'll implement the formula and let you know the findings - although I'm sure it will do exactly what I need!
Misho Katulic
CTO, FSX SpacePort
TerraBuilder
www.terrabuilder.com
misho
 
Posts: 673
Joined: Tue May 04, 2010 10:13 am

Re: NewtonBodyGetAcceleration()

Postby misho » Mon Apr 15, 2019 4:28 pm

Julio Jerez wrote:ok Michio I added function
dFloat ForceBodyAccelerationMichio (NewtonBody* const body)
you can just call it and will give you the acceleration of a body the is reference to the earth center.
I deleted my previous two comment the are no right or wrong. is how the date is more useful.


Hi Julio!

I can't find this function anywhere in the latest build... :roll:
Misho Katulic
CTO, FSX SpacePort
TerraBuilder
www.terrabuilder.com
misho
 
Posts: 673
Joined: Tue May 04, 2010 10:13 am

Next

Return to General Discussion

Who is online

Users browsing this forum: No registered users and 16 guests

cron