Files
I150/srcs/RobotNet10/Shared/RobotNet10.Shared/Sensor/Range.cs
2026-07-03 16:37:12 +07:00

61 lines
1.6 KiB
C#

namespace RobotNet10.Shared.Sensor;
/// <summary>
/// Range message (sensor_msgs/Range)
/// Single range reading from an active ranger that emits energy and reports
/// one range reading that is valid along an arc at the distance measured.
/// </summary>
public struct Range
{
/// <summary>
/// Header with timestamp and frame ID
/// </summary>
public Header Header { get; set; }
/// <summary>
/// Radiation type constants
/// </summary>
public const byte RadiationTypeUltrasound = 0;
public const byte RadiationTypeInfrared = 1;
/// <summary>
/// The type of radiation used by the sensor (RadiationType constants)
/// </summary>
public byte RadiationType { get; set; }
/// <summary>
/// The size of the arc that the distance reading is valid for (rad)
/// </summary>
public double FieldOfView { get; set; }
/// <summary>
/// Minimum range value (m)
/// </summary>
public double MinRange { get; set; }
/// <summary>
/// Maximum range value (m)
/// </summary>
public double MaxRange { get; set; }
/// <summary>
/// Range data (m)
/// (Note: values < range_min or > range_max should be discarded)
/// </summary>
public double RangeValue { get; set; }
/// <summary>
/// Default constructor
/// </summary>
public Range()
{
Header = new Header();
RadiationType = RadiationTypeUltrasound;
FieldOfView = 0.0;
MinRange = 0.0;
MaxRange = 0.0;
RangeValue = 0.0;
}
}