KSP-KOS / KOS

Fully programmable autopilot mod for KSP. Originally By Nivekk
Other
697 stars 230 forks source link

Acceleration sensor returns average acceleration #1215

Open marianoapp opened 9 years ago

marianoapp commented 9 years ago

After a long investigation I found that the acceleration sensor is not returning the instantaneous acceleration but rather an average of the last 0.4s (actually the last 20 * TimeWarp.fixedDeltaTime).

test6

The averaging is actually done by KSP itself, and the averaged value is stored in the vessel.acceleration property that we then return as the sensor value.

I originally posted this on reddit where it was suggested that this average may exist to avoid the kraken on sudden accelerations (packing/unpacking of the vessel for example). Even if there's a reason for KSP to do this I think it would be better for us to return the raw acceleration and leave up to the user to add any averaging they see fit.

Dunbaratu commented 8 years ago

In general I think because the stock game only bothers making the science instruments accommodate the needs of the manual visual display, we have to make better science reading techniques overall that don't depend on the instruments. The instruments only give textual display values, not numbers in number format.