Jump to content

Vessel.acceleration: what is going on?


Recommended Posts

I did a little test: launch a rocket straight up, and a few seconds later (before drag can become significant), cut thrust (by pressing X).  If I compute acceleration by subtracting consecutive Vessel.velocityD and dividing by time, I get what I would expect: between two frames, the acceleration instantly changes direction, and the new magnitude is 9.799.

However, the "acceleration" field barely changes:  See my log messages below:

accel: (-3.475, 0.034, 2.243)(4.136), computed: (-3.487, 0.037, 2.255) (4.153), vel: (-29.271, 0.098, 19.660)

accel: (-3.477, 0.034, 2.244)(4.138), computed: (-3.489, 0.037, 2.255) (4.154), vel: (-29.340, 0.099, 19.705)

accel: (-2.900, 0.034, 1.854)(3.442), computed: (8.082, 0.016, -5.541) (9.799), vel: (-29.179, 0.099, 19.594)

accel: (-2.323, 0.033, 1.465)(2.747), computed: (8.082, 0.016, -5.541) (9.799), vel: (-29.017, 0.100, 19.483)

accel: (-1.746, 0.032, 1.075)(2.051), computed: (8.082, 0.016, -5.540) (9.798), vel: (-28.855, 0.100, 19.372)

(The single number in parentheses is the magnitude).

This is while Krakensbane.GetFrameVelocity() is still zero, so there's no floating origin problem.  It's only about 4 seconds after lift off.

Is the acceleration field some sort of time-averaged value?  Once I shut off the engines, nothing on the vessel is actually accelerating at that rate.  What is going on?

I'll be happy to update the API docs with any answer.

Link to comment
Share on other sites

This thread is quite old. Please consider starting a new thread rather than reviving this one.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...