Paparazzi UAS
v5.12_stable-4-g9b43e9b
Paparazzi is a free software Unmanned Aircraft System.
|
mission navigation for fixedwing aircraft More...
#include <stdio.h>
#include "modules/mission/mission_common.h"
#include "autopilot.h"
#include "firmwares/fixedwing/nav.h"
#include "subsystems/navigation/common_nav.h"
#include "generated/flight_plan.h"
Go to the source code of this file.
Functions | |
bool | mission_point_of_lla (struct EnuCoor_f *point, struct LlaCoor_i *lla) |
Utility function: converts lla (int) to local point (float) More... | |
static bool | mission_nav_wp (struct _mission_wp *wp) |
Navigation function to a single waypoint. More... | |
static bool | mission_nav_circle (struct _mission_circle *circle) |
Navigation function on a circle. More... | |
static bool | mission_nav_segment (struct _mission_segment *segment) |
Navigation function along a segment. More... | |
static bool | mission_nav_path (struct _mission_path *path) |
Navigation function along a path. More... | |
int | mission_run () |
Run mission. More... | |
Variables | |
const float | dt_navigation = 1.0 / ((float)NAVIGATION_FREQUENCY) |
struct EnuCoor_f | last_wp_f = { 0., 0., 0. } |
mission navigation for fixedwing aircraft
Implement specific navigation routines for the mission control of a fixedwing aircraft
Definition in file mission_fw_nav.c.
|
inlinestatic |
Navigation function on a circle.
Definition at line 89 of file mission_fw_nav.c.
References _mission_circle::center, nav_circle_XY(), NavVerticalAltitudeMode, NavVerticalAutoThrottleMode, and _mission_circle::radius.
Referenced by mission_run().
|
inlinestatic |
Navigation function along a path.
Definition at line 114 of file mission_fw_nav.c.
References CARROT, mission_nav_wp(), nav_approaching_xy(), nav_route_xy(), NavVerticalAltitudeMode, NavVerticalAutoThrottleMode, _mission_path::nb, _mission_path::path, _mission_path::path_idx, _mission_wp::wp, EnuCoor_f::x, EnuCoor_f::y, and EnuCoor_f::z.
Referenced by mission_run().
|
inlinestatic |
Navigation function along a segment.
Definition at line 99 of file mission_fw_nav.c.
References CARROT, _mission_segment::from, nav_approaching_xy(), nav_route_xy(), NavVerticalAltitudeMode, NavVerticalAutoThrottleMode, and _mission_segment::to.
Referenced by mission_run().
|
inlinestatic |
Navigation function to a single waypoint.
Definition at line 74 of file mission_fw_nav.c.
References CARROT, fly_to_xy(), nav_approaching_xy(), NavVerticalAltitudeMode, NavVerticalAutoThrottleMode, _mission_wp::wp, EnuCoor_f::x, and EnuCoor_f::y.
Referenced by mission_nav_path(), and mission_run().
Utility function: converts lla (int) to local point (float)
Get the ENU component of LLA mission point This function is firmware specific.
TODO: don't convert to float, either use double or do completely in fixed point
Definition at line 38 of file mission_fw_nav.c.
References LlaCoor_i::alt, UtmCoor_f::east, LLA_FLOAT_OF_BFP, max_dist_from_home, nav_utm_east0, nav_utm_north0, nav_utm_zone0, UtmCoor_f::north, utm_of_lla_f(), waypoints, point::x, EnuCoor_f::x, point::y, EnuCoor_f::y, EnuCoor_f::z, and UtmCoor_f::zone.
int mission_run | ( | void | ) |
Run mission.
This function should be implemented into a dedicated file since navigation functions are different for different firmwares
Currently, this function should be called from the flight plan
Definition at line 142 of file mission_fw_nav.c.
References _mission::current_idx, dt_navigation, _mission_element::duration, _mission_element::element, _mission::element_time, mission, MISSION_ELEMENT_NB, mission_get(), mission_nav_circle(), mission_nav_path(), mission_nav_segment(), mission_nav_wp(), MissionCircle, MissionPath, MissionSegment, MissionWP, and _mission_element::type.
const float dt_navigation = 1.0 / ((float)NAVIGATION_FREQUENCY) |
Definition at line 67 of file mission_fw_nav.c.
Referenced by mission_run().
struct EnuCoor_f last_wp_f = { 0., 0., 0. } |
Definition at line 70 of file mission_fw_nav.c.