Qualcomm Navigator Flight Control Interface  2.0
 All Classes Namespaces Files Functions Variables Enumerations Enumerator Pages
Functions
basic_waypoint_example.cpp File Reference
#include <iostream>
#include "api/flight_control_interface.hpp"

Functions

int main (int argc, char *argv[])
 

Function Documentation

int main ( int  argc,
char *  argv[] 
)

This example demonstrates how to execute a simple waypoint-following mission using FlightControlInterface.

The mission looks like this: Takeoff -> Go To (2, 0, 2) m -> Go To (0, 0, 2) m -> Land

Make the mission relative to the vehicle's position and orientation when the propellers start spinning. Without these lines, the mission is relative to the vehicle's position and orientation when Qualcomm Navigator first initializes.

Add a final waypoint at the same location as the last waypoint but with zero yaw so that the vehicle returns to its initial orientation prior to landing. snav_fci::WaypointConfig::YawType must be changed for this waypoint since the default config points in the direction of travel and would ignore any yaw setpoint given.