AirSim icon indicating copy to clipboard operation
AirSim copied to clipboard

why subtracting gravity when calculating linear_acceleration in ImuSimple

Open sy300302 opened this issue 5 years ago • 2 comments

I saw below code in ImuSimple.hpp output.linear_acceleration = ground_truth.kinematics->accelerations.linear - ground_truth.environment->getState().gravity;

but I don't understand why subtracting gravity. That will make the linear_acceleration output near -10 always when the drone flying in a constant speed.

Is this an issue?

Thank you.

sy300302 avatar Mar 02 '21 04:03 sy300302

I got the idea suddenly. It's my fault. Sorry for that.

Thank you.

sy300302 avatar Mar 02 '21 04:03 sy300302

I understand how the imu working now. Thank you.

sy300302 avatar Mar 02 '21 04:03 sy300302