forked from Archive/PX4-Autopilot
mavlink_receiver: fix DISTANCE_SENSOR covariance handling
This commit is contained in:
parent
b818b07df3
commit
ec3f1fd5c2
|
@ -5,7 +5,7 @@ uint64 timestamp # time since system start (microseconds)
|
|||
float32 min_distance # Minimum distance the sensor can measure (in m)
|
||||
float32 max_distance # Maximum distance the sensor can measure (in m)
|
||||
float32 current_distance # Current distance reading (in m)
|
||||
float32 covariance # Measurement covariance (in m), 0 for unknown / invalid readings
|
||||
float32 covariance # Measurement covariance (in m^2), 0 for unknown / invalid readings
|
||||
int8 signal_quality # Signal quality in percent (0...100%), where 0 = invalid signal, 100 = perfect signal, and -1 = unknown signal quality.
|
||||
|
||||
uint8 type # Type from MAV_DISTANCE_SENSOR enum
|
||||
|
|
|
@ -797,7 +797,7 @@ MavlinkReceiver::handle_message_distance_sensor(mavlink_message_t *msg)
|
|||
d.type = dist_sensor.type;
|
||||
d.id = MAV_DISTANCE_SENSOR_LASER;
|
||||
d.orientation = dist_sensor.orientation;
|
||||
d.covariance = dist_sensor.covariance;
|
||||
d.covariance = dist_sensor.covariance * 1e-4f; // cm^2 to m^2
|
||||
|
||||
/// TODO Add sensor rotation according to MAV_SENSOR_ORIENTATION enum
|
||||
|
||||
|
|
Loading…
Reference in New Issue