Skip to content

AcresUtvModel.h#

Acres/Source/Acres/AcresUtvModel.h Generated

Polaris Ranger CREW XP 1000 dynamics and its Dataspeed drive-by-wire (DBW) layer (pure C++, no Unreal objects).

The simulator's second vehicle. It is driven through the same interface as the real one: the Dataspeed DBW commands of ds_dbw_msgs 2.3.11 (steering wheel angle / percent / curvature / yaw rate, throttle pedal percent, brake percent or pressure, gear, and the Universal Longitudinal Controller's speed or acceleration commands), and it produces the same reports (steering wheel angle, pedal outputs, brake pressure, ULC reference, wheel-speed velocity).

The model reuses the tractor's machinery (AcresVehicleModel.h) rather than duplicating it: each corner is a AcresSim::PrepareWheel contact (independent suspension spring, damper and travel stops; inflated 27 in tyres; the soil library and Wong's tyre on soil, AcresSoilModel.h, on deformable ground; the tanh friction curve with the wet film on hard ground; lateral slip with relaxation and the friction circle), the wheel spins are solved implicitly with the shared building blocks (AcresSim::AxleCarrierTorqueNm, AcresSim::RisingRoot, AcresSim::SettleWheels) and the energy ledger is the same AcresSim::FEnergyFlows (AcresPowerModel.h, Willans fuel map). What is new here:

  • Engine: ProStar 999 cc twin, a full-load (WOT) and a motoring torque curve blended by the torque request, an electronic-throttle lag, an idle governor, a rev limiter and the top-speed governor; the fuel is cut on overrun.
  • CVT (Polaris PVT): a centrifugal primary clutch (capacity ~ engine speed squared above the engagement speed), the Engine Braking System's reverse coupling, and a belt ratio that settles where the primary's flyweight force balances the secondary's spring and torque-feedback helix: the engine is held at a shift speed that rises with the transmitted torque, between the low and overdrive ratios.
  • Gearbox: P / R / N / H / L with the OEM overall reductions; Park locks the transmission output.
  • Driveline modes of the AWD switch: Turf (rear differential open, front off), 2WD (rear locked) and AWD (rear locked, the front "demand drive" overrunning clutch engages when the rear wheels outrun the front ring gear, which the OEM gearing underdrives by 7.4 %). Active Descent Control optionally locks the front on overrun.
  • Brakes: hydraulic pressure times a per-axle torque gain.
  • Steering: steering wheel angle over the steering ratio, ideal Ackermann on the front wheels.
  • DBW actuators: steering reference generator (commanded rate and acceleration limits, as the firmware reports it), transport delay, first-order servo and a slew limit; throttle pedal emulation with rate limits; brake pressure with a delay, a rate- and acceleration-limited build-up and a pressure-dependent release; gear actuator; command timeouts; and the ULC (shaped speed reference, launch offset, PI throttle law, brake allocation, stop hold). Values fitted to the vehicle's logs are in Content/Simulation/polaris.json with their provenance (Tools/PolarisModel).

Everything is SI except where a name says otherwise: the DBW fields keep the message units (deg, %, bar) so a recorded command can be replayed unchanged. Frames as the tractor: x forward, y left, z up; positive steering turns left; wheels 0 front left, 1 front right, 2 rear left, 3 rear right. Mass-property positions are measured from the rear-axle midpoint on the ground (the vehicle's base_footprint).

A physics step (fixed Dt, 120 Hz in the game) is:

StepDbw(Dt, P, Command, S);                      // actuators, ULC, gear
StepUtvSteering(Dt, P, S);                       // road-wheel angles
StepUtvPowertrain(Dt, P, S);                     // engine, CVT, clutch hand-over
for (int I = 0; I < 4; ++I)
    PrepareUtvWheel(Dt, I, P, SurfaceUnderWheel[I], Samples[I], S);
SolveUtvDriveline(Dt, P, S);                     // wheel spins, engine speed, fuel, ledger
// ... apply S.Vehicle.Wheels[I].FxN / FyN / NormalN to the chassis, then AcresSim::AccountChassis.

SetUtvParameter#

Sets one parameter from a polaris.json key.

Keys are the JSON path of a value without the trailing ".value", e.g. "engine.idle_rpm" or "dbw.steering.delay_s"; the torque curve is "engine.torque_curve_rpm[i]" / "engine.torque_curve_nm[i]". The pawn walks the JSON and calls this for every numeric value; the tools do the same with their flat JSON reader. Unknown keys are reported, not fatal.

Argument Description
P Parameters to change.
Key Dotted key.
Value Number (booleans as 0 / 1).

Returns: True when the key is known.

bool SetUtvParameter(FUtvParameters& P, const char* Key, double Value);

FinalizeUtvParameters#

Derives the mass properties and the shared wheel parameter set from the primary values.

Mass: the sum of the dry vehicle, fluids, equipment, occupants and cargo. Centre of mass: their mass-weighted position. Inertia: the dry vehicle's radii of gyration plus every lumped mass by the parallel-axis theorem. Static corner loads: axle loads from the pitch moment balance, split left / right by the lateral centre-of-mass offset over the track. Also fills P.Wheel (tyres, suspension springs, dampers and travel, cornering, soil defaults).

Argument Description
P Parameters, completed in place.
void FinalizeUtvParameters(FUtvParameters& P);

ResetUtv#

Resets the state: engine at idle, CVT in its low ratio, gear from P's defaults, wheels from AcresSim::ResetVehicle with the Ranger's corner loads, dampers and wheel inertias.

Argument Description
P Finalized parameters.
S State, overwritten.
void ResetUtv(const FUtvParameters& P, FUtvState& S);

CurvatureToSteeringWheelDeg#

Steering wheel angle for a curvature on the firmware's kinematic map: ratio x atan(curvature x wheelbase), deg.

Argument Description
P Parameters (the DBW's kinematic ratio and wheelbase, else the vehicle's).
CurvaturePerM Path curvature, 1/m, positive left.

Returns: Steering wheel angle, deg.

double CurvatureToSteeringWheelDeg(const FUtvParameters& P, double CurvaturePerM);

UtvEngineCurves#

Full-load (WOT) torque, friction torque and closed-throttle pumping torque of the engine at a speed.

WOT: AcresSim::Torque on the full-load curve (0 at and above MaxRpm, the rev limiter). Friction: the FMEP correlation (the same one the fuel map uses), FMEP V_d / (4 pi). Pumping: PumpingBar V_d / (4 pi); at a torque request u the pumping loss is (1 - u) times this, so motoring the closed-throttle engine takes friction + pumping.

Argument Description
P Parameters.
Rpm Engine speed, rev/min.
OutWotNm Full-load brake torque, N m.
OutFrictionNm Friction torque, N m (>= 0).
OutPumpingNm Closed-throttle pumping torque, N m (>= 0).
void UtvEngineCurves(const FUtvParameters& P, double Rpm, double& OutWotNm, double& OutFrictionNm, double& OutPumpingNm);

UtvBrakeOutputBar#

Line pressure the brake actuator applies, bar: the modelled pressure plus a hardware-shift bias (FDbwParameters::BrakeBiasBar), within 0 and the full-scale pressure. The wheels brake with it and the BrakeReport shows it as pressure_output.

Argument Description
P Vehicle parameters.
S Vehicle state after StepDbw.
double UtvBrakeOutputBar(const FUtvParameters& P, const FUtvState& S);

StepDbw#

Advances the drive-by-wire layer by one step: timeouts and enables, the steering actuator, throttle pedal emulation, brake pressure, the gear actuator and the ULC. Reads the wheel speeds for the VehicleVelocity measurement.

Steering: the command (angle, percent, curvature or yaw rate, converted and clamped) drives a time-optimal reference generator with the commanded rate and acceleration limits (starting from the actual angle when control engages); the reference passes a transport delay, a first-order lag and the column motor's slew limit. Without DBW control the wheel follows the driver (or stays put).

ULC (velocity mode): the speed reference moves toward the command at the acceleration / deceleration limit and eases in as if its acceleration were wound down at the jerk limit (rate sign(e) min(a_max, sqrt(2 j |e|))); the acceleration reference tracks that rate at the jerk limits. The demand a_ref + Kp e (e = reference - measured speed) picks the pedal with hysteresis: throttle above ThrottleOnMps2, brake below BrakeOnMps2. The throttle is offset + accel x a_ref + speed x fade x e + integral x integral(e) in pedal %, with the proportional part faded in by the measured speed (none at standstill: the launch ramps through the integral); the brake is the pressure that decelerates UlcMassKg at the demand; standing still with a falling reference it holds the stop brake. Its outputs reach the actuators after UlcDelayS and stay UlcActuatorTimeoutS after it disengages. User throttle or brake commands preempt it.

Argument Description
Dt Step length, s.
P Parameters.
Command This step's commands and driver inputs.
S State, updated (S.Dbw; also S.DriveMode).
void StepDbw(double Dt, const FUtvParameters& P, const FDbwCommand& Command, FUtvState& S);

StepUtvSteering#

Sets the front wheel angles from the steering wheel angle: bicycle angle = SWA / ratio, then ideal Ackermann (AcresSim::Ackermann). Advances S.Vehicle.TimeS.

Argument Description
Dt Step length, s.
P Parameters.
S State, updated.
void StepUtvSteering(double Dt, const FUtvParameters& P, FUtvState& S);

StepUtvPowertrain#

Advances the engine, CVT and clutch by one step and hands the driveline solve what it needs.

Engine: request u = max(pedal^exponent x top-speed governor, idle governor), lagged by EngineTauS; indicated torque u (WOT + friction) while fuelled, brake torque = indicated - friction - (1 - u) pumping (so u = 1 gives the full-load curve, u = 0 the motoring curve with the fuel cut, and the rev limiter cuts the fuel). CVT: the belt ratio relaxes with CvtShiftTauS toward the one that puts the engine at the shift speed sqrt(n_light^2 + (n_full^2 - n_light^2) x clamp(T_belt / T_peak, 0, 1)) at the present secondary speed, within [CvtHighRatio, CvtLowRatio]. Clutch: forward capacity ClutchCapacityNm x clamp((w^2 - w_engage^2) / (w_full^2 - w_engage^2), 0, 1) at the free engine speed; reverse capacity the larger of that and the EBS capacity, which fades to 0 as the engine falls to idle. Writes the FVehicleState hand-over (EngineTorqueNm, DragTorqueNm, FreeEngineRadS, DriveRatio) and the clutch capacities.

Argument Description
Dt Step length, s.
P Parameters.
S State, updated.
void StepUtvPowertrain(double Dt, const FUtvParameters& P, FUtvState& S);

PrepareUtvWheel#

Contact phase of one corner: AcresSim::PrepareWheel with the Ranger's wheel parameters, then the hydraulic brake torque (line pressure x the axle's gain) in place of the tractor's pedal law.

Argument Description
Dt Step length, s.
Index Wheel 0..3.
P Parameters.
Surface Surface under this wheel (FVehicleInput surface fields; its Brake is ignored).
Sample Ground probe for this wheel (compression = 0.5 m - SuspensionM; 0 at full droop).
S State, updated.
void PrepareUtvWheel(double Dt, int Index, const FUtvParameters& P, const FVehicleInput& Surface, const FWheelSample& Sample, FUtvState& S);

SolveUtvDriveline#

Spin phase: solves engine, CVT, clutch, gearbox, rear axle and front demand drive together (backward Euler).

For a trial rear carrier speed c the wheels need: the rear axle (locked, or open in Turf mode) plus, in AWD, each front wheel that the front ring (turning at FrontRingRatio x c) catches up with: its shaft torque at the ring speed, costing FrontRingRatio times that at the carrier (a free wheel otherwise). This rises with c. The engine side: a holding clutch makes the engine end at R c (R the signed belt x gearbox ratio), which takes J_e (w_free - R c) / Dt through the clutch, delivered to the carrier as R x (eta T for drive, T / eta for engine braking); beyond its forward or reverse capacity the clutch slips at the capacity. Park holds c at 0 up to ParkHoldNm; neutral and park leave the engine free. One bisection balances the two sides. Then AcresSim::SettleWheels finishes the wheels and the axle-to-ground ledger; the engine-to-axle ledger (Willans fuel with pumping, engine loss, accessory drag, engine kinetic energy, clutch slip heat, belt and gear loss) is filled here.

Argument Description
Dt Step length, s.
P Parameters.
S State, updated.
void SolveUtvDriveline(double Dt, const FUtvParameters& P, FUtvState& S);

EUtvGear#

enum EUtvGear : int

Gear positions, numbered as ds_dbw_msgs/Gear (the Ranger's H is the message's DRIVE, its L is LOW).

Value Description
UtvGearNone No gear reported / no command.
UtvGearPark P: transmission output locked.
UtvGearReverse R.
UtvGearNeutral N.
UtvGearHigh H (ds_dbw DRIVE).
UtvGearLow L (ds_dbw LOW).

EUtvDriveMode#

enum EUtvDriveMode : int

Positions of the Ranger's AWD switch (owner's manual: AWD / 2WD differential lock / Turf).

Value Description
UtvDriveTurf Rear differential open, front not driven ("1WD / Turf").
UtvDriveTwoWheel Rear differential locked, front not driven.
UtvDriveAllWheel Rear locked, front demand drive engages when the rear wheels slip.

EDbwSteerMode#

enum EDbwSteerMode : int

Steering command types, numbered as ds_dbw_msgs/SteeringCmd.

Value Description
DbwSteerNone No command.
DbwSteerAngle Steering wheel angle, deg.
DbwSteerCurvature Path curvature, 1/m, mapped to a steering wheel angle kinematically.
DbwSteerYawRate Yaw rate, rad/s, mapped kinematically with the current speed.
DbwSteerPercent Percent of the steering wheel angle range.

EDbwPedalMode#

enum EDbwPedalMode : int

Throttle and brake command types, numbered as ds_dbw_msgs/ThrottleCmd and BrakeCmd.

Value Description
DbwPedalNone No command.
DbwBrakePressure Brake only: pressure, bar.
DbwPedalRaw Raw pedal sensor percent (throttle: 15..80 % of the analog voltage).
DbwPedalPercent Percent of the full range.

EUlcMode#

enum EUlcMode : int

ULC command types, numbered as ds_dbw_msgs/UlcCmd.

Value Description
UlcNone No command.
UlcVelocity Speed, m/s.
UlcAccel Acceleration, m/s2.

FDbwParameters#

struct FDbwParameters

Drive-by-wire actuator and ULC constants. Fitted values come from Tools/PolarisModel (see polaris.json).

Name Type Unit Default Description
SteerDefaultRateDegS, SteerDefaultAccelDegS2 double Steering reference generator defaults, used when a command's rate or acceleration limit is 0: rate, deg/s; acceleration, deg/s2 (the values the vehicle's planner sent; the firmware defaults are not documented).
SteerDelayS, SteerTauS, SteerSlewDegS double Steering servo: transport delay, s; first-order lag, s; slew limit of the column motor, deg/s.
SteerLockDeg double ° 487 Steering wheel angle limit, deg (the SteeringReport limit_value at standstill).
SteerCommandDeg double ° 280 Documented angle / percent command range, deg.
MaxCurvaturePerM double m .2 Curvature command range, 1/m.
MaxYawRateRadS double s 8.5 Yaw rate command range, rad/s.
KinematicRatio, KinematicWheelbaseM double Kinematic map of the curvature and yaw-rate modes (the firmware's own steering ratio and wheelbase; 0 = the vehicle's).
CommandTimeoutS double s .1 A subsystem (steering, ULC, user throttle or brake) disengages when no command arrived for this long, s.
UlcActuatorTimeoutS double s .087 The throttle and brake the ULC drives keep its last output this much longer after the ULC disengages (their own timeout on the ULC's internal commands), s.
ThrottleDelayS, ThrottleDefaultRatePctS double Throttle pedal emulation: delay, s; default rate limits when a command gives 0, %/s (0 = unlimited).
BrakeMaxBar, BrakeDelayS, BrakeSlewBarS, BrakeApplyAccelBarS2, BrakeReleaseTauS, BrakeReleaseExponent double Brake: full-scale pressure of the percent mode, bar; delay, s. Apply: the pressure moves time-optimally toward the command with a rate limit, bar/s, and an acceleration limit, bar/s2 (the accelerate-then-stop build-up of the log). Release: a lag at 10 bar, s, growing as (10 bar / p)^BrakeReleaseExponent at lower pressure (the fast drop and slow tail of the recorded release).
GearShiftS, GearShiftMaxSpeedMps double Gear actuator: time to complete a shift, s; shifts are accepted below this speed, m/s.
UlcDefaultAccelMps2, UlcDefaultDecelMps2, UlcDefaultJerkThrottleMps3, UlcDefaultJerkBrakeMps3 double ULC reference defaults when a command limit is 0: acceleration and deceleration limits, m/s2; jerk limits while the acceleration rises and falls, m/s3 (read off the Dataspeed overview's default-limit plot).
SpeedScale double .93 Wheel-speed measurement (VehicleVelocity, what the ULC regulates): measured / (wheel spin x unloaded tyre radius).
UlcKp, UlcDelayS double ULC acceleration demand a_ref + Kp e (e = speed reference - measured speed), which picks the pedal and sets the brake: proportional gain, 1/s. Latency from the ULC's decision to its throttle and brake commands, s.
UlcThrottleOffsetPct, UlcThrottleAccelPct, UlcThrottleSpeedPct, UlcThrottleIntegralPct double ULC throttle law, pedal = offset + accel x a_ref + speed x fade x e + integral x integral(e dt), in pedal %: offset, %; acceleration feed-forward, %/(m/s2); proportional, %/(m/s); integral, %/m (integral clamped at UlcIntegralLimitM, m). The proportional term fades in with the measured speed up to LaunchSpeedMps (at standstill the ULC only ramps the pedal through the integral: the launch seen in dbw_direct_test_01).
UlcThrottleOnMps2, UlcBrakeOnMps2 double Pedal switching on the demand, with hysteresis: throttle above ThrottleOnMps2, brake below BrakeOnMps2 (m/s2).
UlcMassKg, UlcStopBrakePct, UlcStopSpeedMps double ULC brake: mass estimate for the brake allocation (UlcMassEstimate), kg; stop hold: brake percent (UlcStopTorque) applied at standstill, %, below StopSpeedMps.
UlcSpeedBiasMps, ThrottleBiasPct, BrakeBiasBar double Hardware shifts (robustness studies; all 0 = the calibrated vehicle, set at run time by the simulator control, AcresSimControl.h): UlcSpeedBiasMps is added to the speed the ULC regulates (a wheel-speed sensor reading high by this much: the vehicle settles this much slower), m/s; ThrottleBiasPct is added to the emulated pedal the throttle actuator outputs, %; BrakeBiasBar to the line pressure the brake actuator builds, bar. A steering offset is a change of FUtvParameters::SteeringCenterDeg.

FUtvParameters#

struct FUtvParameters

All Ranger constants, SI unless the name says otherwise. Loaded from Content/Simulation/polaris.json (AcresSim::SetUtvParameter per key), then completed by AcresSim::FinalizeUtvParameters.

Name Type Unit Default Description
WheelbaseM, TrackFrontM, TrackRearM double Axle spacing and front / rear track (tyre centre to centre), m.
DryMassKg, FluidsKg, RoofEquipmentKg, BayEquipmentKg, OccupantKg, CargoKg double Mass build-up, kg: the OEM dry mass, fluids (fuel, oil, coolant), the Purdue drive-by-wire and sensor equipment on the roof rack and in the electronics bay, one occupant, and cargo in the bed.
Occupants int 1 Number of occupants, 0..6: driver, front passenger, rear left, rear right, rear centre, front centre.
DryCgForwardM, DryCgLeftM, DryCgHeightM double Dry vehicle centre of mass: ahead of the rear axle, left of the centreline and above the ground, m.
DryGyrationRollM, DryGyrationPitchM, DryGyrationYawM double Dry vehicle radii of gyration about the roll, pitch and yaw axes through its centre of mass, m.
FluidsXM, FluidsYM, FluidsZM double Positions (x ahead of the rear axle, y left, z up), m: fluids; roof equipment; electronics bay; seat rows (front and rear x, seat lateral offset, occupant centre-of-mass height); cargo.
TravelM, DroopM, FrontWheelRateNM, RearWheelRateNM, DampingRatio, BumpStopLengthM, BumpStopRateNM2 double Suspension, per corner: total wheel travel, m; droop from the static position, m; wheel rates front and rear, N/m (spring at the wheel, in series with the tyre); damping ratio; bump-stop engagement length, m; quadratic bump-stop rate, N/m2.
TyreRadiusM, FrontTyreWidthM, RearTyreWidthM, TyreSectionM double Tyres (27 x 9-14 front, 27 x 11-14 rear): unloaded radius, m; widths, m; section height, m; inflation, kPa; carcass stiffness pressure, kPa; hysteresis per relative deflection; lug height, m; lug area share; tread shear compliance as a Janosi K, m; cornering stiffness per load, 1/rad; lateral relaxation length, m; hard-surface slip stiffness; spin inertia of tyre, wheel and hub, kg m2.
SteeringRatio, SteeringCenterDeg double Steering: steering wheel to road wheel ratio (bicycle angle), dimensionless; steering wheel angle at which the vehicle runs straight (alignment and sensor zero; a cross slope looks the same), deg.
IdleRpm, MaxRpm double Engine: idle and fuel cut-off speeds, rev/min; full-load (WOT) brake torque curve; inertia with the primary clutch, kg m2; accessory drag (alternator, pumps), N m; displacement, L; indicated efficiency; friction mean effective pressure FMEP = a + b krpm + c krpm^2, bar; closed-throttle pumping MEP, bar; torque lag of the electronic throttle and intake, s; idle governor gain (torque request per relative speed error); pedal map exponent (request = pedal^exponent); top-speed governor, m/s.
FuelLhvMJKg, FuelDensityKgL, FuelTankL double Fuel (gasoline): lower heating value, MJ/kg; density, kg/L; tank, L (0 = not modelled).
CvtLowRatio, CvtHighRatio, EngageRpm, FullEngageRpm, ClutchCapacityNm double CVT: belt ratio range (primary / secondary speed) low and overdrive; centrifugal clutch engagement and full engagement speeds, rev/min; clutch torque capacity at full engagement, N m; Engine Braking System reverse capacity, N m; shift speeds at no transmitted torque and at peak engine torque, rev/min; shift time constant, s; belt and gear efficiencies; secondary clutch and gearbox inertia at the secondary, kg m2.
bEbs, bAdc bool EBS on (engine braking through the belt) and Active Descent Control (front locked on overrun) on.
RearLowRatio, RearHighRatio, RearReverseRatio double Overall reductions secondary clutch to rear wheels (OEM "Gear Reduction - Rear") and to the front prop shaft (OEM "Gear Reduction - Front"), low / high / reverse, and the front drive (demand drive gearcase) ratio.
ParkHoldNm double N·m 20000 Park pawl holding torque at the rear carrier, N m.
FrontBrakeNmPerBar, RearBrakeNmPerBar double Brakes: torque per bar of line pressure at each front and each rear wheel, N m/bar.
DragAreaM2, AirDensityKgM3 double Air drag area Cd A, m2; air density, kg/m3.
Dbw FDbwParameters Drive-by-wire constants.
MassKg, CgForwardM, CgLeftM, CgHeightM, IxxKgM2, IyyKgM2, IzzKgM2 double Derived by FinalizeUtvParameters: total mass, kg; centre of mass (ahead of the rear axle, left, height), m; inertia about the centre of mass (roll, pitch, yaw), kg m2; static corner loads, N.
PeakTorqueNm double N·m 0 Derived: peak of the full-load curve, N m (the CVT's torque-feedback scale).
Wheel FVehicleParameters Derived: the parameter set of the shared tyre, suspension and wheel-spin code (AcresSim::PrepareWheel and the driveline building blocks). Its CgForwardM follows the tractor's convention (body origin 40 % of the wheelbase ahead of the rear axle).

FDbwCommand#

struct FDbwCommand

One step's drive-by-wire commands, in the ds_dbw_msgs units. A subsystem is under DBW control while the system is enabled, its enable flag is set, its mode is not None and its last message is younger than the command timeout; the driver's inputs act otherwise.

Name Type Unit Default Description
bSystemEnable bool false System enable (the vehicle's dbw_enabled; /vehicle/enable on the Ranger).
SteerMode int DbwSteerNone Steering: mode (EDbwSteerMode), value in the mode's unit, rate and acceleration limits (deg/s, deg/s2; 0 = the default, infinity = unlimited), enable, and whether a new message arrived this step.
ThrottleMode int DbwPedalNone Throttle: mode (DbwPedalPercent or DbwPedalRaw), value, %; rate limits for increase and decrease, %/s (0 = default); enable; fresh.
BrakeMode int DbwPedalNone Brake: mode (DbwPedalPercent or DbwBrakePressure), value (% or bar), rate limits (per s, 0 = default), enable, fresh.
GearCommand int UtvGearNone Gear command (EUtvGear; UtvGearNone = none).
UlcMode int UlcNone ULC: mode (EUlcMode), command (m/s or m/s2), acceleration and deceleration limits (m/s2), jerk limits while the acceleration rises and falls (m/s3; 0 = default), enable, coast (no brakes), fresh.
DriverSteeringWheelDeg, DriverThrottlePct, DriverBrakeBar double Driver inputs when a subsystem is not under DBW control: steering wheel angle, deg (applied only with bDriverSteers, otherwise the wheel stays where it is); throttle pedal, %; brake line pressure, bar; gear lever (EUtvGear).
DriveMode int UtvDriveAllWheel Position of the AWD switch (EUtvDriveMode).

FDbwState#

struct FDbwState

Drive-by-wire actuator states and the report fields (ds_dbw_msgs units).

Name Type Unit Default Description
bSteerEnabled, bThrottleEnabled, bBrakeEnabled, bUlcEnabled bool Enabled flags per subsystem (the reports' "enabled").
SteerAgeS, ThrottleAgeS, BrakeAgeS, UlcAgeS double Time since each subsystem's last message, s.
SteerTargetDeg, SteerRefDeg, SteerRefRateDegS, SteeringWheelDeg, SteeringWheelRateDegS double Steering: target after the mode conversion, deg; reference (the report's cmd) and its rate, deg and deg/s; actual steering wheel angle and rate, deg and deg/s.
SteerDelay std::deque&lt;std::pair&lt;double, double>> History of (time, reference) for the steering transport delay.
ThrottleCmdPct, ThrottlePedalPct double Throttle: the pedal command after rate limits (percent_cmd) and the emulated pedal (percent_output), %.
ThrottleDelay std::deque&lt;std::pair&lt;double, double>> History of (time, pedal command) for the throttle delay.
BrakeCmdBar, BrakePressureBar, BrakeRateBarS double Brake: pressure command (pressure_cmd), line pressure (pressure_output) and its build-up rate, bar and bar/s.
BrakeDelay std::deque&lt;std::pair&lt;double, double>> History of (time, pressure command) for the brake delay.
Gear, GearTarget int Gear: engaged, target and remaining shift time, s.
UlcVelRefMps, UlcAccelRefMps2, UlcIntegralM, UlcDemandMps2 double ULC: speed and acceleration reference (vel_ref, accel_ref), m/s and m/s2; speed-error integral, m; acceleration demand of the speed loop, m/s2; stop hold active; the throttle and brake it asks for, % and bar.
UlcPedal int 0 Pedal the ULC is using: 0 none, 1 throttle, 2 brake (switched with hysteresis on the demand).
UlcThrottleDelay, UlcBrakeDelay std::deque&lt;std::pair&lt;double, double>> Histories of the ULC's throttle and brake requests (its output latency), and the time the throttle and brake keep its last output after it disengages, s.
SpeedBrakeMps, SpeedPropulsionMps double Measured speeds (VehicleVelocity): from all four wheel sensors and from the propulsion side (rear), m/s, signed by the gear direction.
TimeS double s 0 Time since reset, s.

FUtvState#

struct FUtvState

Everything the Ranger model integrates between steps.

Name Type Unit Default Description
Vehicle FVehicleState Wheels, engine speed (Rpm), clutch, fuel and energy ledger in the tractor's struct.
Dbw FDbwState Drive-by-wire actuators and reports.
CvtRatio double 3.2 CVT belt ratio, primary / secondary speed.
EngineRequest double 0 Engine torque request after the throttle lag, 0..1 (0 = closed, fuel cut; 1 = WOT); whether the engine is fuelled this step (request above 0, below the rev limiter, fuel in the tank).
ClutchForwardNm, ClutchReverseNm double Clutch capacities this step for positive (engine drives) and negative (engine braking) torque, N m.
FrontRingRatio double 0 Overall ratio from the rear carrier to the front ring gear, dimensionless (OEM gearing: 0.926).
bFrontEngaged bool Front demand drive engaged per front wheel this step, and the torque the front ring passed, N m (at the ring).
bParked bool false Transmission locked by the park pawl this step.
RoadWheelRad double rad 0 Road wheel (bicycle) steering angle, rad.
DriveMode int UtvDriveAllWheel Driveline mode this step (EUtvDriveMode).
EnginePowerW, PedalInput double Engine brake power this step (torque x mid-step speed), W, and the pedal the engine saw, 0..1.