Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: mbed MatrixMath LPS25HB_I2C LSM9DS1 Matrix2 PIDcontroller LoopTicker SBUS_without_mainfile UsaPack solaESKF_wind Vector3 CalibrateMagneto FastPWM
Diff: global.hpp
- Revision:
- 88:0fc5df2fddcb
- Parent:
- 87:981895e1d4f2
- Child:
- 90:0b1f62f7a83a
--- a/global.hpp Fri Jan 07 09:49:19 2022 +0000
+++ b/global.hpp Wed Jan 12 07:00:08 2022 +0000
@@ -36,7 +36,7 @@
// struct union
union U
{
- int i[N_EEPROM]; // 0: flag(>1で正常に書き込まれた状態) 1 ~ 3: 磁場の中心座標, 4: 磁場の半径、 5~7; mag, 8~10: acc bias
+ int i[N_EEPROM]; // 0: flag(>1で正常に書き込まれた状態) 1 ~ 3: 磁場の中心座標, 4: 磁場の半径、 5~7; mag, 10: roll offset, 11: pitch offset
char c[N_EEPROM*4]; // floatはcharの4倍
};
@@ -48,14 +48,17 @@
float gyro[3];
float mag[3];
float rpy[3];
+ float altitude;
float de;
float deobj;
float rc[5];
+ int calibEndFlag;
};
struct updatePack
{
bool gpsUpdateFlag;
+ int calibrationFlag;
char gps_fix;
int gps_itow;
float vi[3];
@@ -142,6 +145,8 @@
extern float accMax[3];
extern Vector3 rpy_align;
+extern float roll_offset;
+extern float pitch_offset;
// eepromのread writeのためのunionを定義
extern const int eeprom_address; // EEPROMの3つの入力が全て+より
@@ -162,6 +167,10 @@
extern void setup();
extern void calibrate();
extern float accScaleCalibrate(int attNo);
+extern void alignment();
+extern int n_ave;
+extern float roll_sum;
+extern float pitch_sum;
// run.cpp
extern int gpsitow;