diff options
| author | Dawsyn Schraiber <[email protected]> | 2024-06-13 14:30:58 -0400 |
|---|---|---|
| committer | GitHub <[email protected]> | 2024-06-13 14:30:58 -0400 |
| commit | 58b4bc754bbb9f5197119cd0c124e49c05acff46 (patch) | |
| tree | 8a65e23756374626e2c9cb997af9d8ed6f892390 /src/AltEst/altitude.h | |
| parent | 8fbd08fe29bbc2246a78b481b219c241f62ff420 (diff) | |
| download | active-drag-system-58b4bc754bbb9f5197119cd0c124e49c05acff46.tar.gz active-drag-system-58b4bc754bbb9f5197119cd0c124e49c05acff46.tar.bz2 active-drag-system-58b4bc754bbb9f5197119cd0c124e49c05acff46.zip | |
Where to begin…. (#13)
+/- Reworked collection of altimeter related functions into altimeter class
+/- Reworked bno055 class to be imu class with minimal functionality
\- Removed external Kalman filter implementations in favor of own in house version
\- Removed any/unused files
\+ Added buffer logger for when sitting on pad for extended period of time in effort to prevent filling of flash chip
\+ Added heartbeat LED for alive status
Diffstat (limited to 'src/AltEst/altitude.h')
| -rw-r--r-- | src/AltEst/altitude.h | 55 |
1 files changed, 0 insertions, 55 deletions
diff --git a/src/AltEst/altitude.h b/src/AltEst/altitude.h deleted file mode 100644 index 1ca6cb0..0000000 --- a/src/AltEst/altitude.h +++ /dev/null @@ -1,55 +0,0 @@ -/* - altitude.h: Altitude estimation via barometer/accelerometer fusion -*/ - -# pragma once - -#include "filters.h" -#include "algebra.h" -#include "pico/time.h" -#include "pico/types.h" - -class AltitudeEstimator { - - private: - // required parameters for the filters used for the estimations - // sensor's standard deviations - float sigmaAccel; - float sigmaGyro; - float sigmaBaro; - // Acceleration markov chain model state transition constant - float ca; - // Zero-velocity update acceleration threshold - float accelThreshold; - // gravity - float g = 9.81; - // For computing the sampling period - absolute_time_t prevTime = get_absolute_time(); - uint32_t previousTime = to_us_since_boot(prevTime); - // required filters for altitude and vertical velocity estimation - KalmanFilter kalman; - ComplementaryFilter complementary; - // Estimated past vertical acceleration - float pastVerticalAccel = 0; - float pastVerticalVelocity = 0; - float pastAltitude = 0; - float pastGyro[3] = {0, 0, 0}; - float pastAccel[3] = {0, 0, 0}; - // estimated altitude and vertical velocity - float estimatedAltitude = 0; - float estimatedVelocity = 0; - - public: - - AltitudeEstimator(float sigmaAccel, float sigmaGyro, float sigmaBaro, - float ca, float accelThreshold); - - void estimate(float accel[3], float gyro[3], float baroHeight, uint32_t timestamp); - - float getAltitude(); - - float getVerticalVelocity(); - - float getVerticalAcceleration(); - -}; // class AltitudeEstimator |
