Skip to content
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

Added consistent bias seed. #169

Merged
merged 2 commits into from
Jun 6, 2024
Merged

Added consistent bias seed. #169

merged 2 commits into from
Jun 6, 2024

Conversation

iandareid
Copy link
Contributor

There should be a way to enable consistent bias between boots. Though as it stands this is one line of code, I think a discussion is warranted, hence a PR.

I think that this implementation is clunky since it requires a rebuild, but it is not something that would be changed often. Perhaps it is good enough?

Another alternative is to find some way to pass it as a launch argument, but the route to do that is unclear to me.

Thoughts?

@bsutherland333
Copy link
Contributor

I agree it's a bit clunky but it could be sufficient. I think we have these options:

  • Fixed values, which is essentially what this is
  • Values that change every re-compile
  • Values that change every re-run (not great)
  • Values that change the first time SIL is run (maybe if no memory file is found?)
  • Values that are based on system information, resulting in different values for every system

Fixed values is honestly fine. If we wanted something fancier then I think using the memory file to save a seed somehow would be a good option. Probably more work than is necessary.

@bsutherland333
Copy link
Contributor

Runtime arguments could also work, sorry I missed that

@iandareid
Copy link
Contributor Author

Based on this conversation I think we should leave it as a comment and just add documentation to this issue and mention it on the website.

@iandareid iandareid linked an issue Jun 5, 2024 that may be closed by this pull request
@JMoore5353
Copy link
Contributor

JMoore5353 commented Jun 5, 2024

Adding a fixed value in the code seems like a reasonable solution:

  • Likely a small number of users will want to have a varying bias.
  • Similar to the physical system, where the biases only need to be calibrated once.

I wonder if the other solutions are more work than is necessary (and for practical use of ROSflight).

@iandareid
Copy link
Contributor Author

I added a separate noise generator to make the noise random on each boot, but have the noises remain consistent.

@JMoore5353 JMoore5353 merged commit b56849e into main Jun 6, 2024
2 checks passed
@JMoore5353 JMoore5353 deleted the 168-consistent-bias branch June 6, 2024 19:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

Seeded bias generation for sensors in SIL
3 participants