waterloo-rocketry / cansw_processor_airbrakes

Processor board was developed for the 2023-2024 design cycle to perform state estimation and control tasks for Borealis's airbrakes system
2 stars 0 forks source link

Vn madgwick #59

Closed Joe-Joe-Joe-Joe closed 2 months ago

Joe-Joe-Joe-Joe commented 3 months ago

Closes #41

I have tested with the state estimation thread slowed down to match the current data rate, which as I understand it is 2 Hz, 1 Hz on state estimation seemed to play nice. I've added print statements that work with Teleplot, which you should get. here is a nice set of plots, with me just leaving the VN sitting on the table

image

I've added proper scaling of the VN output into the units Fusion expects at the parsing step, and the raw values from the IMU are so good already (aside from gyro drift which the filter does internal compensation for), so I don't think the accel/gyro configuration matrices really need to be modified. Or at least, its not worth the time to conduct an analysis on whether that makes a meaningful difference. Magnetometer is a separate thing with its own empirical compensation parameters, see #57

Next steps for this would be to reconfigure the VN to output raw data at a higher rate, and see if we can boost state estimation up to match.

Finally, I played around a bit with the #defines so that we hopefully don't run into any issues where we load a version that uses the ICM instead of the VN on the fight board.

Joe-Joe-Joe-Joe commented 3 months ago

probably need to restest this again after the merge :face:

Joe-Joe-Joe-Joe commented 2 months ago

still works :)