diff --git a/libraries/AP_Beacon/AP_Beacon_Marvelmind.cpp b/libraries/AP_Beacon/AP_Beacon_Marvelmind.cpp index 8a7e0f28b3..b12500b5b3 100644 --- a/libraries/AP_Beacon/AP_Beacon_Marvelmind.cpp +++ b/libraries/AP_Beacon/AP_Beacon_Marvelmind.cpp @@ -142,9 +142,9 @@ void AP_Beacon_Marvelmind::process_beacons_positions_datagram() stationary_beacon = get_or_alloc_beacon(address); if (stationary_beacon != nullptr) { stationary_beacon->address = address; //The instance and the address are the same - stationary_beacon->x = x * 10; // centimeters -> millimeters - stationary_beacon->y = y * 10; // centimeters -> millimeters - stationary_beacon->z = z * 10; // centimeters -> millimeters + stationary_beacon->x__mm = x * 10; // centimeters -> millimeters + stationary_beacon->y__mm = y * 10; // centimeters -> millimeters + stationary_beacon->z__mm = z * 10; // centimeters -> millimeters stationary_beacon->high_resolution = false; hedge.positions_beacons.updated = true; } @@ -177,9 +177,9 @@ void AP_Beacon_Marvelmind::process_beacons_positions_highres_datagram() stationary_beacon = get_or_alloc_beacon(address); if (stationary_beacon != nullptr) { stationary_beacon->address = address; //The instance and the address are the same - stationary_beacon->x = x; // millimeters - stationary_beacon->y = y; // millimeters - stationary_beacon->z = z; // millimeters + stationary_beacon->x__mm = x; // millimeters + stationary_beacon->y__mm = y; // millimeters + stationary_beacon->z__mm = z; // millimeters stationary_beacon->high_resolution = true; hedge.positions_beacons.updated = true; } diff --git a/libraries/AP_Beacon/AP_Beacon_Marvelmind.h b/libraries/AP_Beacon/AP_Beacon_Marvelmind.h index 6d7534b8b6..1f2f516e5c 100644 --- a/libraries/AP_Beacon/AP_Beacon_Marvelmind.h +++ b/libraries/AP_Beacon/AP_Beacon_Marvelmind.h @@ -43,14 +43,14 @@ private: { uint8_t address; uint32_t timestamp; - int32_t x, y, z; // coordinates in millimeters + int32_t x__mm, y__mm, z__mm; bool high_resolution; }; struct StationaryBeaconPosition { uint8_t address; - int32_t x, y, z;// coordinates in millimeters + int32_t x__mm, y__mm, z__mm; bool high_resolution; float distance__m; // Distance between beacon and hedge };