Mission Planner / Mavlink large uint32 parameters


I am trying to understand the correct behavior of Mission Planner and Mavlink wrt parameters.

A mavlink component sends mission planner a parameter typed as UINT32. The number is 60180513. This is well in the range of a uint32. The number is displayed correctly.

In Mission Planner, the same number is written back to the component. When it arrives at the component, it becomes the number 60180512.

It appears that somewhere from MP->component, the number is actually converted to a floating point number. Thus losing a digit of precision. However component->MP, this doesn’t seem to happen. I originally believed from the docs that Mavlink just used a float to pack a uint32. But it appears now that it is actually converted.

Does anyone know which exactly it should do?

The component uses a union structure to go back and forth which seems to work for everything within 7 digits, per FP spec. The 8th digit seems to bounce around between even numbers:

typedef union {
int8_t i8;
uint8_t u8;
int16_t i16;
uint16_t u16;
int32_t i32;
uint32_t u32;
float f;
} param_value_t;

Insights appreciated. Thank you.