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

controller otits #69

Closed celery6 closed 2 months ago

celery6 commented 2 months ago

https://waterloorocketry.slack.com/archives/C05EUQLFP4J/p1720484359536589?thread_ts=1720484359.536589&cid=C05EUQLFP4J

https://github.com/waterloo-rocketry/cansw_processor_stm/blob/5c0bdb056e4b8563d1eaa30b46822df571a4c9a8/STM32Cube/Tasks/controller.c#L79

I started this OTITS test function, but didn't fill in any actual values because idk how to calculate the controller, traj pred, etc.

This function should simply behave like a unit test: call the controller pid (or any other helper functions we would like to test) by giving it some known values, and return a PASS if the controller outputs a correct calculation (this should be done by hand) given these known values. Checking multiple edge cases would be nice too.

The goal of this is to prevent future edits from fucking up the whole calculation accidentally. If we change the controller behaviour in the future on purpose, the values used in this test should be updated accordingly.

celery6 commented 2 months ago

too late RIP