DroidPlanner / Tower

Ground Control Station for Android Devices
https://play.google.com/store/apps/details?id=org.droidplanner.android
Other
623 stars 556 forks source link

APM is not interpreting params as per the MAVLink standard for non-float values. #1483

Open kd0aij opened 9 years ago

kd0aij commented 9 years ago

this results in corrupted parameter values when working with the PX4 native stack

LorenzMeier commented 9 years ago

The issue is the param Union value: it should contain the binary representation of the parameter, while it always contains the float value for APM. This leads to rounding errors on integer parameters.

m4gr3d commented 9 years ago

According to the mavlink definition, the param value type is a float ( https://pixhawk.ethz.ch/mavlink/#PARAM_VALUE).

Or are you referring to another mavlink message?

Fredia Huya-Kouadio Senior Android Engineer, 3D Robotics fredia@3dr.com On May 13, 2015 8:42 AM, "Lorenz Meier" notifications@github.com wrote:

The issue is the param Union value: it should contain the binary representation of the parameter, while it always contains the float value for APM. This leads to rounding errors on integer parameters.

— Reply to this email directly or view it on GitHub https://github.com/DroidPlanner/Tower/issues/1483#issuecomment-101651881 .

LorenzMeier commented 9 years ago

I wrote the original spec, so I'm quite confident about its interpretation. I can see that it should have been more bold about the way the float type has to be interpreted. The same way as the waypoint protocol spec is not covered by just reading the XML file, the parameter protocol is not covered by just reading the XML file.

The MAVLink spec is here: http://qgroundcontrol.org/mavlink/parameter_protocol (linked to by http://mavlink.org)

The problem is that the APM implementation wasn't done by reading the specs. If you think about it for a moment the MAVLink message makes no sense when always transmitting the parameter as float: Why would you provide a parameter type enum if the value itself is always float?

kd0aij commented 9 years ago

This issue makes Tower unsafe for use with PX4...

kd0aij commented 7 years ago

closed assuming Tower is no longer being maintained

billbonney commented 7 years ago

@kd0aij It is still being maintained... It seems no one added PX4 support as of yet.. This issue is still open until it is fixed. Thx.