Incorrect calculation of GPS positions' diffs during arming checks

There are two GPS sources configured: SRC1 is type=1 and SRC2 is type=14.
SRC1 provides all location data - lat, lon, and alt; SRC2 provides only lat and lon(this data is sent by gps_input_send mavlink command with GPS_INPUT_IGNORE_FLAG_ALT flag set).

During Arming checks there is a special check that validates that all GPSs are within 50m of each other.
This is done by calculating the distance(NED) between the last location reported by GPSs sources. Distance calculation takes into account all data lat, lon, and alt even if one of the GPS sources does not provide alt data. So as a result pre-arm check could fail. So the question is should not ardupilot take into account whether GPS source contain alt data during the calculation of GPSs’ diffs?

1 Like

Hi @tomashmyh,

Yes, I think you’re right so I’ve raised an issue here and put it on the 4.5.0 issues list although it exists in 4.4 as well I’m sure so I can’t promise when it will be fixed.

From a quick look through our AP_GPS front end it looks like we don’t have an accessor to expose to AP_Arming whether the GPS provides altitude so we’d need to add that as well.

1 Like

great, thank you a lot, looking forward to have it fixed in at least 4.5
if there is anything I can do to make it fixed faster and also for 4.4 just let me know)