Custom sensor data logging only

We have a custom sensor that emits serial port data in ASCII packets at 115200. We also have built a custom ARM Cortex-M4 data logger for our sensor that logs our sensor’s data stream interleaved with GPS sentences to SD Card.

Some of our clients would be flying our sensor on PixHawk drones, but our sensor is not involved in flight control. We would like to have the data logged to SD card on the PixHawk, and possible streamed in real time using radio connection from the drone. A requirement is to have our custom sensor’s data acquired and synced with the usual GPS, accelerometer, and magnetometer data for display in Mission Planner. For example, we would like to overlay a graph of our sensor’s output with Mission Planner maps as a flight log is played back, (or viewed with UAV LogViewer).

I am looking for recommendations on ways to implement this capability without modification to our clients’ PixHawk firmware.

We have microcontroller firmware programming and C#/Python on Windows expertise, but no expertise in flight control systems, so basically I’m looking for the best starting point as a newbie to this field.

Is it possible to merge our sensor data into flight logs or BIN files as a post-process operation? Our sensor data logs also have GPS info interleaved, so is it possible if we convert our logs into MissionPlanner-compatible files for playback? We could translate our data format into something compatible for merging into Mission Planner flight log.

Alternatively, should I be looking at MAVLink/CompanionComputers? From what I can tell, our users would just have to configure MissionPlanner to include our custom MAVLink message and it’s included in the data log, correct?

Sorry about the newbie questions, and thanks in advance for your help,

have a look at using a cube and lua scripting. this should be able to be setup to read from a serial port and either store in the flight controller log, or a separate file as needed. you could interleave flight controller data into your custom log vs the other way around

Thanks for the reply… Hopefully I’m not misunderstanding your recommendation–the cube with lua scripting is the flight controller, correct? So our clients would need to be flying with the cube as flight computer and run our script for collecting/logging interfacing to our sensor? Is there a preferred format for our serial data stream processed by the script? Is there a possibility of our script messing up the flight control?
I see the Lua script area of the ArduPilot site and also the API description and example scripts, so I’ll try it out.