Paparazzi UAS  v5.2.2_stable-0-gd6b9f29
Paparazzi is a free software Unmanned Aircraft System.
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
nav_bungee_takeoff.c File Reference

from OSAM advanced navigation routines More...

#include "modules/nav/nav_bungee_takeoff.h"
#include "firmwares/fixedwing/nav.h"
#include "state.h"
#include "autopilot.h"
#include "generated/flight_plan.h"
+ Include dependency graph for nav_bungee_takeoff.c:

Go to the source code of this file.

Macros

#define Takeoff_Distance   10
 Takeoff functions for bungee takeoff. More...
 
#define Takeoff_Height   30
 
#define Takeoff_Speed   15
 
#define Takeoff_MinSpeed   5
 

Enumerations

enum  TakeoffStatus { Launch, Throttle, Finished }
 

Functions

bool_t nav_bungee_takeoff_setup (uint8_t BungeeWP)
 
bool_t nav_bungee_takeoff_run (void)
 

Variables

static enum TakeoffStatus CTakeoffStatus
 
static float throttlePx
 
static float throttlePy
 
static float initialx
 
static float initialy
 
static float ThrottleSlope
 
static bool_t AboveLine
 
static float BungeeAlt
 
static float TDistance
 
static uint8_t BungeeWaypoint
 

Detailed Description

from OSAM advanced navigation routines

Definition in file nav_bungee_takeoff.c.

Macro Definition Documentation

#define Takeoff_Distance   10

Takeoff functions for bungee takeoff.

Run initialize function when the plane is on the bungee, the bungee is fully extended and you are ready to launch the plane. After initialized, the plane will follow a line drawn by the position of the plane on initialization and the position of the bungee (given in the arguments). Once the plane crosses the throttle line, which is perpendicular to the line the plane is following, and intersects the position of the bungee (plus or minus a fixed distance (TakeOff_Distance in airframe file) from the bungee just in case the bungee doesn't release directly above the bungee) the prop will come on. The plane will then continue to follow the line until it has reached a specific height (defined in as Takeoff_Height in airframe file) above the bungee waypoint and speed (defined as Takeoff_Speed in the airframe file).

<section name="Takeoff" prefix="Takeoff_">
<define name="Height" value="30" unit="m"/>
<define name="Speed" value="15" unit="m/s"/>
<define name="Distance" value="10" unit="m"/>
<define name="MinSpeed" value="5" unit="m/s"/>
</section>

Definition at line 55 of file nav_bungee_takeoff.c.

Referenced by nav_bungee_takeoff_setup().

#define Takeoff_Height   30

Definition at line 58 of file nav_bungee_takeoff.c.

Referenced by nav_bungee_takeoff_run().

#define Takeoff_MinSpeed   5

Definition at line 64 of file nav_bungee_takeoff.c.

Referenced by nav_bungee_takeoff_run().

#define Takeoff_Speed   15

Definition at line 61 of file nav_bungee_takeoff.c.

Referenced by nav_bungee_takeoff_run().

Enumeration Type Documentation

Enumerator
Launch 
Throttle 
Finished 

Definition at line 67 of file nav_bungee_takeoff.c.

Function Documentation

bool_t nav_bungee_takeoff_setup ( uint8_t  BungeeWP)

Variable Documentation

bool_t AboveLine
static

Definition at line 74 of file nav_bungee_takeoff.c.

Referenced by nav_bungee_takeoff_run(), and nav_bungee_takeoff_setup().

float BungeeAlt
static

Definition at line 75 of file nav_bungee_takeoff.c.

Referenced by nav_bungee_takeoff_run(), and nav_bungee_takeoff_setup().

uint8_t BungeeWaypoint
static

Definition at line 77 of file nav_bungee_takeoff.c.

Referenced by nav_bungee_takeoff_run(), and nav_bungee_takeoff_setup().

enum TakeoffStatus CTakeoffStatus
static

Definition at line 68 of file nav_bungee_takeoff.c.

Referenced by nav_bungee_takeoff_run(), and nav_bungee_takeoff_setup().

float initialx
static

Definition at line 71 of file nav_bungee_takeoff.c.

Referenced by nav_bungee_takeoff_run(), and nav_bungee_takeoff_setup().

float initialy
static

Definition at line 72 of file nav_bungee_takeoff.c.

Referenced by nav_bungee_takeoff_run(), and nav_bungee_takeoff_setup().

float TDistance
static

Definition at line 76 of file nav_bungee_takeoff.c.

Referenced by nav_bungee_takeoff_run(), and nav_bungee_takeoff_setup().

float throttlePx
static

Definition at line 69 of file nav_bungee_takeoff.c.

Referenced by nav_bungee_takeoff_run(), and nav_bungee_takeoff_setup().

float throttlePy
static

Definition at line 70 of file nav_bungee_takeoff.c.

Referenced by nav_bungee_takeoff_run(), and nav_bungee_takeoff_setup().

float ThrottleSlope
static

Definition at line 73 of file nav_bungee_takeoff.c.

Referenced by nav_bungee_takeoff_run(), and nav_bungee_takeoff_setup().