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

AP_ExternalAHRS: Compare FIX_TYPE judgment with definition name #23015

Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions libraries/AP_ExternalAHRS/AP_ExternalAHRS_LORD.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -422,7 +422,7 @@ void AP_ExternalAHRS_LORD::post_filter() const
ned_vel_down: filter_data.ned_velocity_down,
};

if (gps.fix_type >= 3 && !state.have_origin) {
if (gps.fix_type >= GPS_FIX_TYPE_3D_FIX && !state.have_origin) {
WITH_SEMAPHORE(state.sem);
state.origin = Location{int32_t(filter_data.lat),
int32_t(filter_data.lon),
Expand Down Expand Up @@ -465,7 +465,7 @@ bool AP_ExternalAHRS_LORD::pre_arm_check(char *failure_msg, uint8_t failure_msg_
hal.util->snprintf(failure_msg, failure_msg_len, "LORD unhealthy");
return false;
}
if (gnss_data.fix_type < 3) {
if (gnss_data.fix_type < GPS_FIX_TYPE_3D_FIX) {
hal.util->snprintf(failure_msg, failure_msg_len, "LORD no GPS lock");
return false;
}
Expand All @@ -488,7 +488,7 @@ void AP_ExternalAHRS_LORD::get_filter_status(nav_filter_status &status) const
status.flags.vert_vel = 1;
status.flags.vert_pos = 1;

if (gnss_data.fix_type >= 3) {
if (gnss_data.fix_type >= GPS_FIX_TYPE_3D_FIX) {
status.flags.horiz_vel = 1;
status.flags.horiz_pos_rel = 1;
status.flags.horiz_pos_abs = 1;
Expand Down