53 Commits

Author SHA1 Message Date
Oleg Kalachev ed4e2d87d1 Fix imu command output
Gyro field contained filtered gyro instead of scaled only gyro.
2026-04-23 07:12:25 +03:00
Oleg Kalachev 7ad3022798 Add parameter for configuring gyro bias lpf
+ reset the filter on `reset` command
2026-01-24 09:31:32 +03:00
Oleg Kalachev c8e5e08b03 Move all global variable declarations to the appropriate subsystems
As it makes the subsystems code easier to understand.
Declare the most used variables in main sketch file as forward declarations.
Make all control input zero by default (except controlMode).
Minor changes.
2026-01-03 13:28:18 +03:00
Oleg Kalachev d6e8be0c05 Add parameters for easier IMU orientation definition 2025-12-26 21:14:15 +03:00
Oleg Kalachev c02dba6812 Rename gyroCalibrationFilter to gyroBiasFilter
Which seems a better name
2025-12-24 05:36:43 +03:00
Oleg Kalachev dc9aed113b Minor code fixes 2025-10-21 19:41:05 +03:00
Oleg Kalachev 186cf88d84 Add generic Delay filter 2025-10-19 20:46:11 +03:00
Oleg Kalachev 253aae2220 Lowercase imu and rc variables
To make it more obvious these are variables, not classes.
2025-10-19 20:45:56 +03:00
Oleg Kalachev e673b50f52 Include FlixPeriph header instead of MPU9250
This simplifies choosing IMU model
2025-10-07 08:43:12 +03:00
Oleg Kalachev 5151bb9133 Ensure showing correct raw data in imu command
Some IMUs will reset acc and gyro buffer on whoAmI() call
2025-10-07 08:43:06 +03:00
Oleg Kalachev a1539157b8 Show raw values in imu command 2025-08-22 17:20:33 +03:00
Oleg Kalachev 6b38070e43 Rename printIMUCal to printIMUCalibration for consistency with rc 2025-07-14 12:04:02 +03:00
Oleg Kalachev 9c8c0e2578 Minor code updates 2025-05-15 09:22:17 +03:00
Oleg Kalachev 965813e8f0 Use interrupts instead of polling for main loop 2025-05-05 13:58:23 +03:00
Oleg Kalachev 4b938e8d89 Make accelerometer calibration more verbose
Print the number of each calibration step
2025-05-05 00:38:08 +03:00
Oleg Kalachev 66a43ab246 Continuous gyro bias estimation (#17)
Estimate gyro bias continuously instead of calibrating the gyro at startup.
2025-03-29 12:21:40 +03:00
Oleg Kalachev 3a61dca102 Simplify and improve acc calibration command output 2025-03-29 01:05:55 +03:00
Oleg Kalachev 3fdebf39d8 Fix mavlink disconnection in pauses in cli commands
Implement pause function that proceeds processing mavlink.
Use temporal workaround for simulation, as micros function gives the same result on the same simulation step.
2025-02-28 19:25:41 +03:00
Oleg Kalachev 287a4b5a71 Fix accel calibration via mavlink console
Add 5 s timeout as waiting for enter is not implemented for mavlink console yet
2025-02-18 13:01:44 +03:00
Oleg Kalachev d60628e14d Support MAVLink console
Implement receiving and sending SERIAL_CONTROL message
Use global defined print function instead of Serial.printf
2025-02-18 10:33:01 +03:00
Oleg Kalachev e54e0e8c48 Make all the basic functionality work without the imu 2025-02-17 19:44:18 +03:00
Oleg Kalachev 85172cdcc8 Make util module header instead of .ino-file 2025-01-10 06:51:14 +03:00
Oleg Kalachev c8109af04f Make ONE_G definition const and move to utils.ino 2025-01-09 11:24:40 +03:00
Oleg Kalachev c2a9d36d4e Add small delay before gyro calibration 2025-01-09 10:06:15 +03:00
Oleg Kalachev e10475a5e0 Some minor cleanups and fixes 2024-12-28 23:57:44 +03:00
Oleg Kalachev ae349fb73c Implement parameters subsystem
* Unified parameters storage.
* Store parameters in flash on the hardware.
* Store parameters in text file in simulation.
* Work with parameters in command line.
* Support parameters in MAVLink for working with parameters in QGC.
2024-12-23 13:00:02 +03:00
Oleg Kalachev 7533a9cbfa Move ONE_G definition to flix.ino 2024-12-23 02:37:03 +03:00
Oleg Kalachev 77effa5577 Rotate IMU data to support standard axes orientation in new FlixPeriph 2024-12-11 06:17:37 +03:00
Oleg Kalachev 172b6becc6 Use new FlixPeriph library with ICM-20948 support 2024-12-04 14:41:23 +03:00
Oleg Kalachev 475e9a87ba Configure IMU before calibrating the gyro which improves calibration 2024-12-04 12:25:07 +03:00
Oleg Kalachev 6327585754 Print accel calibration parameters in more convenient way 2024-11-04 14:37:05 +03:00
Oleg Kalachev ad2c64625c Print the IMU information in imu command 2024-10-31 10:24:00 +03:00
Oleg Kalachev abcc9b96de Use FLU as the main coordinate system instead of FRD
Corresponding to the IMU orientation in the new version
2024-10-23 09:30:49 +03:00
Oleg Kalachev fbe33eac1b Set gyro limits to 2000 DPS by default 2024-05-24 14:46:38 +03:00
Oleg Kalachev 41a9a95747 Transfer gyro low pass filter to estimate.ino
Separate raw gyro data and filtered rates to different variables
2024-04-20 14:52:01 +03:00
Oleg Kalachev f782f647cb Correctly restore IMU settings after accel calibration 2024-03-15 13:26:59 +03:00
Oleg Kalachev 32f29dc1a4 Use default SPI CS pin for IMU 2024-03-15 13:14:28 +03:00
Oleg Kalachev 2cf1c7abb3 Use FlixPeriph library for IMU, implement own IMU calibration 2024-03-15 10:38:48 +03:00
Oleg Kalachev d752cce0cc Fix accel calibration upside down wait time 2024-03-12 00:36:53 +03:00
Oleg Kalachev 1c9b10a674 Use default recommended chip-select pin (GPIO5) for SPI
Update link to the schematics #3 to the most recent version
2024-02-24 15:28:41 +03:00
Oleg Kalachev c22961e5ff Don't calibrate gyro on start since MPU9250 library does that on begin 2024-01-19 05:05:49 +03:00
Oleg Kalachev d2296fea76 Change C++ code style: put curly brace on the same line 2023-12-29 18:56:25 +03:00
Oleg Kalachev 189eac95ef Enable gyro calibration on the start 2023-12-19 11:36:27 +03:00
Oleg Kalachev fde9c1cf36 Minor changes and cleanups 2023-12-19 05:25:57 +03:00
Oleg Kalachev a174d5cd7d Headers cleanups 2023-12-19 05:06:19 +03:00
Oleg Kalachev 9eaa45c1d9 Consistently use defines to set parameters 2023-05-31 20:16:43 +03:00
Oleg Kalachev 39875cafb9 Remove non-effective statics 2023-05-31 20:12:45 +03:00
Oleg Kalachev 1125335b16 Cleanup, use printf 2023-05-24 11:22:59 +03:00
Oleg Kalachev 82276ddb92 Cleanups 2023-05-24 10:56:59 +03:00
Oleg Kalachev 1019d6d4bb Code cleanups 2023-05-24 10:28:32 +03:00