Terrapin-Rocket-Team / Multi-Mission-Flight-Software

An arudino library used by the Terrapin Rocket Team as the foundation of the team's flight software.
5 stars 0 forks source link

Added bias correction option #67

Closed varun-un closed 1 month ago

varun-un commented 1 month ago

Just added a parameter to the init() call for State, to give option to use bias correction or not, as if they're using it they explicitly need to call the method to set it to false in their state code, which they may not know do. I think it's better to make it so that the bias correction is only applied if they know so, and thus know they'll be turning it off.

varun-un commented 1 month ago

The one issue with this, is that if you're not trying to use the bias correction mode, you still need to have:

const int SENSOR_BIAS_CORRECTION_DATA_LENGTH = 0;
const int SENSOR_BIAS_CORRECTION_DATA_IGNORE = 0;

in your main file for it to compile. I tried changing it up, but unless we want to like change a decent bit of how the bias correction is set up there's not really an easy solution that I saw at least

DrewBrandt commented 1 month ago

The one issue with this, is that if you're not trying to use the bias correction mode, you still need to have:

const int SENSOR_BIAS_CORRECTION_DATA_LENGTH = 0;
const int SENSOR_BIAS_CORRECTION_DATA_IGNORE = 0;

in your main file for it to compile. I tried changing it up, but unless we want to like change a decent bit of how the bias correction is set up there's not really an easy solution that I saw at least

You're right, and this was definitely a pretty big oversight on my part. I'll have a look this weekend and see if I can think of a cleaner solution