Skip to content

Conversation

@mfocka
Copy link
Owner

@mfocka mfocka commented Aug 26, 2025

No description provided.

mfocka and others added 22 commits August 26, 2025 00:31
…entation-events-62ae

Process imu data and tag orientation events
…d get an update with a new class for a complementery filter such that we can simply call it and use it as if it were a library.
- Add motion_estimator.h with C-style interface
- Add motion_estimator.cpp with hybrid filtering implementation
- Simple filter for yaw (azimuth) with reset mechanism
- Complementary filter for all axes including yaw for drift detection
- Yaw comparison logic: only send yaw when complementary filter is stable
- Calibration support for gyro bias estimation
- Configurable thresholds for altitude and azimuth changes
- Reset capabilities to prevent drift accumulation
- Example integration in motion_detection.cpp
- Test program and comprehensive documentation
- Fix MotionEstimator_ProcessData function signature to return ME_output_t
- Fix function parameter types and variable declarations in motion_detection.cpp
- Remove unused MotionEvent structure from header
- Fix syntax errors (retrun -> return, missing & for config pointer)
- Add motion_estimator.h include to motion_detection.h
- Create simple test program demonstrating correct functionality
- MotionEstimator now properly outputs three angle arrays:
  * euler_angles_simple: Simple filter angles [yaw, pitch, roll]
  * euler_angles_complementary: Complementary filter angles [yaw, pitch, roll]
  * euler_angles_fused: Hybrid angles [simple_yaw, comp_pitch, comp_roll]
- Test program shows successful calibration and motion detection
…y filters

- Add MotionEstimator class implementing both simple and complementary filters
- Simple filter for azimuth (yaw) with complementary filter validation
- Complementary filter for tilt (pitch/roll) with less drift
- Smart logic to combine both filters for optimal results
- Calibration system for gyro bias offset calculations
- Integration with existing motion_detection.cpp workflow
- Follows KISS principle with minimal implementation
- Document usage patterns and configuration
- Explain filter strategy and smart combination logic
- Provide integration examples with motion detection system
- Include performance characteristics and testing results
- Document future enhancement possibilities
- Clean up updateCompleteEulerAngles() function with proper cross-checking logic
- Add setGyroBiasFromExternal() method for sharing MotionDI calibration
- Implement trust-based fusion with cross-validation between filters
- Add PRINT_ESTIMATOR debug flag for detailed logging
- Add comprehensive debug printing for all filter states and fusion process
- Share gyro bias from MotionDI to MotionEstimator during calibration
- Add debug messages for initialization, calibration, and event detection
- Fix indentation and improve code readability
- Fix missing closing brace in switch statement
- Move variable declarations inside case block with proper braces
- Remove problematic header includes (adb_types.h, sensor_data.h)
- Fix azimuth calculation bug (was using altitude instead of azimuth)
- Ensure proper C++ syntax for switch statement with variable declarations
…ould use our motion calibration threshold (CALIBRATION_SAMPLES) only as a final cut-off. If we cannot converge (on MotionDI) by then, we use the defaults. However, we can stop earlier, as early as MINIMUM_CALIBRATION_SAMPLES (TO BE IMPLEMENTED). There is also the issue that the MotionEstimator is stuck in calibration and does not start working for some reason, we need to fix this, yet keep it simple
…d-drift-8b1f

Debug azimuth wrap-around and drift
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants