dRonin  adbada4
dRonin firmware
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
insgps16state.c File Reference
#include "insgps.h"
#include "physical_constants.h"
#include <math.h>
#include <stdint.h>

Go to the source code of this file.

Macros

#define NUMX   16
 
#define NUMW   12
 
#define NUMV   10
 
#define NUMU   6
 

Functions

void CovariancePrediction (float F[NUMX][NUMX], float G[NUMX][NUMW], float Q[NUMW], float dT, float P[NUMX][NUMX])
 
void SerialUpdate (float H[NUMV][NUMX], float R[NUMV], float Z[NUMV], float Y[NUMV], float P[NUMX][NUMX], float X[NUMX], uint16_t SensorsUsed)
 
void RungeKutta (float X[NUMX], float U[NUMU], float dT)
 
void StateEq (float X[NUMX], float U[NUMU], float Xdot[NUMX])
 
void LinearizeFG (float X[NUMX], float U[NUMU], float F[NUMX][NUMX], float G[NUMX][NUMW])
 
void MeasurementEq (float X[NUMX], float Be[3], float Y[NUMV])
 
void LinearizeH (float X[NUMX], float Be[3], float H[NUMV][NUMX])
 
uint16_t ins_get_num_states ()
 
void INSGPSInit ()
 
void INSSetArmed (bool armed)
 Set the current flight state. More...
 
void INSGetState (float *pos, float *vel, float *attitude, float *gyro_bias, float *accel_bias)
 
void INSGetVariance (float *var_out)
 
void INSResetP (const float *PDiag)
 
void INSSetState (const float pos[3], const float vel[3], const float q[4], const float gyro_bias[3], const float accel_bias[3])
 
void INSPosVelReset (const float pos[3], const float vel[3])
 
void INSSetPosVelVar (float PosVar, float VelVar, float VertPosVar)
 
void INSSetGyroBias (const float gyro_bias[3])
 
void INSSetAccelBias (const float accel_bias[3])
 
void INSSetAccelVar (const float accel_var[3])
 
void INSSetGyroVar (const float gyro_var[3])
 
void INSSetMagVar (const float scaled_mag_var[3])
 
void INSSetBaroVar (const float baro_var)
 
void INSSetMagNorth (const float B[3])
 
void INSStatePrediction (const float gyro_data[3], const float accel_data[3], float dT)
 
void INSCovariancePrediction (float dT)
 
void INSCorrection (const float mag_data[3], const float Pos[3], const float Vel[3], float BaroAlt, uint16_t SensorsUsed)
 

Variables

float F [NUMX][NUMX]
 
float G [NUMX][NUMW]
 
float H [NUMV][NUMX]
 
float Be [3]
 
float P [NUMX][NUMX]
 
float X [NUMX]
 
float Q [NUMW]
 
float R [NUMV]
 
float K [NUMX][NUMV]