NinjaFlight
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
instruments.c File Reference
#include <stdint.h>
#include <stdbool.h>
#include <string.h>
#include <platform.h>
#include "config/config.h"
#include "imu.h"
#include "instruments.h"
#include "system_calls.h"
Include dependency graph for instruments.c:

Enumerations

enum  { INS_USE_SENSOR_GYRO = (1 << 0), INS_USE_SENSOR_ACC = (1 << 1), INS_USE_SENSOR_MAG = (1 << 2) }
 

Functions

void ins_init (struct instruments *self, const struct config *config)
 Initializes all instruments using specified configuration. More...
 
bool ins_is_calibrated (struct instruments *self)
 
void ins_start_acc_calibration (struct instruments *self)
 
void ins_start_gyro_calibration (struct instruments *self)
 
void ins_start_mag_calibration (struct instruments *self)
 
void ins_process_gyro (struct instruments *self, int32_t x, int32_t y, int32_t z)
 
void ins_process_acc (struct instruments *self, int32_t x, int32_t y, int32_t z)
 
void ins_process_mag (struct instruments *self, int32_t x, int32_t y, int32_t z)
 
void ins_update (struct instruments *self, float dt)
 
uint32_t ins_get_altitude_cm (struct instruments *self)
 returns estimated altitude above sea level in cm More...
 
int16_t ins_get_vertical_speed_cms (struct instruments *self)
 returns vertical speed in cm/s More...