Esempio n. 1
0
// return cross track error (i.e. vehicle's distance from the line between waypoints)
float Mode::crosstrack_error() const
{
    if (!is_autopilot_mode()) {
        return 0.0f;
    }
    return rover.nav_controller->crosstrack_error();
}
Esempio n. 2
0
// handle tacking request (from auxiliary switch) in sailboats
void Mode::handle_tack_request()
{
    // autopilot modes handle tacking
    if (is_autopilot_mode()) {
        rover.sailboat_handle_tack_request_auto();
    }
}
Esempio n. 3
0
// return short-term target heading in degrees (i.e. target heading back to line between waypoints)
float Mode::nav_bearing() const
{
    if (!is_autopilot_mode()) {
        return 0.0f;
    }
    return rover.nav_controller->nav_bearing_cd() * 0.01f;
}