waterloo-rocketry / cansw_processor_stm

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

redo vn data logging using binary struct dump to sd card files #61

Closed celery6 closed 3 weeks ago

celery6 commented 1 month ago

In response to #40 .

Overview: since the VN data is known and limited and numerical, we can put each packet of VN data into a nice packed struct. Then, populate a large array of these structs to dump to the SD card (same way logger does arrays of chars)

advantages over logging as string: 1) printf family functions take fucking forever theyre very not embedded + high freq friendyly :sku;. 2) vn data is predicable and numerical. 3) no one likes dealing with strings in embedded.

implementation thoughts

celery6 commented 1 month ago

aiming to implement some drft of this by saturday? at least to see how easdily doable. if bad then we can go back to overoptimizing logger to death

celery6 commented 1 month ago

40

https://github.com/waterloo-rocketry/cansw_processor_stm/pull/65 Binary logging may be avoided if this concurrent logging thing proves to be fast enough

Joe-Joe-Joe-Joe commented 3 weeks ago

this concurrent logging thing proves to be fast enough

It did!