To make this topic a little more readable, I number my questions.
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).
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 ?
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?
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.
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?
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.