mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-16 01:33:33 +08:00
Rename distance_sensor.covariance to variance
This commit is contained in:
committed by
Nuno Marques
parent
8ba7569852
commit
fbc8d01a7e
@@ -399,7 +399,7 @@ CM8JL65::collect()
|
||||
report.current_distance = _distance_mm / 1000.0f;
|
||||
report.min_distance = get_minimum_distance();
|
||||
report.max_distance = get_maximum_distance();
|
||||
report.covariance = 0.0f;
|
||||
report.variance = 0.0f;
|
||||
report.signal_quality = -1;
|
||||
/* TODO: set proper ID */
|
||||
report.id = 0;
|
||||
|
||||
@@ -436,7 +436,7 @@ void leddar_one::_publish(uint16_t distance_mm)
|
||||
report.current_distance = ((float)distance_mm / 1000.0f);
|
||||
report.min_distance = MIN_DISTANCE;
|
||||
report.max_distance = MAX_DISTANCE;
|
||||
report.covariance = 0.0f;
|
||||
report.variance = 0.0f;
|
||||
report.signal_quality = -1;
|
||||
report.id = 0;
|
||||
|
||||
|
||||
@@ -540,7 +540,7 @@ int LidarLiteI2C::collect()
|
||||
report.current_distance = distance_m;
|
||||
report.min_distance = get_minimum_distance();
|
||||
report.max_distance = get_maximum_distance();
|
||||
report.covariance = 0.0f;
|
||||
report.variance = 0.0f;
|
||||
report.signal_quality = signal_quality;
|
||||
report.type =
|
||||
distance_sensor_s::MAV_DISTANCE_SENSOR_LASER; // the sensor is in fact a laser + sonar but there is no enum for this
|
||||
|
||||
@@ -178,7 +178,7 @@ int LidarLitePWM::measure()
|
||||
_range.max_distance = get_maximum_distance();
|
||||
_range.min_distance = get_minimum_distance();
|
||||
_range.current_distance = float(_pwm.pulse_width) * 1e-3f; /* 10 usec = 1 cm distance for LIDAR-Lite */
|
||||
_range.covariance = 0.0f;
|
||||
_range.variance = 0.0f;
|
||||
_range.orientation = _rotation;
|
||||
/* TODO: set proper ID */
|
||||
_range.id = 0;
|
||||
|
||||
@@ -507,7 +507,7 @@ MB12XX::collect()
|
||||
report.current_distance = distance_m;
|
||||
report.min_distance = get_minimum_distance();
|
||||
report.max_distance = get_maximum_distance();
|
||||
report.covariance = 0.0f;
|
||||
report.variance = 0.0f;
|
||||
report.signal_quality = -1;
|
||||
/* TODO: set proper ID */
|
||||
report.id = 0;
|
||||
|
||||
@@ -519,7 +519,7 @@ SF0X::collect()
|
||||
report.current_distance = distance_m;
|
||||
report.min_distance = get_minimum_distance();
|
||||
report.max_distance = get_maximum_distance();
|
||||
report.covariance = 0.0f;
|
||||
report.variance = 0.0f;
|
||||
report.signal_quality = -1;
|
||||
/* TODO: set proper ID */
|
||||
report.id = 0;
|
||||
|
||||
@@ -507,7 +507,7 @@ SF1XX::collect()
|
||||
report.current_distance = distance_m;
|
||||
report.min_distance = get_minimum_distance();
|
||||
report.max_distance = get_maximum_distance();
|
||||
report.covariance = 0.0f;
|
||||
report.variance = 0.0f;
|
||||
report.signal_quality = -1;
|
||||
/* TODO: set proper ID */
|
||||
report.id = 0;
|
||||
|
||||
@@ -510,7 +510,7 @@ SRF02::collect()
|
||||
report.current_distance = distance_m;
|
||||
report.min_distance = get_minimum_distance();
|
||||
report.max_distance = get_maximum_distance();
|
||||
report.covariance = 0.0f;
|
||||
report.variance = 0.0f;
|
||||
report.signal_quality = -1;
|
||||
/* TODO: set proper ID */
|
||||
report.id = 0;
|
||||
|
||||
@@ -588,7 +588,7 @@ TERARANGER::collect()
|
||||
report.current_distance = distance_m;
|
||||
report.min_distance = get_minimum_distance();
|
||||
report.max_distance = get_maximum_distance();
|
||||
report.covariance = 0.0f;
|
||||
report.variance = 0.0f;
|
||||
report.signal_quality = -1;
|
||||
/* TODO: set proper ID */
|
||||
report.id = 0;
|
||||
|
||||
@@ -540,7 +540,7 @@ TFMINI::collect()
|
||||
report.current_distance = distance_m;
|
||||
report.min_distance = get_minimum_distance();
|
||||
report.max_distance = get_maximum_distance();
|
||||
report.covariance = 0.0f;
|
||||
report.variance = 0.0f;
|
||||
report.signal_quality = -1;
|
||||
/* TODO: set proper ID */
|
||||
report.id = 0;
|
||||
|
||||
@@ -277,7 +277,7 @@ Radar::init()
|
||||
ds_report.orientation = _rotation;
|
||||
ds_report.id = 0;
|
||||
ds_report.current_distance = -1.0f; // make evident that this range sample is invalid
|
||||
ds_report.covariance = SENS_VARIANCE;
|
||||
ds_report.variance = SENS_VARIANCE;
|
||||
|
||||
_distance_sensor_topic = orb_advertise_multi(ORB_ID(distance_sensor), &ds_report,
|
||||
&_orb_class_instance, ORB_PRIO_HIGH);
|
||||
@@ -463,7 +463,7 @@ Radar::task_main()
|
||||
report.current_distance;
|
||||
report.min_distance = ULANDING_MIN_DISTANCE;
|
||||
report.max_distance = ULANDING_MAX_DISTANCE;
|
||||
report.covariance = SENS_VARIANCE;
|
||||
report.variance = SENS_VARIANCE;
|
||||
report.type = distance_sensor_s::MAV_DISTANCE_SENSOR_RADAR;
|
||||
report.id = 0;
|
||||
|
||||
|
||||
@@ -667,7 +667,7 @@ VL53LXX::collect()
|
||||
|
||||
report.min_distance = VL53LXX_MIN_RANGING_DISTANCE;
|
||||
report.max_distance = VL53LXX_MAX_RANGING_DISTANCE;
|
||||
report.covariance = 0.0f;
|
||||
report.variance = 0.0f;
|
||||
report.signal_quality = -1;
|
||||
|
||||
/* TODO: set proper ID */
|
||||
|
||||
@@ -556,7 +556,7 @@ PX4FLOW::collect()
|
||||
distance_report.min_distance = PX4FLOW_MIN_DISTANCE;
|
||||
distance_report.max_distance = PX4FLOW_MAX_DISTANCE;
|
||||
distance_report.current_distance = report.ground_distance_m;
|
||||
distance_report.covariance = 0.0f;
|
||||
distance_report.variance = 0.0f;
|
||||
distance_report.signal_quality = -1;
|
||||
distance_report.type = distance_sensor_s::MAV_DISTANCE_SENSOR_ULTRASOUND;
|
||||
/* TODO: the ID needs to be properly set */
|
||||
|
||||
Reference in New Issue
Block a user