grupacosmo / cansat

Bare-metal software for the sounding rocket payload.
13 stars 3 forks source link

add logs conversion tool #56

Open wiktorwieclaw opened 1 year ago

wiktorwieclaw commented 1 year ago

Once we implement

We will need a CLI tool that outputs the data in a human readable form, for example csv (csv is a great crate for that), but I'm open to propositions.

Let's place the crate in a new /tools/ directory. It should take a file as an input and print the logs converted to csv. I recommend using clap with derive macro for user input (see xtask for example usage).

wiktorwieclaw commented 1 year ago

cansat_core can be added as a dependency so that we can reuse the Measurements struct definition. Just add a serde::Deserialize to it's derive attribute and use postcard to deserialize the data into Vec<Measurements>.

wiktorwieclaw commented 1 year ago

cansat_core can be added as a dependency so that we can reuse the Measurements struct definition. Just add a serde::Deserialize to it's derive attribute

Ok this won't be that trivial because one would need to create custom deserialization functions for all the custom types we use. It will be much easier to just recreate the Measurements struct, but with simple types like f32 instead of Temperature.