EraGlonassAsi15/Inc/EraGlonassAsi15.h

38 lines
796 B
C

//
// Created by xemon on 22.11.22.
//
#ifndef UVEOS_ON_NATION_ERAGLONASSASI15_H
#define UVEOS_ON_NATION_ERAGLONASSASI15_H
#include "vector.h"
#include "stdbool.h"
typedef struct {
int count;
vector3 elements[150];
} tAsi15AccelEventType;
typedef struct {
vector3 aT[150];
float asi[150];
float asi15[150];
tAsi15AccelEventType tLIS331HHFirstEventArray;
tAsi15AccelEventType tLIS331HHSecondEventArray;
uint32_t counter;
float *threshold;
bool impactDetected;
} tEraGlonassAsi15;
void EraGlonassAsi15_Init(tEraGlonassAsi15 *env, float *threshold);
float EraGlonassAsi15_GetCurrentValue(tEraGlonassAsi15 *env);
void EraGlonassAsi15_ApplyCurrentAccel(tEraGlonassAsi15 *env, vector3 currentAcceleration);
#endif //UVEOS_ON_NATION_ERAGLONASSASI15_H