dRonin  adbada4
dRonin firmware
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
fixedwingpathfollower.c File Reference

This module compared PositionActual to PathDesired and sets StabilizationDesired. It only does this when the FlightMode field of ManualControlCommand is Auto. More...

#include "openpilot.h"
#include "physical_constants.h"
#include "paths.h"
#include "misc_math.h"
#include "modulesettings.h"
#include "attitudeactual.h"
#include "pathdesired.h"
#include "positionactual.h"
#include "flightstatus.h"
#include "pathstatus.h"
#include "airspeedactual.h"
#include "gpsvelocity.h"
#include "gpsposition.h"
#include "fixedwingairspeeds.h"
#include "fixedwingpathfollowersettings.h"
#include "fixedwingpathfollowerstatus.h"
#include "homelocation.h"
#include "nedposition.h"
#include "stabilizationdesired.h"
#include "stabilizationsettings.h"
#include "systemsettings.h"
#include "velocitydesired.h"
#include "velocityactual.h"
#include "coordinate_conversions.h"
#include "pios_thread.h"

Go to the source code of this file.

Macros

#define MAX_QUEUE_SIZE   4
 
#define STACK_SIZE_BYTES   1548
 
#define TASK_PRIORITY   PIOS_THREAD_PRIO_NORMAL
 

Functions

static void pathfollowerTask (void *parameters)
 
static void SettingsUpdatedCb (const UAVObjEvent *ev, void *ctx, void *obj, int len)
 
static void updatePathVelocity ()
 
static uint8_t updateFixedDesiredAttitude ()
 
static void airspeedActualUpdatedCb (const UAVObjEvent *ev, void *ctx, void *obj, int len)
 
int32_t FixedWingPathFollowerStart ()
 
int32_t FixedWingPathFollowerInitialize ()
 

Variables

static bool module_enabled = false
 
static struct pios_thread * pathfollowerTaskHandle
 
static PathDesiredData pathDesired
 
static PathStatusData pathStatus
 
static
FixedWingPathFollowerSettingsData 
fixedwingpathfollowerSettings
 
static FixedWingAirspeedsData fixedWingAirspeeds
 
static float northVelIntegral = 0
 
static float eastVelIntegral = 0
 
static float downVelIntegral = 0
 
static float bearingIntegral = 0
 
static float speedIntegral = 0
 
static float accelIntegral = 0
 
static float powerIntegral = 0
 
static float airspeedErrorInt =0
 
static float indicatedAirspeedActualBias = 0
 
static bool path_desired_updated
 

Detailed Description

This module compared PositionActual to PathDesired and sets StabilizationDesired. It only does this when the FlightMode field of ManualControlCommand is Auto.

Author
dRonin, http://dRonin.org/, Copyright (C) 2015-2016
Tau Labs, http://taulabs.org, Copyright (C) 2013-2014
The OpenPilot Team, http://www.openpilot.org Copyright (C) 2010.
See Also
The GNU Public License (GPL) Version 3

Definition in file fixedwingpathfollower.c.