summaryrefslogtreecommitdiff
path: root/src-avr/ao_kalman.h
diff options
context:
space:
mode:
Diffstat (limited to 'src-avr/ao_kalman.h')
-rw-r--r--src-avr/ao_kalman.h67
1 files changed, 67 insertions, 0 deletions
diff --git a/src-avr/ao_kalman.h b/src-avr/ao_kalman.h
new file mode 100644
index 00000000..1c375af5
--- /dev/null
+++ b/src-avr/ao_kalman.h
@@ -0,0 +1,67 @@
+/* Kalman matrix for both
+ * step = 0.01
+ * σ_m = 2
+ * σ_h = 6
+ * σ_a = 2
+ */
+
+#define AO_BOTH_K00_100 to_fix32(0.0081313788)
+#define AO_BOTH_K01_100 to_fix32(0.0000026340)
+#define AO_BOTH_K10_100 to_fix32(0.0531117402)
+#define AO_BOTH_K11_100 to_fix32(0.0038194319)
+#define AO_BOTH_K20_100 to_fix32(0.0000749238)
+#define AO_BOTH_K21_100 to_fix32(0.6180339885)
+
+/* Kalman matrix for both
+ * step = 0.1
+ * σ_m = 2
+ * σ_h = 6
+ * σ_a = 2
+ */
+
+#define AO_BOTH_K00_10 to_fix32(0.0783434385)
+#define AO_BOTH_K01_10 to_fix32(0.0002339223)
+#define AO_BOTH_K10_10 to_fix32(0.5113498998)
+#define AO_BOTH_K11_10 to_fix32(0.0379865308)
+#define AO_BOTH_K20_10 to_fix32(0.0066537889)
+#define AO_BOTH_K21_10 to_fix32(0.6180320115)
+
+/* Kalman matrix for accel
+ * step = 0.01
+ * σ_m = 2
+ * σ_a = 4
+ */
+
+#define AO_ACCEL_K0_100 to_fix32(0.0000078547)
+#define AO_ACCEL_K1_100 to_fix32(0.0060961179)
+#define AO_ACCEL_K2_100 to_fix32(0.3903882032)
+
+/* Kalman matrix for accel
+ * step = 0.1
+ * σ_m = 2
+ * σ_a = 4
+ */
+
+#define AO_ACCEL_K0_10 to_fix32(0.0007854668)
+#define AO_ACCEL_K1_10 to_fix32(0.0609611795)
+#define AO_ACCEL_K2_10 to_fix32(0.3903882032)
+
+/* Kalman matrix for baro
+ * step = 0.01
+ * σ_m = 2
+ * σ_h = 6
+ */
+
+#define AO_BARO_K0_100 to_fix32(0.0623382088)
+#define AO_BARO_K1_100 to_fix32(3.2096898314)
+#define AO_BARO_K2_100 to_fix32(5.1644233483)
+
+/* Kalman matrix for baro
+ * step = 0.1
+ * σ_m = 2
+ * σ_h = 6
+ */
+
+#define AO_BARO_K0_10 to_fix32(0.2582626767)
+#define AO_BARO_K1_10 to_fix32(6.1612340969)
+#define AO_BARO_K2_10 to_fix32(4.5932892444)