-
Notifications
You must be signed in to change notification settings - Fork 17.9k
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
AP_ExternalAHRS: Fixed InertialLabs External AHRS driver #26153
Conversation
if (GOT_MSG(BARO_DATA) && | ||
GOT_MSG(TEMPERATURE)) { | ||
AP::baro().handle_external(baro_data); | ||
} | ||
#endif |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Removing these definitions doesn't look right. I suspect this change was unintentional.
@@ -267,7 +268,7 @@ bool AP_ExternalAHRS_InertialLabs::check_uart() | |||
} | |||
case MessageType::ACCEL_DATA_HR: { | |||
CHECK_SIZE(u.accel_data_hr); | |||
ins_data.accel = u.accel_data_hr.tofloat().rfu_to_frd()*GRAVITY_MSS*1.0e-6; | |||
ins_data.accel = u.accel_data_hr.tofloat().rfu_to_frd()*9.8106f*1.0e-6; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nitpick: white space at the end.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @VSheleverIL,
Thanks for this. Could you correct the commit title so that it starts with "AP_ExternalAHRS:"? If you look through our commit history you'll see we always prefix our commits with the subsystem to make it easier to see what is affected by the commit. This is especially important during backports. To be clear I meant the commit title, not the PR title.
Could you also fill in the PR description including testing that has been performed?
Hi @rmackay9, Thank you for your feedback. I have made changes according to your comments. Please review the outcome. Thank you! |
According to the Inertial Labs INS documentation, for conversion accelerometer output data, the value of g = 9.8106 m/s should be used. Using the GRAVITY_MSS constant will increase accelerometer errors.
ardupilot/libraries/AP_ExternalAHRS/AP_ExternalAHRS_InertialLabs.cpp
Line 270 in ae19d03
The differential pressure in the Inertial Labs INS data format is represented in mbar. Therefore, for use in the ArduPilot algorithm, the value must be converted to Pa (Pascal).
ardupilot/libraries/AP_ExternalAHRS/AP_ExternalAHRS_InertialLabs.cpp
Line 381 in ae19d03
Using the offset_bearing() function to calculate northing and easting speeds is incorrect in this case, so a direct calculation has been added.
ardupilot/libraries/AP_ExternalAHRS/AP_ExternalAHRS_InertialLabs.cpp
Line 353 in ae19d03
Following the recommendations of Inertial Labs, the output data format (data set) has been expanded to include the following data:
Additionally, logging of these data types has been added.