AcresCoreTractor.h#
Game/Core/Source/AcresCoreTractor.h Generated
The Case IH Maxxum 150 in ACRES Core: the game's own tractor model (AcresVehicleModel.h: steering, drivetrain, tyres on the soil library, driveline) and implement model (AcresImplementModel.h, AcresImplementCoupling.h), both compiled unchanged, on a rigid chassis that does what the game does with Chaos in AAcresVehiclePawn:: AsyncPhysicsTickActor and StepImplementPhysics (AcresVehicle.cpp) for the Maxxum:
- per wheel a ray from the suspension mount (RestExtensionM 0.35 m) down the chassis' up axis, radius + 0.75 m long, against the terrain; the contact velocity v + w x r split along the ground normal, the steered heading on the ground and its right; the surface under the contact (FAcresWorld::SurfaceAt with the Maxxum's rolling resistance on hard ground, loose density on ground an implement tilled); AcresSim::PrepareWheel, then AcresSim::SolveDriveline for all four;
- forces N n + Fx forward + Fy right + water drag at the rut bottom, the farm stamps (tyres, the body sweep with the Maxxum's 0.9 m front overhang and 0.55 m clearance), the air drag 0.5 x 1.225 x 0.8 x 4 m2 |v| v;
- the implement of the implement model (cultivator, chisel plow, disc harrow, seed drill, mounted sprayer, front loader with bale fork, backhoe, trailed square baler): its ground offset and soil from the terrain and the surface under the tools, AcresSim::StepImplement, its wrench on the chassis (the baler: the drawbar load turned with the tractrix of its axle), its mass properties on the chassis (all but the baler; ApplyImplementMass), its PTO and hydraulic power on the engine one step later, the field-work strip on the farm;
- the farm harvester (the game's -FarmHarvester: the offset header of farm.json, or the potato digger of tractor.json implement.type), with its bunker mass on the chassis, its PTO load and the ASABE draft of the legacy mounted implement;
- Chaos' semi-implicit Euler step of the body with its 0.08 1/s angular damping, as FAcresPolaris.
What the game has and Core does not: the legacy tractor's trailed implement (a second pawn on a Chaos ball joint; the Maxxum's implements do not use it), the backhoe's pits in the ground (the farm of Core has no relief), the look of field work, a laid windrow (the baler takes the windrow density of its controls everywhere, as the game does without a laid windrow), the Chaos contact of the chassis box with the ground.
A test-stand drawbar (FAcresTractorControls::DrawbarN) pulls back at the hitch like the drawbar of the game's vehicle bench (Tests/Game/Vehicle/VehicleBench.h); it is not a load of the game.
Frames: world ENU, body FLU about the body origin (0.4 L ahead of the rear axle, CgHeightM above level ground at rest), the implement model's tractor frame FLU on the ground under the rear axle (AcresImplementModel.h). One environment's thread only.
LoadTractorConfig#
Loads tractor.json (and the implement's data file) into a configuration the way the pawn does (LoadConfiguration, LoadImplementConfiguration, SetupImplement, the farm's harvester block).
| Argument | Description |
|---|---|
ContentDir |
Game/Content/Simulation. |
World |
The world (its tractor.json soil is the tractor's ground). |
ImplementId |
"none", an implement-model id (cultivator ... square_baler, round_baler, grain_cart, mower_conditioner, rotary_cutter, flail_shredder; the game's -Implement=), or "harvester" (the game's -FarmHarvester, with tractor.json's implement type: the cutter or the digger). |
Empty |
tractor.json implement_model.id. |
VehicleOverrides |
tractor.json vehicle keys -> value (e.g. "mass_kg"); "initial_gear" too. |
ImplementOverrides |
implements/<id>.json keys -> value (the game's -ImplementSet=), and the operator settings of implement_model (working_depth_m, draft_setpoint_n, spray_rate_l_ha, seed_rate_kg_ha, windrow_kg_m, bale_mass_kg, boom_lift_m). |
Out |
Receives the configuration. |
Error |
Why it failed (may be null). |
Returns: False on a read error, an unknown key or a value outside the game's checks.
FAcresTractorConfig#
Everything that defines one Maxxum and its implement: tractor.json and implements/<id>.json, as the pawn loads them.
| Name | Type | Unit | Default | Description |
|---|---|---|---|---|
Vehicle |
AcresSim::FVehicleParameters |
The tractor's parameters (tractor.json "vehicle", with the soil of the world's tractor.json "soil"). | ||
InertiaKgM2 |
FVec3 |
Principal inertia of the tractor alone about its centre of mass, kg m2 (vehicle.inertia_kg_m2; zero: the solid box of the pawn, (L + 0.55) x (T + 0.5) x 2.5 m). | ||
RatedRpm, Pto540EngineRpm, Pto1000EngineRpm |
double |
Rated engine speed and the engine speeds of the 540 and 1000 rpm PTO standards, rev/min. | ||
InitialGear |
int |
9 |
Gear at a reset, 0-based (vehicle.initial_gear - 1). | |
bImplement |
bool |
false |
Implement of the implement model: its kind (bImplement false: none), parameters and operator controls at the start (tractor.json implement_model and implements/<id>.json, the pawn's SetupImplement). | |
BaleMassKg |
double |
kg | 450 |
Bale mass on the loader's fork, kg (implement_model.bale_mass_kg). |
MountedMassKg, HitchOverhangM, MountedCgHeightM, CustomDraftN, ImplementWidthM, ImplementDepthCm, ImplementDesignKmh |
double |
Legacy implement block (tractor.json "implement"): the mounted mass of the harvester, kg; hitch overhang behind the rear axle, m; the mounted mass' centre height, m; draft of a custom implement at its design speed, N; type, width (m), depth (cm), design speed (km/h); soil texture (-1: from the map). | ||
bHarvester, bDigger |
bool |
The farm harvester (the game's -FarmHarvester; farm.json "harvester"): the offset cutter, or the potato digger when ImplementType is potato_digger. Header width (m), centre in the body frame (x forward, y left, m), PTO load (kW), bunker capacity (kg). |
FAcresTractorGround#
Ground under every wheel and tool of a test stand (FAcresTractor::SetGround), in place of the world's surface: the bench's ground (Tests/Game/Vehicle/VehicleBench.h FGround) for comparisons with the game's vehicle bench and for tables of the ground.
| Name | Type | Unit | Default | Description |
|---|---|---|---|---|
bSoil |
bool |
true |
Soil (library class, water content, surface wetness, dry density 0: the class's firm one, standing water, sod and track ground) or a hard surface (friction, rolling resistance, template index). | |
bRearInFrontRuts |
bool |
false |
The rear tyres run in the ruts of the front tyres (the rut of each side is the front wheel's sinkage). |
FAcresTractorControls#
The driver's controls of one physics step.
| Name | Type | Unit | Default | Description |
|---|---|---|---|---|
Throttle, Brake, SteeringRad, Direction |
double |
Pedals 0..1, the bicycle-model steering angle (rad, positive left), direction (+1 forward, -1 reverse), gear (0-based index into the 16 ratios), differential lock (0 open, 1 rear, 2 rear and front), hand throttle 0..1 (the larger of it and the pedal), park brake. | ||
Implement |
AcresSim::FImplementControls |
The implement's operator controls (FImplementControls; LoaderPayloadKg is set from bBaleOnFork). | ||
bBaleOnFork, bHarvest |
bool |
A bale on the loader's fork (BaleMassKg of the configuration). The harvester's header switched on. | ||
DrawbarN, DrawbarHeightM |
double |
Test-stand drawbar: pull, N, against horizontal travel (faded in by tanh(v / 0.2 m/s), as the bench), at the hitch (HitchOverhangM behind the rear axle) DrawbarHeightM above the ground. |
FAcresTractorStepInfo#
What one physics step did, for the environment's accounting.
| Name | Type | Unit | Default | Description |
|---|---|---|---|---|
CrushedByWheelsM2, CrushedByBodyM2, HarvestedM2, HarvestedKg, WorkedM2 |
double |
Crop crushed this step by the tyres and by the body, m2; harvested this step, m2 and kg; worked this step, m2. | ||
WheelClass, WheelField |
int |
Surface-map class and field under each wheel's contact (-1 / 0 when airborne). | ||
Grounded |
int |
0 |
Wheels on the ground. | |
DraftN |
double |
N | 0 |
Draft on the chassis this step, N: the implement model's soil and rolling draft, or the harvester's ASABE draft, or the test-stand drawbar. |
Stamps |
FAcresFarmStamp |
The stamps applied this step (4 tyres, the body, a cut, a work strip or a mower's cut, Kind 4; Count of them valid). |
FAcresTractor#
One simulated Maxxum. See the file comment.
| Name | Type | Unit | Default | Description |
|---|---|---|---|---|
S |
AcresSim::FVehicleState |
Model state (engine, gearbox, wheels, fuel, ledger). | ||
ImplementState |
AcresSim::FImplementState |
Implement state and its last output (meaningful when Config().bImplement). | ||
BalerYawRad, BalerPitchRad, BalerRollRad |
double |
The baler's articulation relative to the tractor (yaw, pitch, roll), rad. | ||
BunkerKg |
double |
kg | 0 |
Grain or tubers in the harvester's bunker, kg. |
Com, Velocity, AngularVelocity, AccelerationBody |
FVec3 |
Chassis: centre of mass (world, m), orientation (world <- body), centre-of-mass velocity (world, m/s), angular velocity (world, rad/s); body-frame acceleration of the centre of mass over the last step, m/s2. | ||
ComBody |
FVec3 |
Centre of mass relative to the body origin, body frame, m. | ||
MountBody, FootprintBody |
FVec3 |
Suspension mounts, body frame, m; base_footprint, body frame. |
FAcresTractor::Init#
Takes a configuration (copied) and sets the mass properties with the implement at rest.
FAcresTractor::Reset#
Places the tractor and resets the model and the implement (the hitch at the top, tanks and hopper full, the baler empty and straight, the bunker empty).
| Argument | Description |
|---|---|
World |
For the terrain height. X, Y: base_footprint (rear-axle midpoint on the ground) position, ENU m. |
YawRad |
Heading, rad counter-clockwise from east. |
SpeedMps |
Forward start speed (the wheels spun up; the game's rolling reset). |
bSettled |
True places the chassis on the terrain plane under its wheels at the static ride height; false drops it level from 0.2 m above the rest height (the game's reset). |
FAcresTractor::Step#
Advances one physics step.
| Argument | Description |
|---|---|
Dt |
Step, s (1/120 in the game). |
Controls |
The driver's controls this step. |
World |
The static world. |
Conditions |
Soil-water scenario. |
Farm |
This environment's farm marks (null: no crop, ruts or work marks). |
Info |
Receives what the step did (may be null). |
FAcresTractor::SetGround#
A test stand's ground in place of the world's surface (bActive false: the world's again).
FAcresTractor::Config#
Configuration in use (the tractor's own mass, without implement or grain).
FAcresTractor::Parameters#
Vehicle parameters in use (MassKg and CgForwardM with the implement and grain).
FAcresTractor::BaseFootprint#
base_footprint (the rear-axle midpoint on the ground at the static ride height) in the world, m.
FAcresTractor::Yaw#
Heading (rad counter-clockwise from east), pitch (nose up positive) and roll (left side up positive), rad.
FAcresTractor::Speed#
Forward speed (body x), m/s.
FAcresTractor::KineticEnergy#
Chassis kinetic energy, J.
FAcresTractor::MassKg#
Mass of the chassis body (tractor, carried implement, grain), kg; its principal inertia, kg m2.
FAcresTractor::Origin#
The body origin in the world.
FAcresTractor::ToolX#
The tool zone of a three-point implement in the tractor frame (FLU on the ground under the rear axle), x, m: the lower pins of the last step plus the mean tine point, the disc gang centre, the opener row or the boom (the point whose depth ImplementOut.DepthM is). 0 without a three-point implement.