Realtime-capture of Mission Planner's MAVLINK outputs?

Hello folks,

To make this topic a little more readable, I number my questions.

  1. is there a possibility to capture the MAVLINK-outputs Mission Planner performs when I do something in the software?
    To be more precise, I want to know, what output I get, when I click “Go To/Fly here” (sorry if this is not the correct translation for the Guided click action).

  2. What MAVLINK-ID is sent that includes the waypoint for GUIDED-mode and in what format it is transmitted? If its the “SET_POSITION_TARGET_GLOBAL_INT” - message (ID 86), what is ment by X Position in WGS84 frame in 1e7 * meters ?

  3. I have waypoints in a common degree format, like N 45.12345° E 15.12345°, how do I have to transform these? Is there eventually a function in the source code of Mission Planner that I can use to transform this format to the MAVLINK-msg format?

Thanks so far and regards,

Armin

Mavlink uses 1e7 longitudes and latitudes, as so to avoid using decimal points. All latitudes and longitudes are multiplied by 1E7 (or 10,000,000).
So for your example:
N 45.12345° → 451234500
E 15.12345° → 151234500

Note that any South latitudes or West longitudes are negative numbers.

Hi Stephen!

Thanks for your answer. I read about this “avoid decimal” thing already. This also fits my need to program with arduino as its float/double only can handle signed 2 Byte values. But I am confused about this meters thing.

Can I just send my waypoints in common degrees-format but as you mentioned multiplied with 10.000.000? I.e my waypoint N48.1234567 has to be sent as a 481234567 - parameter?

Thanks and kind regards,
Armin

It depends of the frame of reference you send as part of the command. The coordinates can be from a global frame (ie longitude/latitude) or relative to the UAV’s current position (X / Y metres from the current position).

Yep, you can. You’d just have to assemble the command into a Mavlink packet. There should be some Arduino libraries around somewhere to parse/create Mavlink messages.

It depends of the frame of reference you send as part of the command. The coordinates can be from a global frame (ie longitude/latitude) or relative to the UAV’s current position (X / Y metres from the current position).

Sorry for the late respond: I read something about this relative positioning before. But as its said here the function is called SET_POSITION_TARGET_GLOBAL_ INT so I thought this function is for the “coordinates in degrees” stuff (as its called “global…”). But when I read the parameter description “X Position in WGS84 frame in 1e7 * meters” . Thats why I’m so confused.

I worked on my project the last days so next time I can start sending the first waypoints to the drone. But therefor I wanted to make sure that I’m doing it the right way.

Ahh, I stand corrected.

Looking at the documentation link you provided, SET_POSITION_TARGET_GLOBAL_ INT does indeed only work for a global frame.

I’m not sure why the documentation specifies “X Position in WGS84 frame in 1e7 * meters”. That seems seem confusing.

Looking at the mavlink message definitions at https://pixhawk.ethz.ch/mavlink/, the MAV_FRAME_GLOBAL_INT frame has it’s coordinates in degrees.

Thus, my best guess is it’s a typo and that it’s supposed to be “X Position in WGS84 frame in 1e7 * degrees”.