Implementation of detumbling for the Delfi-PQ.
Repository aims to perform some sensor fusion using BMX-055. It finally aims to implement the B_dot
detumbling algorithm to stabilize the satellite.
Some of the code might be inherited from https://github.com/DelfiSpace
Branches to be diverged in future:
- Accelerometer: tbd - filters cutoff
- Gyroscope: tbd -
- Magnetometer: IN PROGRESS: scroll below for status
- Detumbling: IN PROGRESS: navigate here
- Sensor fusion: tbd - understand quaternions, explore Kalman filter, sun sensor + magnetometer
- Magnetorquer: tbd - perform self test closed loop (maybe even the thruster with acc)
- initialized in a good enough (alive) mode - 10 repetitions per axis
- factory trim read from flash and used in calibration
- temperature compensation for magnetometer fused with the readings (Outer Space doesn't comply, if Bosch provides temperature scaling, might as well use it)
- random and long expressions from Bosch's sensortec library implemented for magnetometer
- bias compensation done with Android's "draw a figure 8 method". i.e. bias = (min + max)/2
- one of the results illustrated below
Earth's magnetic field with BMX055, Soft and Hard Iron errors visible in plots below (ref: https://www.vectornav.com/support/library/magnetometer)
- signed bit flip behaviour not checked strongly
- not still sure if resolutions and scaling is corresponding to actual uT values
- reset/i2c complications not studied yet
- soft reset yet to be implemented, in case ground station wants to give one more chance to ADCS
- API not coherently check for with MIPS and FLOPS
- possibilities of power saving modes not explored yet
- a strong + lite library far from implemented
- detumble_algo_msp: Source files for Hardware In Loop (HIL) tests of detumbling algo on MSP432.
- detumble_algo_pc: Source files for detumbling algo meant to be compiled on VS/GCC on PC.
- magnetometer_test: Source files for talking to the BMX using MSP432, (with trimming and temperature compensation)
- plotters: Python and MATLAB scripts for performing HIL tests, magnetometer calibrations, plotting comparisons between MATLAB, PC and MSP.
- uartecho_FPU: Parsing floats and interpreting newlines might be different for Windows and Linux. Source files in this folder facilitate early stage debugging before moving to HIL tests.