produceFourWheelOdometry static method
- DateTime? acquisitionTime,
- double yawSpeed = 0.0,
- double grossYawRate = 0.0,
- DrivingDirection drivingDirection = DrivingDirection.undefined,
- double vehicleSpeed = 0.0,
- int pulseCountFL = 0,
- int pulseCountFR = 0,
- int pulseCountRL = 0,
- int pulseCountRR = 0,
- bool hasFLWheelFault = false,
- bool hasFRWheelFault = false,
- bool hasRLWheelFault = false,
- bool hasRRWheelFault = false,
Creates a new FourWheelOdometry instance from provided parameters.
Parameters
acquisitionTime: When the odometry reading was taken (defaults to current time).yawSpeed: Yaw speed in radians per second (default: 0.0).grossYawRate: Unfiltered yaw rate in radians per second (default: 0.0).drivingDirection: Direction of travel (defaults to DrivingDirection.undefined).vehicleSpeed: Vehicle speed in m/s, always non-negative (default: 0.0).pulseCountFL: Front-left wheel encoder pulse count (default: 0).pulseCountFR: Front-right wheel encoder pulse count (default: 0).pulseCountRL: Rear-left wheel encoder pulse count (default: 0).pulseCountRR: Rear-right wheel encoder pulse count (default: 0).hasFLWheelFault: Whether the front-left tick counter has a fault (default: false).hasFRWheelFault: Whether the front-right tick counter has a fault (default: false).hasRLWheelFault: Whether the rear-left tick counter has a fault (default: false).hasRRWheelFault: Whether the rear-right tick counter has a fault (default: false).
Returns
- FourWheelOdometry: The created four-wheel odometry instance.
Implementation
static FourWheelOdometry produceFourWheelOdometry({
DateTime? acquisitionTime,
double yawSpeed = 0.0,
double grossYawRate = 0.0,
DrivingDirection drivingDirection = DrivingDirection.undefined,
double vehicleSpeed = 0.0,
int pulseCountFL = 0,
int pulseCountFR = 0,
int pulseCountRL = 0,
int pulseCountRR = 0,
bool hasFLWheelFault = false,
bool hasFRWheelFault = false,
bool hasRLWheelFault = false,
bool hasRRWheelFault = false,
}) {
return FourWheelOdometryImpl(
type: DataType.fourWheelOdometry,
acquisitionTime: acquisitionTime ?? DateTime.now(),
yawSpeed: yawSpeed,
grossYawRate: grossYawRate,
drivingDirection: drivingDirection,
vehicleSpeed: vehicleSpeed,
pulseCountFL: pulseCountFL,
pulseCountFR: pulseCountFR,
pulseCountRL: pulseCountRL,
pulseCountRR: pulseCountRR,
hasFLWheelFault: hasFLWheelFault,
hasFRWheelFault: hasFRWheelFault,
hasRLWheelFault: hasRLWheelFault,
hasRRWheelFault: hasRRWheelFault,
);
}