Reading GPS data in via Mavlink
Posted: Wed Feb 06, 2019 12:18 pm
I've studied the two Mavlink examples which send control data to the drone via Mavlink protocol. But I'd like to read GPS information from the drone into my OpenMV python script. I've found the layout of the GPS message I think I should use https://github.com/mavlink/c_library_v1 ... _raw_int.h but how to bring all that in via UART, find the message number, unpack it into usable fields all rather escapes me. I expect I'll have to set parameters in the Pixhawk flight controller to get it to send the right message(s). Anybody have an example of Python code that pulls data via Mavlink?