ACwing FC firmware
STM32WB55: attitude IEKF, altitude Kalman filter, flight core, protocol v2
Loading...
Searching...
No Matches
calib_mgr.c File Reference

Calibration state machines (see calib_mgr.h, HANDOVER_FW.md §10). More...

#include "calib_mgr.h"
#include "proto_v2.h"
#include <math.h>
#include <string.h>
Include dependency graph for calib_mgr.c:

Go to the source code of this file.

Macros

#define D2R   0.017453292519943295f
 
#define R2D   57.29577951308232f
 
#define STILL_GYRO   (3.0f * D2R) /* rad/s: "still" */
 
#define ACCEL_STILL_MS   2000u /* still window per position */
 
#define LEVEL_MS   5000u
 
#define GYRO_MS   5000u
 
#define GYRO_MAX_RESTARTS   3u
 
#define COMPASS_MIN_SAMPLES   150u
 
#define COMPASS_KEEP   256u /* samples kept for the quality figure */
 

Functions

void cal_set_defaults (cal_set_t *s, const float hi[3])
 
void cal_copy_type (cal_set_t *d, const cal_set_t *s, uint8_t type)
 copies the part of 'src' that belongs to 'type' into 'dst'
 
void cal_set_sensors (uint16_t sensors)
 expansion board detected later
 
void cal_init (const cal_config_t *cfg, cal_set_t *active)
 active: the set in effect (RAM), owned by the caller.
 
static void set_state (uint8_t st, uint8_t step)
 
static void apply (const cal_set_t *set)
 
static void revert (void)
 
static void fail (uint8_t reason)
 
static void done (uint8_t step)
 
uint8_t cal_active (void)
 a calibration exists (any state but IDLE)
 
uint8_t cal_running (void)
 active and not DONE: blocks arming / other starts
 
uint8_t cal_type (void)
 
const cal_set_t * cal_result (void)
 
uint8_t cal_wants_samples (void)
 
uint8_t cal_take_changed (void)
 1 if the state/step changed since the last call (send a CALIB frame now)
 
uint8_t cal_take_failed (void)
 1 + type once when a calibration failed (EVENT 51), 0 otherwise
 
uint8_t cal_start (uint8_t type, uint8_t option, uint8_t armed, uint32_t now, uint8_t *reason)
 
uint8_t cal_abort (uint8_t *reason)
 
uint8_t cal_save_check (uint8_t *reason)
 CAL_SAVE validation: returns the ACK; on OK the caller writes the result (cal_result()) to flash and then calls cal_saved()
 
void cal_saved (void)
 state SAVED (one frame), then IDLE
 
static int accel_position (const float a[3])
 
static int first_missing (uint8_t mask)
 
static void accel_fit (void)
 
static void accel_capture_pos (int pos)
 
static void accel_feed (const cal_sample_t *s, uint32_t now)
 
static void level_feed (const cal_sample_t *s, uint32_t now)
 
static void gyro_feed (const cal_sample_t *s, uint32_t now)
 
static void bin (int ring, float a, float b)
 
static uint8_t coverage_count (void)
 
static int solve6 (double A6[6][6], double b6[6], double x[6])
 
static void compass_fit (void)
 
static void compass_feed (const cal_sample_t *s)
 
void cal_feed (const cal_sample_t *s, uint32_t now)
 
void cal_tick (uint32_t now)
 
uint8_t cal_capture (uint32_t now, uint8_t *reason)
 
uint8_t cal_set_ref (uint8_t type, uint8_t index, float v, uint8_t *reason)
 
static int16_t cl16 (float v)
 
static uint16_t clu16 (float v)
 
size_t cal_frame (uint8_t *out, size_t cap)
 CALIB frame for the current calibration; 0 if none.
 

Variables

static cal_config_t s_cfg
 
static cal_set_t * s_active
 
static cal_set_t s_prev
 
static cal_set_t s_res
 
static uint8_t s_applied
 
static uint8_t s_type
 
static uint8_t s_state
 
static uint8_t s_step
 
static uint8_t s_progress
 
static uint8_t s_quality
 
static uint8_t s_reason
 
static uint8_t s_changed
 
static uint8_t s_failed_type
 
static uint32_t s_t0
 
static uint32_t s_now
 
struct { 
 
   uint8_t   done_mask 
 
   uint8_t   current 
 
   uint8_t   still_pct 
 
   uint8_t   pos 
 
   float   sum [3] 
 
   uint32_t   n 
 
   uint32_t   t_still 
 
   float   cap [6][3] 
 
   float   last_g 
 
   float   last_a [3] 
 
   float   fit_err_pct 
 
} A 
 
struct { 
 
   double   sr 
 
   double   sp 
 
   double   sr2 
 
   double   sp2 
 
   uint32_t   n 
 
   float   roll 
 
   float   pitch 
 
   uint16_t   remaining 
 
} L 
 
struct { 
 
   double   s [3] 
 
   double   s2 [3] 
 
   uint32_t   n 
 
   uint8_t   restarts 
 
   float   bias [3] 
 
   float   noise 
 
   uint16_t   remaining 
 
} G 
 
struct { 
 
   float   vbat 
 
   float   used 
 
   float   scale_i_used 
 
} B 
 
struct { 
 
   double   N [6][6] 
 
   double   b [6] 
 
   uint32_t   n 
 
   uint8_t   cov [5] 
 
   float   keep [COMPASS_KEEP][3] 
 
   uint16_t   nkeep 
 
   uint16_t   kidx 
 
   uint8_t   interf 
 
   uint8_t   qual 
 
} C 
 

Detailed Description

Calibration state machines (see calib_mgr.h, HANDOVER_FW.md §10).

Behavioural reference: calStart/calCapture/stepCal in simDrone.ts.

Definition in file calib_mgr.c.

Macro Definition Documentation

◆ D2R

#define D2R   0.017453292519943295f

Definition at line 11 of file calib_mgr.c.

◆ R2D

#define R2D   57.29577951308232f

Definition at line 12 of file calib_mgr.c.

◆ STILL_GYRO

#define STILL_GYRO   (3.0f * D2R) /* rad/s: "still" */

Definition at line 13 of file calib_mgr.c.

◆ ACCEL_STILL_MS

#define ACCEL_STILL_MS   2000u /* still window per position */

Definition at line 14 of file calib_mgr.c.

◆ LEVEL_MS

#define LEVEL_MS   5000u

Definition at line 15 of file calib_mgr.c.

◆ GYRO_MS

#define GYRO_MS   5000u

Definition at line 16 of file calib_mgr.c.

◆ GYRO_MAX_RESTARTS

#define GYRO_MAX_RESTARTS   3u

Definition at line 17 of file calib_mgr.c.

◆ COMPASS_MIN_SAMPLES

#define COMPASS_MIN_SAMPLES   150u

Definition at line 18 of file calib_mgr.c.

◆ COMPASS_KEEP

#define COMPASS_KEEP   256u /* samples kept for the quality figure */

Definition at line 19 of file calib_mgr.c.

Function Documentation

◆ cal_set_defaults()

void cal_set_defaults ( cal_set_t *  s,
const float  hi[3] 
)

Definition at line 60 of file calib_mgr.c.

References s.

Referenced by app_task_boot(), and cal_from_v1().

Here is the caller graph for this function:

◆ cal_copy_type()

void cal_copy_type ( cal_set_t *  d,
const cal_set_t *  s,
uint8_t  type 
)

copies the part of 'src' that belongs to 'type' into 'dst'

Definition at line 72 of file calib_mgr.c.

References cal_set_t::accel, cal_set_t::battery, bit(), cal_set_t::compass, cal_set_t::done_mask, cal_set_t::gyro, cal_set_t::level, cal_set_t::motors, PV2_CAL_ACCEL, PV2_CAL_BATTERY, PV2_CAL_COMPASS, PV2_CAL_GYRO, PV2_CAL_LEVEL, PV2_CAL_MOTORS, and s.

Referenced by apply(), ImuTask(), local_cmd(), and take_calibrations().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ cal_set_sensors()

void cal_set_sensors ( uint16_t  sensors)

expansion board detected later

Definition at line 87 of file calib_mgr.c.

References s_cfg, and cal_config_t::sensors.

Referenced by app_step().

Here is the caller graph for this function:

◆ cal_init()

void cal_init ( const cal_config_t *  cfg,
cal_set_t *  active 
)

active: the set in effect (RAM), owned by the caller.

DONE applies the new values to it (and to the estimator through the hook); ABORT, a failure or a lost app link put the previous values back.

Definition at line 89 of file calib_mgr.c.

References PV2_CS_IDLE, s_active, s_applied, s_cfg, s_changed, s_failed_type, s_state, and s_type.

Referenced by app_init().

Here is the caller graph for this function:

◆ set_state()

static void set_state ( uint8_t  st,
uint8_t  step 
)
static

Definition at line 97 of file calib_mgr.c.

References s_changed, s_state, s_step, and st().

Referenced by cal_capture(), cal_saved(), cal_set_ref(), cal_start(), done(), and fail().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ apply()

static void apply ( const cal_set_t *  set)
static

Definition at line 103 of file calib_mgr.c.

References cal_config_t::apply, cal_copy_type(), s_active, s_cfg, s_type, and set.

Referenced by cal_set_ref(), done(), and revert().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ revert()

static void revert ( void  )
static

Definition at line 109 of file calib_mgr.c.

References apply(), s_applied, and s_prev.

Referenced by cal_abort(), cal_start(), and fail().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ fail()

static void fail ( uint8_t  reason)
static

Definition at line 114 of file calib_mgr.c.

References PV2_CS_FAILED, revert(), s_failed_type, s_reason, s_step, s_type, and set_state().

Referenced by accel_fit(), compass_fit(), gyro_feed(), and level_feed().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ done()

static void done ( uint8_t  step)
static

Definition at line 122 of file calib_mgr.c.

References apply(), PV2_CS_DONE, s_applied, s_progress, s_res, and set_state().

Referenced by accel_fit(), checks_build(), compass_fit(), gyro_feed(), and level_feed().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ cal_active()

uint8_t cal_active ( void  )

a calibration exists (any state but IDLE)

Definition at line 131 of file calib_mgr.c.

References PV2_CS_IDLE, and s_state.

Referenced by cal_abort(), cal_capture(), cal_frame(), cal_save_check(), cal_set_ref(), and calibration().

Here is the caller graph for this function:

◆ cal_running()

uint8_t cal_running ( void  )

active and not DONE: blocks arming / other starts

Definition at line 132 of file calib_mgr.c.

References PV2_CS_DONE, PV2_CS_IDLE, and s_state.

Referenced by app_step(), cal_start(), and local_cmd().

Here is the caller graph for this function:

◆ cal_type()

uint8_t cal_type ( void  )

Definition at line 133 of file calib_mgr.c.

References s_type.

Referenced by local_cmd().

Here is the caller graph for this function:

◆ cal_result()

const cal_set_t * cal_result ( void  )

Definition at line 134 of file calib_mgr.c.

References s_res.

Referenced by local_cmd().

Here is the caller graph for this function:

◆ cal_wants_samples()

uint8_t cal_wants_samples ( void  )

Definition at line 136 of file calib_mgr.c.

References PV2_CS_RUNNING, PV2_CS_WAITING_USER, and s_state.

Referenced by cal_feed(), and calibration().

Here is the caller graph for this function:

◆ cal_take_changed()

uint8_t cal_take_changed ( void  )

1 if the state/step changed since the last call (send a CALIB frame now)

Definition at line 141 of file calib_mgr.c.

References s_changed.

Referenced by calibration().

Here is the caller graph for this function:

◆ cal_take_failed()

uint8_t cal_take_failed ( void  )

1 + type once when a calibration failed (EVENT 51), 0 otherwise

Definition at line 143 of file calib_mgr.c.

References s_failed_type.

Referenced by events().

Here is the caller graph for this function:

◆ cal_start()

uint8_t cal_start ( uint8_t  type,
uint8_t  option,
uint8_t  armed,
uint32_t  now,
uint8_t *  reason 
)

Definition at line 150 of file calib_mgr.c.

References A, B, cal_config_t::batt, C, cal_running(), G, GYRO_MS, L, cal_set_t::level, LEVEL_MS, cal_config_t::motors_built, cal_level_t::pitch_deg, PV2_ACK_BUSY, PV2_ACK_INVALID, PV2_ACK_OK, PV2_ACK_REJECTED, PV2_ACK_UNSUPPORTED, PV2_CAL_ACCEL, PV2_CAL_BATTERY, PV2_CAL_COMPASS, PV2_CAL_FLOW_TOF, PV2_CAL_GYRO, PV2_CAL_LEVEL, PV2_CAL_MOTORS, PV2_CAL_STICKS, PV2_CS_DONE, PV2_CS_IDLE, PV2_CS_RUNNING, PV2_CS_WAITING_USER, PV2_R_ARMED, PV2_R_CALIBRATING, PV2_R_NONE, PV2_R_SENSOR_MISSING, PV2_S_CURRENT, PV2_S_ELRS, PV2_S_FLOW, PV2_S_MAG_FC, revert(), cal_level_t::roll_deg, s_active, s_applied, s_cfg, s_changed, s_now, s_prev, s_progress, s_quality, s_reason, s_res, s_state, s_step, s_t0, s_type, cal_config_t::sensors, and set_state().

Referenced by local_cmd().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ cal_abort()

uint8_t cal_abort ( uint8_t *  reason)

Definition at line 221 of file calib_mgr.c.

References cal_active(), PV2_ACK_OK, PV2_ACK_REJECTED, PV2_CS_IDLE, PV2_R_NONE, PV2_R_NOT_CALIBRATING, revert(), s_state, and s_type.

Referenced by calibration(), and local_cmd().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ cal_save_check()

uint8_t cal_save_check ( uint8_t *  reason)

CAL_SAVE validation: returns the ACK; on OK the caller writes the result (cal_result()) to flash and then calls cal_saved()

Definition at line 230 of file calib_mgr.c.

References cal_active(), cal_set_t::done_mask, PV2_ACK_OK, PV2_ACK_REJECTED, PV2_CAL_MOTORS, PV2_CS_DONE, PV2_R_NONE, PV2_R_NOT_CALIBRATING, s_active, s_res, s_state, and s_type.

Referenced by local_cmd().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ cal_saved()

void cal_saved ( void  )

state SAVED (one frame), then IDLE

Definition at line 242 of file calib_mgr.c.

References PV2_CS_SAVED, s_applied, s_step, and set_state().

Referenced by local_cmd().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ accel_position()

static int accel_position ( const float  a[3])
static

Definition at line 252 of file calib_mgr.c.

References pos.

Referenced by accel_feed(), and cal_capture().

Here is the caller graph for this function:

◆ first_missing()

static int first_missing ( uint8_t  mask)
static

Definition at line 265 of file calib_mgr.c.

Referenced by accel_capture_pos().

Here is the caller graph for this function:

◆ accel_fit()

static void accel_fit ( void  )
static

Definition at line 271 of file calib_mgr.c.

References A, cal_set_t::accel, done(), fail(), off, cal_accel_t::off, PV2_R_OUT_OF_RANGE, s_quality, s_res, and cal_accel_t::scale.

Referenced by accel_capture_pos().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ accel_capture_pos()

static void accel_capture_pos ( int  pos)
static

Definition at line 299 of file calib_mgr.c.

References A, accel_fit(), first_missing(), pos, s_changed, and s_progress.

Referenced by accel_feed(), and cal_capture().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ accel_feed()

static void accel_feed ( const cal_sample_t *  s,
uint32_t  now 
)
static

Definition at line 314 of file calib_mgr.c.

References A, accel_capture_pos(), accel_position(), ACCEL_STILL_MS, pos, s, s_changed, and STILL_GYRO.

Referenced by cal_feed().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ level_feed()

static void level_feed ( const cal_sample_t *  s,
uint32_t  now 
)
static

Definition at line 339 of file calib_mgr.c.

References done(), fail(), L, cal_set_t::level, LEVEL_MS, pitch, cal_level_t::pitch_deg, PV2_R_NOT_STILL, R2D, roll, cal_level_t::roll_deg, s, s_progress, s_quality, s_res, s_t0, sp, and STILL_GYRO.

Referenced by cal_feed().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ gyro_feed()

static void gyro_feed ( const cal_sample_t *  s,
uint32_t  now 
)
static

Definition at line 365 of file calib_mgr.c.

References cal_gyro_t::bias, done(), fail(), G, cal_set_t::gyro, GYRO_MAX_RESTARTS, GYRO_MS, PV2_R_NOT_STILL, R2D, s, s_progress, s_quality, s_res, s_t0, and STILL_GYRO.

Referenced by cal_feed().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ bin()

static void bin ( int  ring,
float  a,
float  b 
)
static

Definition at line 400 of file calib_mgr.c.

References b, and C.

Referenced by compass_feed().

Here is the caller graph for this function:

◆ coverage_count()

static uint8_t coverage_count ( void  )
static

Definition at line 410 of file calib_mgr.c.

References C, and n.

Referenced by compass_feed().

Here is the caller graph for this function:

◆ solve6()

static int solve6 ( double  A6[6][6],
double  b6[6],
double  x[6] 
)
static

Definition at line 418 of file calib_mgr.c.

References s.

Referenced by compass_fit().

Here is the caller graph for this function:

◆ compass_fit()

static void compass_fit ( void  )
static

Definition at line 440 of file calib_mgr.c.

References C, cal_set_t::compass, done(), fail(), cal_compass_t::hi, n, PV2_R_OUT_OF_RANGE, s2, s_quality, s_res, cal_compass_t::scale, and solve6().

Referenced by compass_feed().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ compass_feed()

static void compass_feed ( const cal_sample_t *  s)
static

Definition at line 477 of file calib_mgr.c.

References bin(), C, cal_set_t::compass, compass_fit(), COMPASS_KEEP, COMPASS_MIN_SAMPLES, coverage_count(), cal_compass_t::hi, n, s, s_prev, s_progress, and cal_compass_t::scale.

Referenced by cal_feed().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ cal_feed()

void cal_feed ( const cal_sample_t *  s,
uint32_t  now 
)

Definition at line 507 of file calib_mgr.c.

References accel_feed(), cal_wants_samples(), compass_feed(), gyro_feed(), level_feed(), PV2_CAL_ACCEL, PV2_CAL_COMPASS, PV2_CAL_GYRO, PV2_CAL_LEVEL, s, s_now, and s_type.

Referenced by calibration().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ cal_tick()

void cal_tick ( uint32_t  now)

Definition at line 520 of file calib_mgr.c.

References B, cal_config_t::batt, PV2_CAL_BATTERY, PV2_CS_DONE, PV2_CS_WAITING_USER, s_cfg, s_now, s_state, and s_type.

Referenced by calibration().

Here is the caller graph for this function:

◆ cal_capture()

uint8_t cal_capture ( uint32_t  now,
uint8_t *  reason 
)

Definition at line 528 of file calib_mgr.c.

References A, accel_capture_pos(), accel_position(), cal_active(), pos, PV2_ACK_INVALID, PV2_ACK_OK, PV2_ACK_REJECTED, PV2_CAL_ACCEL, PV2_CAL_BATTERY, PV2_CS_DONE, PV2_CS_WAITING_USER, PV2_R_NONE, PV2_R_NOT_CALIBRATING, PV2_R_NOT_STILL, s_state, s_type, set_state(), and STILL_GYRO.

Referenced by local_cmd().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ cal_set_ref()

uint8_t cal_set_ref ( uint8_t  type,
uint8_t  index,
float  v,
uint8_t *  reason 
)

Definition at line 547 of file calib_mgr.c.

References apply(), B, cal_set_t::battery, cal_active(), cal_set_t::level, cal_level_t::pitch_deg, PV2_ACK_INVALID, PV2_ACK_OK, PV2_ACK_REJECTED, PV2_CAL_BATTERY, PV2_CAL_LEVEL, PV2_CS_DONE, PV2_CS_WAITING_USER, PV2_R_NONE, PV2_R_NOT_CALIBRATING, PV2_R_OUT_OF_RANGE, PV2_R_SENSOR_MISSING, cal_level_t::roll_deg, s_applied, s_changed, s_res, s_state, s_type, cal_battery_t::scale_i, cal_battery_t::scale_v, and set_state().

Referenced by local_cmd().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ cl16()

static int16_t cl16 ( float  v)
static

Definition at line 589 of file calib_mgr.c.

Referenced by cal_frame().

Here is the caller graph for this function:

◆ clu16()

static uint16_t clu16 ( float  v)
static

Definition at line 590 of file calib_mgr.c.

Referenced by cal_frame().

Here is the caller graph for this function:

◆ cal_frame()

size_t cal_frame ( uint8_t *  out,
size_t  cap 
)

CALIB frame for the current calibration; 0 if none.

Definition at line 592 of file calib_mgr.c.

References A, cal_set_t::accel, B, b, cal_set_t::battery, C, cal_active(), cap, cl16(), clu16(), G, L, cal_set_t::level, n, cal_accel_t::off, cal_level_t::pitch_deg, PV2_CAL_ACCEL, PV2_CAL_BATTERY, PV2_CAL_COMPASS, PV2_CAL_GYRO, PV2_CAL_LEVEL, pv2_calib(), PV2_CS_DONE, PV2_CS_IDLE, PV2_CS_SAVED, R2D, cal_level_t::roll_deg, s_active, s_progress, s_quality, s_reason, s_res, s_state, s_step, s_type, cal_accel_t::scale, cal_battery_t::scale_i, and cal_battery_t::scale_v.

Referenced by send_calib().

Here is the call graph for this function:
Here is the caller graph for this function:

Variable Documentation

◆ s_cfg

cal_config_t s_cfg
static

Definition at line 21 of file calib_mgr.c.

Referenced by apply(), cal_init(), cal_set_sensors(), cal_start(), and cal_tick().

◆ s_active

cal_set_t* s_active
static

Definition at line 22 of file calib_mgr.c.

Referenced by apply(), cal_frame(), cal_init(), cal_save_check(), and cal_start().

◆ s_prev

cal_set_t s_prev
static

Definition at line 23 of file calib_mgr.c.

Referenced by cal_start(), compass_feed(), and revert().

◆ s_res

◆ s_applied

uint8_t s_applied
static

Definition at line 25 of file calib_mgr.c.

Referenced by cal_init(), cal_saved(), cal_set_ref(), cal_start(), done(), and revert().

◆ s_type

uint8_t s_type
static

◆ s_state

◆ s_step

uint8_t s_step
static

Definition at line 27 of file calib_mgr.c.

Referenced by cal_frame(), cal_saved(), cal_start(), fail(), and set_state().

◆ s_progress

uint8_t s_progress
static

◆ s_quality

uint8_t s_quality
static

Definition at line 27 of file calib_mgr.c.

Referenced by accel_fit(), cal_frame(), cal_start(), compass_fit(), gyro_feed(), and level_feed().

◆ s_reason

uint8_t s_reason
static

Definition at line 27 of file calib_mgr.c.

Referenced by cal_frame(), cal_start(), and fail().

◆ s_changed

uint8_t s_changed
static

◆ s_failed_type

uint8_t s_failed_type
static

Definition at line 28 of file calib_mgr.c.

Referenced by cal_init(), cal_take_failed(), and fail().

◆ s_t0

uint32_t s_t0
static

Definition at line 29 of file calib_mgr.c.

Referenced by cal_start(), gyro_feed(), and level_feed().

◆ s_now

uint32_t s_now
static

Definition at line 30 of file calib_mgr.c.

Referenced by cal_feed(), cal_start(), and cal_tick().

◆ done_mask

uint8_t done_mask

Definition at line 34 of file calib_mgr.c.

◆ current

uint8_t current

Definition at line 34 of file calib_mgr.c.

◆ still_pct

uint8_t still_pct

Definition at line 34 of file calib_mgr.c.

◆ pos

◆ sum

float sum[3]

Definition at line 35 of file calib_mgr.c.

◆ n

◆ t_still

uint32_t t_still

Definition at line 35 of file calib_mgr.c.

◆ cap

◆ last_g

float last_g

Definition at line 37 of file calib_mgr.c.

◆ last_a

float last_a[3]

Definition at line 38 of file calib_mgr.c.

◆ fit_err_pct

float fit_err_pct

Definition at line 39 of file calib_mgr.c.

◆ [struct]

◆ sr

double sr

Definition at line 42 of file calib_mgr.c.

Referenced by status(), wait_ready(), and write_enable().

◆ sp

double sp

Definition at line 42 of file calib_mgr.c.

Referenced by flight_service(), level_feed(), log_records(), logf_vert(), and setpoints().

◆ sr2

double sr2

Definition at line 42 of file calib_mgr.c.

◆ sp2

double sp2

Definition at line 42 of file calib_mgr.c.

◆ roll

float roll

Definition at line 43 of file calib_mgr.c.

Referenced by level_feed().

◆ pitch

float pitch

Definition at line 43 of file calib_mgr.c.

Referenced by level_feed().

◆ remaining

uint16_t remaining

Definition at line 43 of file calib_mgr.c.

◆ [struct]

struct { ... } L

◆ s

double s[3]

◆ s2

double s2[3]

Definition at line 46 of file calib_mgr.c.

Referenced by compass_fit().

◆ restarts

uint8_t restarts

Definition at line 46 of file calib_mgr.c.

◆ bias

float bias[3]

Definition at line 47 of file calib_mgr.c.

◆ noise

float noise

Definition at line 47 of file calib_mgr.c.

◆ [struct]

struct { ... } G

◆ vbat

float vbat

Definition at line 50 of file calib_mgr.c.

Referenced by cal_batt().

◆ used

float used

Definition at line 50 of file calib_mgr.c.

Referenced by cal_batt(), find(), flush_page(), log_q_put(), push(), and slot().

◆ scale_i_used

float scale_i_used

Definition at line 50 of file calib_mgr.c.

◆ [struct]

struct { ... } B

◆ N

double N[6][6]

Definition at line 53 of file calib_mgr.c.

Referenced by alt_est_predict().

◆ b

◆ cov

uint8_t cov[5]

Definition at line 54 of file calib_mgr.c.

◆ keep

float keep[COMPASS_KEEP][3]

Definition at line 55 of file calib_mgr.c.

◆ nkeep

uint16_t nkeep

Definition at line 55 of file calib_mgr.c.

◆ kidx

uint16_t kidx

Definition at line 55 of file calib_mgr.c.

◆ interf

uint8_t interf

Definition at line 56 of file calib_mgr.c.

◆ qual

uint8_t qual

Definition at line 56 of file calib_mgr.c.

◆ [struct]