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

Collects statistcs during the flight. More...

#include "openpilot.h"
#include "modulesettings.h"
#include "pios_thread.h"
#include "misc_math.h"
#include "airspeedactual.h"
#include "flightbatterystate.h"
#include "flightstatus.h"
#include "flightstats.h"
#include "flightstatssettings.h"
#include "gyros.h"
#include "positionactual.h"
#include "velocityactual.h"

Go to the source code of this file.

Macros

#define STACK_SIZE_BYTES   600
 
#define TASK_PRIORITY   PIOS_THREAD_PRIO_LOW
 

Functions

static void flightStatsTask (void *parameters)
 
static bool isArmed ()
 
static void resetStats (FlightStatsData *stats)
 
static void collectStats (FlightStatsData *stats)
 
int32_t FlightStatsModuleInitialize (void)
 
int32_t FlightStatModuleStart (void)
 
 MODULE_INITCALL (FlightStatsModuleInitialize, FlightStatModuleStart)
 

Variables

static bool module_enabled
 
static struct pios_thread * flightStatsTaskHandle
 
static volatile
FlightStatsSettingsData 
settings
 
static PositionActualData lastPositionActual
 
static float initial_consumed_energy
 
static float previous_consumed_energy
 

Detailed Description

Collects statistcs during the flight.

Author
Tau Labs, http://taulabs.org, Copyright (C) 2015
dRonin, http://dronin.org Copyright (C) 2015
See Also
The GNU Public License (GPL) Version 3

Definition in file flightstatsmodule.c.