Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
580a2e4
Added QMEKF from bolerplate
ChrisEgan06 Nov 20, 2025
287965a
Packages Added
ChrisEgan06 Nov 20, 2025
c35401a
Added utils
ChrisEgan06 Nov 20, 2025
e3ff379
Made into platformio package, wrote test cases
abhayma1000 Dec 3, 2025
f034a9e
Initialization and book keeping
abhayma1000 Dec 3, 2025
5b44007
killed QMEKF
ChrisEgan06 Dec 3, 2025
83cc373
Got rid of errors
abhayma1000 Dec 3, 2025
63ae7ce
new
176238837DHH Dec 3, 2025
8d4d260
Finished base EKF writing
abhayma1000 Dec 4, 2025
6f5a9da
Current prog from B term. Going on vacay
abhayma1000 Dec 23, 2025
bbeb375
More developments
abhayma1000 Jan 14, 2026
f3a467d
allan var and standard var stuff
abhayma1000 Jan 23, 2026
e84ef24
Deterministic errors scripts
abhayma1000 Feb 4, 2026
6237380
Added allan variance script, including output, must change units
ChrisEgan06 Feb 5, 2026
7ee8921
Stuff
abhayma1000 Feb 11, 2026
e9c2ddf
Now it builds and added boards and stuff
ChrisEgan06 Feb 11, 2026
2dc6b13
Updated serial state output
ChrisEgan06 Feb 11, 2026
31fc61a
Debugging, just printing sensor data, spaghetti code
ChrisEgan06 Feb 11, 2026
a676fe5
wokring gyro readings
ChrisEgan06 Feb 11, 2026
7de00de
prints state
ChrisEgan06 Feb 11, 2026
e629c11
Compute initial quaternion I think
abhayma1000 Feb 11, 2026
7a1822a
I am hungry, unit conversions done, quaternion nan
ChrisEgan06 Feb 11, 2026
a1726b7
vel ned and diag P
abhayma1000 Feb 21, 2026
51d930f
csv to plot
abhayma1000 Feb 21, 2026
bd4db12
sure
ChrisEgan06 Feb 21, 2026
2d1e5ac
no more brain power
ChrisEgan06 Feb 21, 2026
5bb5e6c
Big changes
ChrisEgan06 Feb 21, 2026
e6b950b
chungus bruh
ChrisEgan06 Feb 21, 2026
c1970a3
Merge branch 'QMEKFM-implementation' of https://github.com/WPI-HPRC/e…
ChrisEgan06 Feb 21, 2026
0da6803
uhhh
ChrisEgan06 Feb 21, 2026
e676f2e
joseph stabalize on that thang
ChrisEgan06 Feb 21, 2026
2cb1d42
no more marbles my vs code j crashed gg
ChrisEgan06 Feb 21, 2026
4f8f3f0
Update main.cpp
ChrisEgan06 Feb 21, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
.pio
.vscode/*
*.asv
*.csv
1 change: 1 addition & 0 deletions AllanVarianceScript
Submodule AllanVarianceScript added at 668dc2
Binary file added allanVar/allanVar.mlx
Binary file not shown.
Binary file added allanVar/standardVariance.mlx
Binary file not shown.
41 changes: 41 additions & 0 deletions boards/mars.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
{
"build": {
"core": "stm32",
"cpu": "cortex-m7",
"extra_flags": "-DSTM32H7 -DSTM32H7xx -DSTM32H753xx -DARDUINO_MARS",
"f_cpu": "400000000L",
"mcu": "stm32h753zit6",
"product_line": "STM32H753xx",
"variant": "MARS"
},
"connectivity": [],
"debug": {
"default_tools": [
"stlink"
],
"jlink_device": "STM32H753ZI",
"openocd_target": "stm32h7x",
"svd_path": "STM32H753.svd"
},
"frameworks": [
"arduino",
"cmsis",
"stm32cube",
"zephyr"
],
"name": "ST Nucleo H753ZI",
"upload": {
"maximum_ram_size": 524288,
"maximum_size": 2097152,
"protocol": "stlink",
"protocols": [
"jlink",
"cmsis-dap",
"stlink",
"blackmagic",
"mbed"
]
},
"url": "https://www.st.com/en/evaluation-tools/nucleo-h753zi.html",
"vendor": "ST"
}
Binary file added deterministicErrors/accel.mlx
Binary file not shown.
Binary file added deterministicErrors/gyro.mlx
Binary file not shown.
Binary file added deterministicErrors/mag.mlx
Binary file not shown.
37 changes: 37 additions & 0 deletions include/README
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@

This directory is intended for project header files.

A header file is a file containing C declarations and macro definitions
to be shared between several project source files. You request the use of a
header file in your project source file (C, C++, etc) located in `src` folder
by including it, with the C preprocessing directive `#include'.

```src/main.c

#include "header.h"

int main (void)
{
...
}
```

Including a header file produces the same results as copying the header file
into each source file that needs it. Such copying would be time-consuming
and error-prone. With a header file, the related declarations appear
in only one place. If they need to be changed, they can be changed in one
place, and programs that include the header file will automatically use the
new version when next recompiled. The header file eliminates the labor of
finding and changing all the copies as well as the risk that a failure to
find one copy will result in inconsistencies within a program.

In C, the convention is to give header files names that end with `.h'.

Read more about using header files in official GCC documentation:

* Include Syntax
* Include Operation
* Once-Only Headers
* Computed Includes

https://gcc.gnu.org/onlinedocs/cpp/Header-Files.html
28 changes: 0 additions & 28 deletions kfConsts.h

This file was deleted.

46 changes: 46 additions & 0 deletions lib/README
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@

This directory is intended for project specific (private) libraries.
PlatformIO will compile them to static libraries and link into the executable file.

The source code of each library should be placed in a separate directory
("lib/your_library_name/[Code]").

For example, see the structure of the following example libraries `Foo` and `Bar`:

|--lib
| |
| |--Bar
| | |--docs
| | |--examples
| | |--src
| | |- Bar.c
| | |- Bar.h
| | |- library.json (optional. for custom build options, etc) https://docs.platformio.org/page/librarymanager/config.html
| |
| |--Foo
| | |- Foo.c
| | |- Foo.h
| |
| |- README --> THIS FILE
|
|- platformio.ini
|--src
|- main.c

Example contents of `src/main.c` using Foo and Bar:
```
#include <Foo.h>
#include <Bar.h>

int main (void)
{
...
}

```

The PlatformIO Library Dependency Finder will find automatically dependent
libraries by scanning project source files.

More information about PlatformIO Library Dependency Finder
- https://docs.platformio.org/page/librarymanager/ldf.html
83 changes: 83 additions & 0 deletions platformio.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
; PlatformIO Project Configuration File
;
; Build options: build flags, source filter
; Upload options: custom upload port, speed and extra flags
; Library options: dependencies, extra library storages
; Advanced options: extra scripting
;
; Please visit documentation for the other options and examples
; https://docs.platformio.org/page/projectconf.html

;[env:nucleo_h753zi]
;platform = ststm32
;board = nucleo_h753zi
;framework = arduino
;lib_deps =
; tomstewart89/BasicLinearAlgebra @ ^5.1
; Wire
; SPI
; Servo
; IWatchdog


;[env:polaris]
;board = teensymm
;platform = teensy
;framework = arduino
;build_flags = -D POLARIS -D ENABLE_DEDICATED_SPI=0
;lib_deps =
; tomstewart89/BasicLinearAlgebra @ ^5.1
; Wire
; SPI
; Servo

; PlatformIO Project Configuration File

;
; Build options: build flags, source filter
; Upload options: custom upload port, speed and extra flags
; Library options: dependencies, extra library storages
; Advanced options: extra scripting
;
; Please visit documentation for the other options and examples
; https://docs.platformio.org/page/projectconf.html

[env]
platform = ststm32
framework = arduino

lib_deps =
adafruit/Adafruit INA219@^1.2.3
adafruit/Adafruit LPS2X@^2.0.6
adafruit/Adafruit BusIO@^1.17.0
adafruit/Adafruit Unified Sensor@^1.1.15
stm32duino/STM32duino ASM330LHH@^2.0.1

; Adafruit ICM20948 support is inside Adafruit ICM20X
adafruit/Adafruit ICM20X@^2.0.7

sparkfun/SparkFun u-blox GNSS v3@^3.1.8
greiman/SdFat
tomstewart89/BasicLinearAlgebra@^5.1


[env:mars]
board = mars
board_build.variants_dir = variants

build_flags =
-D MARS
-I variants/MARS
-DTIM_IRQ_PRIO=2
-DTIM_I2C_PRIO=3
-DPIO_FRAMEWORK_ARDUINO_ENABLE_CDC
-DUSBCON
-DUSBD_VID=0
-DUSBD_PID=0
-DHSE_BYPASS_NOT_USED
-DLSE_BYPASS_NOT_USED
-Wa,-mfloat-abi=hard
-Wa,-mfpu=fpv4-sp-d16
-O3

upload_protocol = dfu
84 changes: 84 additions & 0 deletions src/Conventions.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
Notes:


I change magData variable to imuData because it contains all the IMU data, not just magData
Also please change the accel to return the m/s^2, not g's
I change take in int variable state to onLoop, not the boolean:
0 = preLaunch
1 = high thrust
2 = coast
3 = falling down



Frequencies variable in format:
gyro integrate
accel integrate
accel upate
mag update
gps update
baro update


Note: Could account for distance between the vimu and gps/baro for position calculations, but honesely, is wastes more cpu time than its worth





BLA library:

* Norm: BLA::Norm(vec);
* BLA::CrossProduct(A, B);
* Define: BLA::Matrix<2, 3> x = {1, 2, 3,
4, 5, 6,}
* Multiplication, addition is just *, +, / (note: ensure by a float. ex: 2.0f)
* Submatrix: A.Submatrix<2,2>(1,0); Of a 3x2 mat A, returns bottom 2 rows
* Transpose: A: ~a
* Inverse: A: BLA::Inverse(A)
* PINV: A: QuaternionUtils::pinv(A)


struct ekfState {
float w;
float i;
float j;
float k;
float velX;
float velY;
float velZ;
float posX;
float posY;
float posZ;
float gyroBX;
float gyroBY;
float gyroBZ;
float accelBX;
float accelBY;
float accelBZ;
float magBX;
float magBY;
float magBZ;
float baroB;
}

struct ekfP {
float P0;
float P1;
float P3;
float P4;
float P5;
float P6;
float P7;
float P8;
float P9;
float P10;
float P11;
float P12;
float P13;
float P14;
float P15;
float P16;
float P17;
float P18;
}
Loading