Skip to content

Sanity check servo input #60

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
jclark opened this issue Mar 9, 2024 · 1 comment · May be fixed by #61
Open

Sanity check servo input #60

jclark opened this issue Mar 9, 2024 · 1 comment · May be fixed by #61
Assignees

Comments

@jclark
Copy link
Owner

jclark commented Mar 9, 2024

We currently do outlier detection to remove occasional bad pulses. But that is occasionally insufficient in the presence of bad hardware. You can see this when testing loss of carrier for #9.

We should have an additional layer of defense against bad pulses. If we have had some pulses wherever everything is properly in sync, and then we start getting huge offsets, we should ignore them based on the time between the good offset and the bad offset. For example, if the last good offset was hours ago, then our clock could be off by quite a lot; but if the last good offset was just a minute ago, the clock can't be off by very much. The maximum offset should be some fraction of elapsed period since the last good offset.

@jclark jclark self-assigned this Mar 9, 2024
@jclark
Copy link
Owner Author

jclark commented Mar 9, 2024

This approach assumes that the PHC is working properly and something has happened to the GPS. But if something went wrong with the PHC, then this will stop the PHC being corrected. In fact that is what happens during loss of carrier on the CM4: the hardware clock runs very fast.

Can we use the (monotonic) system clock instead?

jclark added a commit that referenced this issue Mar 10, 2024
Not really satisfactory
Part of #60
@jclark jclark linked a pull request Mar 10, 2024 that will close this issue
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 a pull request may close this issue.

1 participant