mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-20 17:23:34 +08:00
Rename distance_sensor.covariance to variance
This commit is contained in:
committed by
Nuno Marques
parent
8ba7569852
commit
fbc8d01a7e
@@ -4195,7 +4195,7 @@ protected:
|
||||
msg.min_distance = dist_sensor.min_distance * 100.0f; /* m to cm */
|
||||
msg.max_distance = dist_sensor.max_distance * 100.0f; /* m to cm */
|
||||
msg.current_distance = dist_sensor.current_distance * 100.0f; /* m to cm */
|
||||
msg.covariance = dist_sensor.covariance * 1e4f; // m^2 to cm^2
|
||||
msg.covariance = dist_sensor.variance * 1e4f; // m^2 to cm^2
|
||||
|
||||
mavlink_msg_distance_sensor_send_struct(_mavlink->get_channel(), &msg);
|
||||
|
||||
|
||||
@@ -683,7 +683,7 @@ MavlinkReceiver::handle_message_optical_flow_rad(mavlink_message_t *msg)
|
||||
d.type = 1;
|
||||
d.id = distance_sensor_s::MAV_DISTANCE_SENSOR_ULTRASOUND;
|
||||
d.orientation = distance_sensor_s::ROTATION_DOWNWARD_FACING;
|
||||
d.covariance = 0.0;
|
||||
d.variance = 0.0;
|
||||
|
||||
if (_flow_distance_sensor_pub == nullptr) {
|
||||
_flow_distance_sensor_pub = orb_advertise_multi(ORB_ID(distance_sensor), &d,
|
||||
@@ -736,7 +736,7 @@ MavlinkReceiver::handle_message_hil_optical_flow(mavlink_message_t *msg)
|
||||
d.type = distance_sensor_s::MAV_DISTANCE_SENSOR_LASER;
|
||||
d.id = 0;
|
||||
d.orientation = distance_sensor_s::ROTATION_DOWNWARD_FACING;
|
||||
d.covariance = 0.0;
|
||||
d.variance = 0.0;
|
||||
|
||||
if (_hil_distance_sensor_pub == nullptr) {
|
||||
_hil_distance_sensor_pub = orb_advertise_multi(ORB_ID(distance_sensor), &d,
|
||||
@@ -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 * 1e-4f; // cm^2 to m^2
|
||||
d.variance = dist_sensor.covariance * 1e-4f; // cm^2 to m^2
|
||||
|
||||
/// TODO Add sensor rotation according to MAV_SENSOR_ORIENTATION enum
|
||||
|
||||
|
||||
Reference in New Issue
Block a user