Пример #1
0
// guided_takeoff_run - takeoff in guided mode
//      called by guided_run at 100hz or more
void Copter::ModeGuided::takeoff_run()
{
    auto_takeoff_run();
    if (wp_nav->reached_wp_destination()) {
        const Vector3f target = wp_nav->get_wp_destination();
        set_destination(target);
    }
}
Пример #2
0
// auto_run - runs the auto controller
//      should be called at 100hz or more
//      relies on run_autopilot being called at 10hz which handles decision making and non-navigation related commands
void Copter::auto_run()
{
    // call the correct auto controller
    switch (auto_mode) {

    case Auto_TakeOff:
        auto_takeoff_run();
        break;

    case Auto_WP:
    case Auto_CircleMoveToEdge:
        auto_wp_run();
        break;

    case Auto_Land:
        auto_land_run();
        break;

    case Auto_RTL:
        auto_rtl_run();
        break;

    case Auto_Circle:
        auto_circle_run();
        break;

    case Auto_Spline:
        auto_spline_run();
        break;

    case Auto_NavGuided:
#if NAV_GUIDED == ENABLED
        auto_nav_guided_run();
#endif
        break;

    case Auto_Loiter:
        auto_loiter_run();
        break;
    }
}
Пример #3
0
// guided_takeoff_run - takeoff in guided mode
//      called by guided_run at 100hz or more
void Copter::ModeGuided::takeoff_run()
{
    auto_takeoff_run();
}