|
|
|
@ -326,4 +326,28 @@ bool Sub::control_check_barometer()
@@ -326,4 +326,28 @@ bool Sub::control_check_barometer()
|
|
|
|
|
return true; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
// vehicle specific waypoint info helpers
|
|
|
|
|
bool Sub::get_wp_distance_m(float &distance) const |
|
|
|
|
{ |
|
|
|
|
// see GCS_MAVLINK_Sub::send_nav_controller_output()
|
|
|
|
|
distance = sub.wp_nav.get_wp_distance_to_destination() * 0.01; |
|
|
|
|
return true; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
// vehicle specific waypoint info helpers
|
|
|
|
|
bool Sub::get_wp_bearing_deg(float &bearing) const |
|
|
|
|
{ |
|
|
|
|
// see GCS_MAVLINK_Sub::send_nav_controller_output()
|
|
|
|
|
bearing = sub.wp_nav.get_wp_bearing_to_destination() * 0.01; |
|
|
|
|
return true; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
// vehicle specific waypoint info helpers
|
|
|
|
|
bool Sub::get_wp_crosstrack_error_m(float &xtrack_error) const |
|
|
|
|
{ |
|
|
|
|
// no crosstrack error reported, see GCS_MAVLINK_Sub::send_nav_controller_output()
|
|
|
|
|
xtrack_error = 0; |
|
|
|
|
return true; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
AP_HAL_MAIN_CALLBACKS(&sub); |
|
|
|
|