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

Functions

void signal_handler (int sig_num)
 
int main (int argc, char *argv[])
 

Variables

bool gKeepGoing = true
 

Function Documentation

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

This is an example of circling a point of interest at a constant radius and speed while yawing toward the center of the circle (always facing the point of interest). In this example, the point of interest is the takeoff location.

This example demonstrates how to use some high-level aspects of snav_fci::FlightControlInterface together with some lower-level functionality (computing rate commands).

Parameters used to define the orbit maneuver:

  • kOrbitRadius: distance in XY plane from the point of interest to maintain
  • kOrbitHeight: constant height used for the manuever
  • kOrbitSpeed: lateral (XY plane) speed used for the maneuver
  • kOrbitMaxLinAccel: constant acceleration used for ramping up/down speed

Start the maneuver! Phases of the mission are:

  1. Ascend to kOrbitHeight
  2. Translate in XY plane to (kOrbitRadius, 0, kOrbitHeight)
  3. Circle the takeoff location (0, 0), maintaining a constant distance of kOrbitRadius and a constant height of kOrbitHeight
  4. Upon receiving SIGINT, translate in XY plane to the takeoff location (0, 0, kOrbitHeight)
  5. Land

Phases 1, 2, 4, and 5 use high-level functions of FlightControlInterface. Phase 3 directly computes velocity and yaw rate commands and sends the result to FlightControlInterface to be sent to Qualcomm Navigator.