uf-mil / SubjuGator

SubjuGator 8 on-board software

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Increase window size for bus-voltage kill

DSsoto opened this issue · comments

Right now, the bus_voltage kill triggers unnecesarily due to the amount of fluctuation in the bus voltage readings.

On our small pool outing on May 10, I noticed that when station-keeping in still waters, the bus voltage readings had a total spread of about 0.5 volts in a span of just about 2 seconds.

Although I did not record numbers, I would venture to say that the average spread during move commands and other transient thruster behaviour is about 2 volts.

I propose that we only kill the sub when the average bus voltage drops below the pre-defined limits for a window of about 30 seconds.

I will submit a PR doing this soon, but open to hearing other ideas/counterarguments.

Kalman filter bus voltage!

There isn't one bus voltage, all of the bus voltage packets from different thrusters spam to the same /bus_voltage topic. I doubt we can assume measurements with Gaussian error of an average bus voltage in this scenario. Ad-hoc!! (tldr: overkill)

Addressed by #247. The window size is currently 30 seconds but can be adjusted based on observations from the next pool day.