Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Inconsistency in SITL JSON interface example #29072

Open
Tuxliri opened this issue Jan 14, 2025 · 2 comments
Open

Inconsistency in SITL JSON interface example #29072

Tuxliri opened this issue Jan 14, 2025 · 2 comments

Comments

@Tuxliri
Copy link

Tuxliri commented Jan 14, 2025

ap.SendState(timestamp,
0, 0, 0, // gyro
0, 0, -9.81, // accel
0, 0, 0, // position
0, 0, 0, // attitude
0, 0, 0); // velocity

In the example above the IMU is supposed to have a FRD (x-axis pointing forward, y-axis pointing right and z-axis pointing down) orientation. In this case the expected measured acceleration in the line above should be 9.81 rather than -9.81. Is this correct or did I understand this incorrectly?

@Tuxliri
Copy link
Author

Tuxliri commented Jan 14, 2025

Okay I have figured this out. When the drone is on a surface the accelerometer of the imu senses the counteracting force of the flat surface pushing up against gravity, thus an upward acceleration of 9.81 m/s^2. In the FRD body reference frame (z-axis pointing down) this is an acceleration of -9.81 m/s^2.

@Tuxliri
Copy link
Author

Tuxliri commented Jan 14, 2025

Added a clarification in the code.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant