Skip to content

Fix sampling rate miscalibration problem#494

Merged
Eirenliel merged 1 commit intomainfrom
sampling-rate-fix
Nov 27, 2025
Merged

Fix sampling rate miscalibration problem#494
Eirenliel merged 1 commit intomainfrom
sampling-rate-fix

Conversation

@gorbit99
Copy link
Contributor

In previous firmware versions, there is an issue, where the tracker miscalculates the sampling rate of the IMU, which causes sensitivity issues. This is caused by sudden spikes in calculation overhead, for example saving the configuration, wifi activity, or things like that. This creates a sudden burst of unread IMU samples. Since we read at a given max rate, but the calibration is real-time based, this can create a false representation of how many samples we receive each second.

To mitigate this issue, several steps were taken:

  • Now the sampling rate calibration doesn't get saved by itself. Since this is redone each time the tracker is turned on, this isn't a huge issue, and as a side effect, this also reduces the number of EEPROM writes, albeit by a trivial amount.
  • Now the IMU reading code can signal when the MCU is seemingly "overwhelmed", meaning it has more readings than it can handle in a single step. This is then used by the sampling rate calibration code to restart the step completely.

With these two solutions, the calibration is back to being functional. Other steps are unlikely to be affected by the same issue, since they are average based, not time based.

@Eirenliel Eirenliel merged commit afd376c into main Nov 27, 2025
4 checks passed
@Eirenliel Eirenliel deleted the sampling-rate-fix branch November 27, 2025 18:28
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.

2 participants