I have a multiparameter probe attached to my aquatic"s" drone"s" to measure water quality (a sub and a boogie board). When powered, the probe is configured to store data on a sdcard and also to echo the string of alphanumeric character on it’s serial port. One not very long string every 2 sec. Until yesterday I was not aware of Lua and I was powering my probe before a run and recover the data at the end of the run (thanks to the logging capacity of the probe).
I suspect that Lua could be used to catch the echo and send it to the GCS just like sonar data. There is about 8 interesting water quality parameters in my probe and I would like to monitor them directly in my GCS interface. Not just getting them in my PC and having to start a third party software to visualize them. I would like to see them in QGC or MP just like the rangedata become sonar data if one is connected.
So i guess I have 2 questions.
- can Lua script be used to catch and parse the echo from my serial probe?
- can the relevant data be visualized directly in GCS without building a custom version of MP or QGC?
I saw some example were Lua is used to save the data on the sdcard in the autopilot but this is not relevant in my case. The data is already in the probe. I just want to visualize them live.
I have 2 Pixhawk 2.4.8 and run ardusub and ardurover. I hope to use the same script on both build and just swap the probe between run.