# save critical data

Source: https://forum.modalai.com/topic/3163/save-critical-data
Category: General Questions (https://forum.modalai.com/category/2/general-questions)
Posted: 2024-03-02 00:46:11 UTC by Pooyan
Replies: 5 · Views: 1083

## Pooyan · 2024-03-02 00:46:11 UTC

Hello all,

I want to have the critical data (voxl-inspect-cpu, voxl-inspect-battery) of a flight saved during the flight time to use them later offline. I would appreciate it if you could tell me how I can do that by providing some details for help. 

Best,

## Reply by Moderator (ModalAI staff) · 2024-03-02 18:46:19 UTC

@Pooyan You could use voxl-logger with the -w option to save raw data. You would then need to post process though. 

It might make things easier to ```
https://gitlab.com/voxl-public/voxl-sdk/utilities/voxl-logger/-/blob/master/tools/voxl-logger.cpp?ref_type=heads
``` to support the data you would like to log and write them to a CSV using other types in voxl-logger as an example.

We're happy to incorporate merge requests if you go that route!

## Reply by Alex Kushleyev (ModalAI staff) · 2024-03-04 15:56:24 UTC (in reply to Moderator)

The source code for `voxl-inspect-cpu` is [here](https://gitlab.com/voxl-public/voxl-sdk/services/voxl-cpu-monitor/-/blob/master/clients/voxl-inspect-cpu.c) (the data is coming from `voxl-cpu-monitor` and displayed by `voxl-inspect-cpu`. 

and for `voxl-inspect-battery` is here [here](https://gitlab.com/voxl-public/voxl-sdk/utilities/voxl-mpa-tools/-/blob/master/tools/voxl-inspect-battery.c) . The battery data is coming as a mavlink message via MPA and displayed using `voxl-inspect-battery`. 

So you can use `voxl-logger`, as suggested above to log the needed data and parse it offline -- you can use the source code of the `inspect` tools for guidance.

## Reply by Pooyan · 2024-03-18 15:28:44 UTC (in reply to Alex Kushleyev)

@Alex-Kushleyev @Moderator  Great thank you. now I want to have an application to analyze data online and based on that turn on or off another application. I already have tried the voxl-cross-template but now I want to write my own application for that. Can you please provide me with some tips for that? 

And to check the syntax errors in the application while writing and implementing it, may you please give me some hints?

I appreciate that so much.

## Reply by Eric Katzfey (ModalAI staff) · 2024-03-18 15:35:15 UTC (in reply to Pooyan)

@Pooyan Our applications share data using Modal Pipe Architecture (MPA). The foundation for that is the libmodal-pipe library. All of our code is open so you can look at examples of applications that publish data via MPA and others that consume data. This can be the basis for your custom application.

## Reply by Pooyan · 2024-03-21 16:24:59 UTC (in reply to Eric Katzfey)

@Eric-Katzfey Thank you so much for the information.
