Skip to content

AcresImplementModel.h#

Acres/Source/Acres/AcresImplementModel.h Generated

Implement-soil interaction for the Maxxum's eight attachments (pure C++, no Unreal objects).

Cultivator, chisel plow, disc harrow, seed drill, mounted sprayer, front loader with bale fork, backhoe and the trailed square baler (Acres/Raw/farm-equipment). Every step turns the tractor's speed, PTO speed, the soil under the implement and the operator's controls into what the tractor feels: a wrench (force and moment) at the attachment point, PTO torque and power, hydraulic power, and the implement's mass and centre of mass. The soil forces come from soil mechanics (McKyes wedge, Godwin-Spoor tines, Godwin-Seig-Allott discs, Bekker rolling elements) rather than a draft table; the ASABE D497.7 table (AsabeD497Draft) is kept here as the validation reference.

AAcresVehiclePawn would call StepImplement once per physics step (120 Hz, physics thread) with FImplementInput and apply FImplementOutput::ExternalForceN / ExternalMomentNm at FImplementOutput::AttachPointM on the chassis, whose mass properties follow MassKg / ComM. The model owns the three-point hitch (position and draft control, gauge wheels, spring-trip tines) and every process state (seed, spray liquid, bales, bucket soil).

Frames and units: SI throughout. Tractor frame is FLU (X forward, Y left, Z up) with its origin on the ground below the rear axle, as in maxxum_150/mechanics.json. A three-point implement's own frame is the mechanics.json frame: origin on the ground below the lower hitch pins at zero lift, X forward, Z up; the parallel linkage translates it without rotation. Angles are radians except rig controls, which use the rig's degrees.

No Unreal types appear here, so the model builds and is tested without the engine (Tools/ImplementModel).

Name Type Unit Default Description
MaxImplementTines inline constexpr int 16 Most tines, discs and seed rows a single implement can have (fixed arrays keep the step allocation-free).
MaxImplementDiscs inline constexpr int 32 Most discs (harrow gangs) on one implement.
MaxImplementRows inline constexpr int 24 Most seeding rows on one drill.

ImplementSoilPreset#

Soil preset values with sources (see Documentation/Modelling/implements.md for the table).

Argument Description
Preset Which soil.

Returns: The soil; strength after McKyes (1985) typical tillage-layer values, Bekker constants after Wong (2008) Table 2.3 (Grenville loam, Thai clay 38 %, LETE sand).

FImplementSoil ImplementSoilPreset(EImplementSoilPreset Preset);

ImplementSoilPresetId#

Short id of a soil preset ("dry_loam", "wet_silty_clay_loam", "sand").

const char* ImplementSoilPresetId(EImplementSoilPreset Preset);

ImplementSoilMoistDensity#

Moist (total) density of the soil, kg/m3: dry bulk density plus water, BulkDensityKgM3 + 1000 * WaterContent.

double ImplementSoilMoistDensity(const FImplementSoil& Soil);

SoilWedgeForce#

Soil failure force on a blade or tine face (McKyes 1985; 3-D crescent of Godwin & Spoor 1977).

The failed wedge between the face (rake angle alpha from the horizontal, soil-metal friction delta) and a plane failure surface at angle beta carries weight, surcharge, cohesion, adhesion and the inertia of the soil it accelerates. Force equilibrium of the wedge gives P = (gamma d^2 N_gamma + c d N_c + c_a d N_ca + q d N_q + rho v^2 d N_a) w_eff, H = P sin(alpha + delta) + c_a d w cot(alpha), V = P cos(alpha + delta) - c_a d w, minimised over beta (golden-section search). With bCrescent the effective width is w + d (m - (m - 1) / 3), m = cot(alpha) + cot(beta) (Godwin & Spoor 1977, as used by Godwin & O'Dogherty 2007).

Argument Description
Soil Soil state.
DepthM Working depth d, m (<= 0 gives zero force).
WidthM Tool width w, m.
RakeRad Rake angle alpha of the face from the horizontal, rad (0.05..pi-0.05).
SpeedMps Tool speed normal to the face, m/s (magnitude used).
SurchargePa Surcharge q on the soil surface ahead of the tool, Pa.
bCrescent Add the Godwin-Spoor crescent side wedges (narrow tines); false for a plane-strain blade.

Returns: Forces and factors; all zero when the depth or width is zero.

FSoilWedge SoilWedgeForce(const FImplementSoil& Soil, double DepthM, double WidthM, double RakeRad, double SpeedMps, double SurchargePa, bool bCrescent);

TineSoilForce#

Soil force on a tine (Godwin & Spoor 1977; McKyes & Ali 1977; Godwin & O'Dogherty 2007).

Above the critical depth the soil fails upward and forward in a crescent (SoilWedgeForce with bCrescent). Below it the soil flows round the tine in horizontal planes, resisted at depth z by w (c N_c' + gamma z N_q'), with deep-footing factors N_q' = exp(1.5 pi tan phi) tan^2(pi/4 + phi/2) and N_c' = (N_q' - 1) cot phi (a Prandtl-Reissner log spiral swept round a deep element, the form of Meyerhof's 1951 deep factors). The critical depth is where the crescent's force per unit depth first exceeds the lateral resistance, so each layer fails the cheaper way.

Argument Description
Soil Soil state.
DepthM Tine working depth, m.
WidthM Tine (point) width, m.
RakeRad Rake angle of the point, rad.
SpeedMps Forward speed, m/s (magnitude used; the inertial term rises with its square).

Returns: Tine forces; zero when the tine is out of the soil.

FTineSoilForce TineSoilForce(const FImplementSoil& Soil, double DepthM, double WidthM, double RakeRad, double SpeedMps);

Example

const FTineSoilForce F = TineSoilForce(ImplementSoilPreset(EImplementSoilPreset::DryLoam), 0.2, 0.054,
                                       0.785, 2.2); // F.HorizontalN about 2.8 kN

DiscSoilForce#

Soil forces on a concave disc (Godwin, Seig & Allott 1987 equivalent-blade method).

The concave face is an inclined blade in the vertical plane normal to the disc: its rake is 90 deg - tilt - the local concavity slope, and the McKyes wedge (plane strain) is integrated along the chord with the local depth of the circular segment (4-point Gauss). The resulting face force is normal to the disc in plan, so it splits into draft F sin(beta) and side force F cos(beta). Soil thrown by the face adds a momentum draft rho A_seg sin(beta) v^2 (1 - cos psi) with turning angle psi = beta + 2 eps (Soehne 1956 acceleration force). When the disc angle is below the rim clearance angle the convex back bears on the furrow wall (Terzaghi strip bearing on the intruding area). The sharpened rim cutting new soil along its leading arc carries a line pressure (cone index times the effective rim width): upward over the half-chord and against travel over the depth (Tice & Hendrick 1992).

Argument Description
Soil Soil state.
Disc Disc geometry.
DepthM Depth of the lowest rim point below the surface, m.
SpeedMps Forward speed, m/s (magnitude used).

Returns: Disc forces; zero when out of the soil.

FDiscSoilForce DiscSoilForce(const FImplementSoil& Soil, const FDiscGeometry& Disc, double DepthM, double SpeedMps);

BekkerRigidWheel#

Sinkage and rolling resistance of a rigid wheel of diameter D and width b under load W.

z0 = [3 W / ((3 - n)(kc/b + kphi) b sqrt(D))]^(2 / (2n + 1)) and R_c = b (kc/b + kphi) z0^(n+1) / (n + 1). With bTilled the modulus is scaled by Soil.TilledModulusRatio (rollers and press wheels behind the tools).

Argument Description
Soil Soil state.
DiameterM Wheel diameter D, m.
WidthM Contact width b, m.
LoadN Vertical load W, N (<= 0 gives zeros).
bTilled Wheel runs on freshly tilled soil.

Returns: Sinkage, resistance, contact length and the load.

FRigidWheelSoil BekkerRigidWheel(const FImplementSoil& Soil, double DiameterM, double WidthM, double LoadN, bool bTilled);

BekkerRigidWheelLoadN#

Inverse of BekkerRigidWheel: the load a rigid wheel carries at a given sinkage, N.

W = (3 - n)(kc/b + kphi) b sqrt(D) z^((2n + 1)/2) / 3 (Wong 2008 eq. 2.63 rearranged).

Argument Description
Soil Soil state.
DiameterM Wheel diameter, m.
WidthM Contact width, m.
SinkageM Sinkage z, m (<= 0 gives 0).
bTilled Wheel runs on freshly tilled soil.

Returns: Load, N.

double BekkerRigidWheelLoadN(const FImplementSoil& Soil, double DiameterM, double WidthM, double SinkageM, bool bTilled);

BrixiusRollingResistanceN#

Rolling resistance of a towed pneumatic tyre (ASABE D497.7 section 4; Brixius 1987).

Mobility number Bn = (CI b d / W)(1 + 5 delta/h) / (1 + 3 b/d) and, at zero slip, motion resistance ratio MR = 1/Bn + 0.04. Used for the baler's flotation tyres and the drill's ground-drive tyres.

Argument Description
Soil Soil state (cone index).
DiameterM Unloaded tyre diameter d, m.
WidthM Section width b, m.
LoadN Vertical load W, N.
DeflectionRatio Tyre deflection over section height, delta/h (0.2 typical).

Returns: Rolling resistance, N (>= 0).

double BrixiusRollingResistanceN(const FImplementSoil& Soil, double DiameterM, double WidthM, double LoadN, double DeflectionRatio = .2);

AsabeD497Draft#

ASABE D497.7 (2011, R2015) Table 1 draft with its +- range.

Argument Description
Row Implement row.
Texture 0 fine, 1 medium, 2 coarse (F1/F2/F3).
SpeedKmh Ground speed S, km/h.
Units W: tools, rows or metres of width, as the row requires.
DepthCm Working depth T, cm (ignored for seeding rows).

Returns: Nominal, low and high draft, N.

FAsabeDraft AsabeD497Draft(EAsabeImplement Row, int Texture, double SpeedKmh, double Units, double DepthCm);

ThreePointLinkLoads#

Splits an implement load into top-link, lower-link and lift-ram forces (planar statics of the parallelogram).

Argument Description
Hitch Linkage geometry.
LiftRad Lift angle theta, rad. ForceXN, ForceZN: Resultant of all non-linkage forces on the implement (soil, ground, weight), tractor frame, N.
MomentYNm Their moment about the lower-pin midpoint, N m (positive about +Y).

Returns: Link and ram loads.

FHitchLinkLoads ThreePointLinkLoads(const FHitchGeometry& Hitch, double LiftRad, double ForceXN, double ForceZN, double MomentYNm);

ImplementKindId#

Id used in the data files and mechanics.json ("cultivator", "chisel_plow", ...).

const char* ImplementKindId(EImplementKind Kind);

FindImplementKind#

Kind from its id.

Argument Description
Id Asset id, e.g. "disc_harrow".
OutKind Written when found.

Returns: True when the id is known.

bool FindImplementKind(const char* Id, EImplementKind& OutKind);

MakeImplementParameters#

Parameters of an attachment from the farm-equipment package (mechanics.json values plus soil-tool geometry).

Argument Description
Kind Which attachment.

Returns: Complete parameters; see Documentation/Modelling/implements.md for the sources of each value.

FImplementParameters MakeImplementParameters(EImplementKind Kind);

SetImplementParameter#

Sets one parameter from its data-file key (a dotted path into Content/Simulation/implements/<id>.json).

Scalar keys look like "tines.width_m" or "hitch.relief_pressure_pa"; array elements like "tines.pivot_x_m[3]". Angles in the files are degrees (keys ending _deg) and are converted here.

Argument Description
P Parameters to change.
Key Data-file key.
Value Value in the key's unit.

Returns: False when the key is unknown or the value is out of its physical range (P unchanged).

bool SetImplementParameter(FImplementParameters& P, const char* Key, double Value);

ImplementParameterValues#

Lists every data-file key of an implement with its current value (writes and checks the data files).

Argument Description
P Parameters.
Out Array to fill, or nullptr to count.
MaxCount Size of Out.

Returns: Number of keys (arrays list Count elements), even when larger than MaxCount.

int ImplementParameterValues(const FImplementParameters& P, FImplementParameterValue* Out, int MaxCount);

SetImplementSoilParameter#

Sets one soil field from its data-file key (Content/Simulation/implements/soils.json), e.g. "cohesion_pa" or "friction_angle_deg".

Argument Description
Soil Soil to change.
Key Field key.
Value Value in the key's unit.

Returns: False when the key is unknown or the value out of range.

bool SetImplementSoilParameter(FImplementSoil& Soil, const char* Key, double Value);

ResetImplement#

Resets the state: hitch at zero lift, tanks and hopper full, baler empty with its flywheel at rated speed, loader and backhoe in their rig rest poses.

Argument Description
P Implement parameters.
S State, overwritten.
void ResetImplement(const FImplementParameters& P, FImplementState& S);

StepImplement#

Advances the implement by one step and computes its loads on the tractor.

Order: interlocks (transport, reverse auto-raise, Auto PTO) -> hitch command (position or draft control, rate limits, ram capacity) -> vertical equilibrium with gauges and soil (single-acting lift: the implement can ride up, never be pushed down) -> soil and ground forces at the final height -> tine trip dynamics -> process states (seed, spray, bales, bucket) -> wrench, powers and mass properties.

Argument Description
P Implement parameters.
In Tractor motion, PTO speed, ground offset, soil and controls for this step.
S State, advanced by In.DtS.
Out Loads and diagnostics, overwritten.
void StepImplement(const FImplementParameters& P, const FImplementInput& In, FImplementState& S, FImplementOutput& Out);

Example

FImplementParameters P = MakeImplementParameters(EImplementKind::ChiselPlow);
FImplementState S;
ResetImplement(P, S);
FImplementInput In;
In.SpeedMps = 2.2;
In.Soil = ImplementSoilPreset(EImplementSoilPreset::DryLoam);
In.Controls.HitchLever = 0.14; // points about 0.2 m deep
FImplementOutput Out;
StepImplement(P, In, S, Out); // Out.DraftN about 25 kN

ImplementRigControls#

Rig control values that reproduce the model state on the asset's skeleton.

Argument Description
P Implement parameters.
S Current state.
In Last input (spin controls integrate speed into angles).
Out Array to fill.
MaxCount Size of Out.

Returns: Number of controls written (at most MaxCount). Includes "rear_hitch_lift_deg" for three-point implements.

int ImplementRigControls(const FImplementParameters& P, const FImplementState& S, const FImplementInput& In, FImplementRigControl* Out, int MaxCount);

FImplementSoil#

struct FImplementSoil

Soil state under an implement, SI. The soil library maps its own state onto these fields.

Strength is Mohr-Coulomb at tillage depth (cohesion, internal friction), soil-tool interface strength is adhesion plus soil-metal friction (McKyes 1985, ch. 4), and rolling elements use Bekker's pressure-sinkage law with the Janosi-Hanamoto shear modulus (Wong 2008, ch. 2). Presets: ImplementSoilPreset.

Name Type Unit Default Description
CohesionPa double Pa 12000 Soil cohesion c, Pa.
FrictionAngleRad double rad 0.5585053606381855 Internal friction angle phi, rad.
BulkDensityKgM3 double 1350 Dry bulk density, kg/m3 (the moist density adds WaterContent * 1000).
AdhesionPa double Pa 2000 Soil-metal adhesion c_a, Pa.
SoilMetalFrictionRad double rad 0.3839724354387525 Soil-metal friction angle delta, rad.
ConeIndexPa double Pa 1.5e6 Cone index (ASABE S313 30 deg cone), Pa; used for disc-rim penetration.
WaterContent double .15 Volumetric water content theta, m3/m3.
Texture int 1 ASABE D497.7 texture class: 0 fine (clays, silty clay loams), 1 medium (loams), 2 coarse (sands, sandy loams).
BekkerKc double 60 Cohesive sinkage modulus, N/m^(n+1).
BekkerKphi double 5.88e6 Frictional sinkage modulus, N/m^(n+2).
BekkerN double N 1.01 Sinkage exponent. Values for the firm field surface (ground wheels, gauge wheels, baler tyres).
TilledModulusRatio double .3 Loosening by tillage, 0..1: the Bekker moduli of freshly tilled soil relative to the firm values (rollers, press wheels), and the cohesion, adhesion and cone index the drill openers meet in the seedbed.
JanosiKM double .025 Janosi-Hanamoto shear deformation modulus K, m.

EImplementSoilPreset#

enum class EImplementSoilPreset : int

Named soil conditions used by the validation, the tests and the demo.

Value Description
DryLoam Medium texture, theta 0.15: firm, frictional.
WetSiltyClayLoam Fine texture, theta 0.34: plastic, sticky (the ACRE silty clay loams when wet).
Sand Coarse texture, theta 0.08: loamy sand, nearly cohesionless.

FSoilWedge#

struct FSoilWedge

Two-dimensional soil wedge in front of an inclined blade (McKyes 1985 universal earthmoving equation).

Name Type Unit Default Description
HorizontalN double N 0 Horizontal force on the tool, N (positive resists motion).
VerticalN double N 0 Vertical force on the tool, N (positive pulls the tool down).
FailureAngleRad double rad 0 Failure-plane angle beta from the horizontal that minimises the force, rad.
RuptureDistanceM double m 0 Surface extent of the failed soil ahead of the tool, m.
EffectiveWidthM double m 0 Width the force acts over, m (tool width plus the Godwin-Spoor crescent sides when enabled).
ForceDepthRatio double .5 Depth of the resultant below the surface as a fraction of the working depth.
NGamma, NC, NCa, NQ, NA double Dimensionless McKyes factors at the minimising beta: N_gamma, N_c, N_ca, N_q, N_a.

FTineSoilForce#

struct FTineSoilForce

Force on one narrow tine, with crescent failure above the critical depth and lateral failure below it.

Name Type Unit Default Description
HorizontalN double N 0 Draft of the tine, N (>= 0).
VerticalN double N 0 Vertical force, N (positive pulls the tine down).
CriticalDepthM double m 0 Depth below which the soil fails sideways instead of upward, m (= DepthM when no lateral failure).
ForceHeightM double m 0 Height of the resultant above the tine tip, m.
CrescentN double N 0 Horizontal force from the crescent (upward) failure, N.
LateralN double N 0 From the lateral failure, N.
FailureAngleRad double rad 0 Crescent failure angle, rad.
RuptureDistanceM double m 0 Crescent surface extent ahead of the tine, m.

FDiscGeometry#

struct FDiscGeometry

Geometry of one concave (spherical) disc, SI.

Name Type Unit Default Description
DiameterM double m .56 Disc diameter D, m.
DishDepthM double m .035 Concavity (dish) depth, m (0 = flat).
DiscAngleRad double rad 0.2792526803190927 Angle between the disc face and the direction of travel in plan (gang angle), rad.
TiltRad double rad 0 Tilt of the face from vertical, rad.
RimWidthM double m .002 RimWidthM: effective bearing width of the sharpened rim, m (the rim cuts new soil with a line pressure of cone index times RimWidthM along its leading arc).

FDiscSoilForce#

struct FDiscSoilForce

Forces on one disc from its soil (the tool's own frame: draft along travel, side force across it).

Name Type Unit Default Description
DraftN double N 0 Force against travel, N.
SideN double N 0 Side force pushing the disc toward its convex (back) side, N.
VerticalN double N 0 Vertical force, N (positive pulls the disc down; discs are normally pushed up, so negative).
FaceNormalN double N 0 Equivalent-blade force normal to the face in plan, N.
MomentumN double N 0 Draft from accelerating the soil, N.
RimBearingN double N 0 Upward rim penetration resistance (included in VerticalN; the rim's draft share is in DraftN), N.
BackBearingN double N 0 Convex-side bearing force when the disc angle is below the rim clearance angle, N.
ChordM double m 0 Chord of the disc at the soil surface, m.
SegmentAreaM2 double 0 Area of the disc below the surface, m2.
SoilFlowM3s double 0 Soil volume the disc moves per second, m3/s.

FRigidWheelSoil#

struct FRigidWheelSoil

Rigid wheel or roller on soil (Bekker 1969; Wong 2008 eq. 2.60-2.66).

Name Type Unit Default Description
SinkageM double m 0 Static sinkage z0, m.
ResistanceN double N 0 Compaction (motion) resistance, N.
ContactLengthM double m 0 Chord of the contact, m.
LoadN double N 0 Vertical load carried, N.

EAsabeImplement#

enum class EAsabeImplement : int

Implement rows of ASABE D497.7 Table 1 used for validation.

Value Description
ChiselPlow Chisel plow, 5 cm straight points: per tool per cm depth, +-50 %.
FieldCultivatorPrimary Field cultivator, primary tillage: per tool per cm, +-30 %.
FieldCultivatorSecondary Field cultivator, secondary tillage: per tool per cm, +-25 %.
TandemDiskPrimary Tandem disk harrow, primary tillage: per m width per cm, +-50 %.
TandemDiskSecondary Tandem disk harrow, secondary tillage: per m width per cm, +-30 %.
GrainDrillMedium Grain drill with press wheels, 2.4-3.7 m: per row, +-25 %.
Count

FAsabeDraft#

struct FAsabeDraft

ASABE draft with the standard's stated variability.

Name Type Unit Default Description
NominalN double N 0 F_i (A + B S + C S^2) W T, N. LowN,
LowN double N 0 See above.
HighN double N 0 Nominal times (1 -+ the table's range), N.
RangeRatio double 0 RangeRatio: the table's +- range as a fraction. Label: row name.

FHitchGeometry#

struct FHitchGeometry

Geometry and hydraulics of the Maxxum's Category II three-point hitch (maxxum_150/mechanics.json), tractor frame.

Lower links and top link are equal and parallel (a parallelogram), so the implement translates on an arc without pitching; the lift angle theta raises the lower-pin midpoint to (LowerPivotXM - L cos theta, LowerPivotZM + L sin theta).

Name Type Unit Default Description
LowerPivotXM, LowerPivotZM, LowerLinkM, TopPivotXM, TopPivotZM, MastXM, MastZM double LowerPivotXM, LowerPivotZM: lower-link tractor pivot, m. LowerLinkM: link length L, m. TopPivotXM, TopPivotZM: top-link tractor pivot, m. MastXM, MastZM: top pin relative to the lower-pin midpoint, m.
LiftMinRad, LiftMaxRad double LiftMinRad, LiftMaxRad: lift angle range, rad (-5 and 32 deg).
RamTractorXM, RamTractorZM, RamLinkXM, RamLinkZM, RamBoreM, RamRodM double Lift ram: tractor anchor (RamTractorXM, RamTractorZM) and link anchor at zero lift (RamLinkXM, RamLinkZM), m; bore and rod diameters, m; RamCount rams. The rams shorten to lift (annulus side pressurised).
ReliefPressurePa double Pa 17e6 Hitch valve relief pressure, Pa.
FlowM3s double 40.0 / 60000 Hitch valve flow when raising, m3/s.
DropRateRadS double s 0.13962634015954636 Rate-of-drop limit when lowering, rad/s (8 deg/s: set so a draft-controlled tool does not plunge past its set-point on the way in).
PumpEfficiency double .85 Hydraulic pump overall efficiency, 0..1.

FHitchLinkLoads#

struct FHitchLinkLoads

Loads in the three-point linkage for a given implement load (quasi-static).

Name Type Unit Default Description
TopLinkN double N 0 Top-link force, N (positive tension). LowerLinkXN,
LowerLinkXN double 0 See above.
LowerLinkZN double 0 Total force the lower links put on the implement, N (X positive forward: the sensed draft).
RamForceN double N 0 Total lift ram force, N (positive lifts).
RamPressurePa double Pa 0 Ram pressure, Pa (0 when the rams would have to pull the implement down).
RamLengthM double m 0 Ram length, m.
RamLengthRateMPerRad double rad 0 D(length)/d(theta), m/rad (negative: lifting shortens).

EImplementKind#

enum class EImplementKind : int

Which attachment.

Value Description
Cultivator Nine spring-trip tines, 2.7 m.
ChiselPlow Nine spring-trip chisel shanks, 2.7 m.
DiscHarrow Compact disc harrow, 3 m, two rows of 12 concave discs, packer roller.
SeedDrill 15-row double-disc drill, press wheels, ground-wheel metering.
MountedSprayer 800 L tank, 12 m boom, 24 nozzles, PTO diaphragm pump.
LoaderBaleFork Front loader with bale fork.
BackhoeAttachment Subframe backhoe with outriggers.
SquareBaler Trailed large square baler, 1000 rpm PTO.
Count

EHitchMode#

enum class EHitchMode : int

Three-point hitch control modes (Case IH EHC: position, draft, or float with the lift valve open).

Value Description
Position Hold the lever height.
Draft Raise/lower to hold the draft set-point, never deeper than the lever (depth limit).
Float Lift rams released; the implement rides on its gauge wheels or roller.

FHitchControl#

struct FHitchControl

Draft-control settings (Case IH EHC style).

Name Type Unit Default Description
DraftFilterS double s .1 Time constant of the draft-sensing filter, s.
DraftGainRad double rad 0.17453292519943295 Proportional gain, rad of lift per unit of relative draft error.
DraftIntegralRadS double s 0.10471975511965977 Integral gain, rad/s per unit error.
DeadbandRatio double .02 Relative draft error ignored, 0..1. Tuned on the tractor in the game (Documentation/Modelling/implements.md, Three-Point Hitch): a tine's draft rises with about the square of its depth and the tractor squats about 3 mm per kN of draft at the tools, so the loop needs a fast, mostly proportional correction (0.1 s, 10 deg) with a gentle integral.
bAutoRaiseInReverse bool true Raise the hitch while reversing with the tool down.
bAutoPto bool true Disengage the PTO above AutoPtoLiftRad and in transport (Case IH Auto PTO).
AutoPtoLiftRad double rad 0.3490658503988659 Lift angle above which Auto PTO disengages, rad.

FTineSet#

struct FTineSet

Spring-trip tines (cultivator, chisel plow).

Name Type Unit Default Description
Count int 0 Number of tines.
PivotXM, PivotYM double Trip pivot of each tine, implement frame (X, Y), m; all pivots at PivotZM.
PivotZM double .7 Pivot height, m. TipDxM,
TipDxM double m .12 See above.
TipDzM double m -.905 Point tip relative to the pivot at zero trip, m.
WidthM double m .054 Point width, m.
RakeRad double rad 0.7853981633974483 Point rake angle, rad (grows by the trip angle as the tine swings back).
MassKg double kg 24 Tine mass, kg.
InertiaKgM2 double 7 Inertia about the trip pivot, kg m2.
TripPreloadNm double N·m 1800 Spring moment holding the tine on its stop, N m.
TripStiffnessNmRad double rad 2800 Spring rate, N m/rad (mechanics.json trip_stiffness_nm_rad).
TripDampingNmSRad double 120 Damping, N m s/rad.
TripMaxRad double rad 0.3141592653589793 Travel, rad (18 deg).

FDiscSet#

struct FDiscSet

Concave discs in gangs (disc harrow).

Name Type Unit Default Description
Count int 0 Number of discs.
XM, YM double Disc centre in the implement frame (X, Y), m.
Throw int Throw direction of each disc: +1 moves soil to +Y (the disc is pushed to -Y), -1 the other way.
CenterZM double .23 Disc centre height at zero lift, m.
MassKg double kg 12 Disc and hub mass, kg.
Geometry FDiscGeometry Disc geometry.

FRollerSet#

struct FRollerSet

Rolling support: packer roller rings or drill ground wheels (Bekker rigid-wheel sinkage; Bekker or, for pneumatic tyres, ASABE D497.7 rolling resistance).

Name Type Unit Default Description
Count int 0 Number of rings or wheels sharing the load.
DiameterM double m .49 See above.
WidthM double m .05 Each ring or wheel, m.
XM double -1.92 Axle position, implement frame, m.
CarrierPivotXM, CarrierPivotZM, AxleDxM, AxleDzM double Adjustable carrier (harrow roller): pivot (CarrierPivotXM, CarrierPivotZM) and axle offset from it at zero setting (AxleDxM, AxleDzM), m. A fixed axle has a zero offset and the pivot at the axle.
MinSettingRad, MaxSettingRad double MinSettingRad, MaxSettingRad: carrier setting range, rad (roller_depth_deg).
bTilled bool true The element runs on freshly tilled soil (behind the tools).
bPneumatic bool false A pneumatic tyre, whose rolling resistance follows ASABE D497.7 (Brixius) instead of the rigid-wheel Bekker law (sinkage stays Bekker).
BearingResistanceRatio double .01 Rolling resistance of the bearings as a fraction of load.

FDrillParameters#

struct FDrillParameters

Seed drill rows, metering and hopper.

Name Type Unit Default Description
Rows int 0 Rows: number of rows. RowSpacingM: row spacing, m. RowY0M: Y of the first row, m.
ArmPivotXM, ArmPivotZM, ArmMinRad, ArmMaxRad double Opener arm pivot (X, Z), m, and its angle range (opener_NN_deg -12..15), rad; a positive angle raises the row.
Opener FDiscGeometry Double-disc opener: disc geometry (two discs per row), centre X and height at zero lift and zero arm angle, m.
PressDiameterM, PressWidthM, PressXM, PressCenterZM double Press wheel on the same arm: diameter and width, m; centre X and height at zero arm angle, m.
RowMassKg, RowComXM, RowComZM, DownforceN double RowMassKg: opener arm, discs and press wheel, kg, with its centre (RowComXM, RowComZM), m. DownforceN: spring force per row, expressed as a vertical force at the opener centre, N.
HopperM3, SeedDensityKgM3, HopperXM, HopperBottomZM, HopperBottomWidthM, HopperTopWidthM, HopperHeightM, HopperLengthM double Hopper: capacity, m3; seed bulk density, kg/m3; centroid X, m; bottom height, m; bottom width and top width of the V section, m; section height, m; length, m.
SeedRateKgM2 double .015 Calibrated seeding rate, kg/m2 (150 kg/ha = 0.015).
MeterTorqueNm double N·m 40 Fluted-meter drive torque at the ground wheel, N m. GroundWheelDriveCount: driving wheels.

FSprayerParameters#

struct FSprayerParameters

Mounted boom sprayer (tank, pump, nozzles, folding boom, slosh).

Name Type Unit Default Description
TankM3, LiquidDensityKgM3, TankXM, TankBottomZM, TankLengthM, TankWidthM double Tank: capacity, m3; liquid density, kg/m3; footprint centre X, m; bottom height, m; inside length (X) and width (Y), m.
NozzleCount int 24 Nozzles: count, spacing, m; rated flow, m3/s, at rated pressure, Pa (ISO 10625 size 03: 1.2 L/min at 3 bar); usable pressure range, Pa.
ApplicationM3M2 double 1.5e-5 Target rate, m3/m2 (150 L/ha = 1.5e-5).
PumpFlowM3s double 99.0 / 60000 Pump flow at PumpRatedRadS, m3/s (99 L/min at 540 rpm).
PumpRatedRadS double s 56.548667764616276 See above.
PumpEfficiency double .6 Pump efficiency.
AgitationRatio double .1 Return flow for agitation as a fraction of pump flow.
BoomLiftMassKg, InnerMassKg, OuterMassKg, TipMassKg, BoomXM, BoomZM double Boom: lift carriage mass, kg; section masses (inner, outer, breakaway), kg; boom X and height, m; hinge Y of inner, outer and breakaway sections, m; section centroid Y, m (mechanics.json rigid bodies).
InnerFoldMaxRad, OuterFoldMaxRad, FoldRateRadS double Fold limits (fold_inner_deg 100, fold_outer_deg 175), rad; fold rate from the fold cylinders, rad/s.
SloshDampingRatio double .05 SloshDampingRatio: first-mode slosh damping (baffled tank), dimensionless.

FLoaderParameters#

struct FLoaderParameters

Front loader and bale fork (tractor frame; mechanics.json loader_bale_fork).

Name Type Unit Default Description
BoomMassKg, BoomComXM, BoomComZM double Masses (kg) and rest centres of mass (X, Z), m: boom, fork carrier (the subframe is FImplementParameters:: DryMassKg and DryCom*).
BoomPivotXM, BoomPivotZM, CarrierPivotXM, CarrierPivotZM, LoadXM, LoadZM double Joint pivots (X, Z), m: boom on the subframe, carrier on the boom; payload centre on the spears at rest.
LiftAXM, LiftAZM, LiftBXM, LiftBZM, LiftBoreM, LiftRodM double Lift rams (two): anchor on the subframe and on the boom at rest, m; bore, rod, m.
CurlAXM, CurlAZM, CurlBXM, CurlBZM, CurlBoreM, CurlRodM double Curl rams (two): anchor on the boom and on the carrier at rest, m; bore, rod, m.
LiftMinRad, LiftMaxRad, CurlMinRad, CurlMaxRad double Joint ranges (loader_lift_deg -52..16, fork_curl_deg -55..50), rad. Positive angles turn forward points down.
ReliefPressurePa double Pa 17e6 Loader valve relief, Pa.
FlowM3s double 85.9288 / 60000 Flow allocated to the loader valve, m3/s (the package's 85.9 L/min tractor allocation).
RatedPayloadKg double kg 1200 Scenario payload limit, kg.
MountXM double .65 Subframe attachment X, m.

FBackhoeParameters#

struct FBackhoeParameters

Backhoe on its rigid subframe (backhoe frame = tractor frame shifted by MountXM; mechanics.json).

Name Type Unit Default Description
MountXM double -.78 MountXM: backhoe frame origin in the tractor frame, m.
SwingMassKg, SwingComXM, SwingComZM double Masses, kg, and rest centres of mass (X, Z), m: swing post, boom, dipper, bucket; stabilizer legs (X, |Y|, Z). The subframe is FImplementParameters::DryMassKg and DryCom* (backhoe frame).
SwingPivotXM, BoomPivotXM, BoomPivotZM, DipperPivotXM, DipperPivotZM, BucketPivotXM, BucketPivotZM, TipXM, TipZM double Pivots (X, Z), m: swing post (vertical axis), boom, dipper, bucket; bucket tooth tip at rest.
BoomRamAXM, BoomRamAZM, BoomRamBXM, BoomRamBZM, BoomRamBoreM, BoomRamRodM double Rams (anchor A on the parent body, B on the child at rest, m; bore, rod, m): boom, dipper, bucket.
LegPivotXM, LegPivotYM, LegPivotZM, FootYM, FootZM, FootStiffnessNm, FootDampingNsm, LegRateRadS, LegMaxRad double Stabilizers: leg pivot (X, |Y|, Z), m; foot bottom at rest (|Y|, Z), m; foot stiffness, N/m, and damping, N s/m (coupled_dynamics.py); deploy rate, rad/s; travel, rad (stabilizers_down_deg 42).
BucketWidthM, BucketCapacityM3 double Bucket: cutting width, m; heaped capacity, m3; tooth rake relative to the dipper-bucket line, rad.
SwingMaxRad, BoomMinRad, BoomMaxRad, DipperMaxRad, BucketMinRad, BucketMaxRad double Joint ranges, rad: swing +-85, boom -90..15, dipper +-45, bucket curl -65..80 deg.
ReliefPressurePa double Pa 16995782 Backhoe valve relief, Pa (mechanics.json 17.0 MPa).
FlowM3s double 35.0 / 60000 Backhoe flow, m3/s (35 L/min).
SwingTorqueNm double N·m 9000 Swing drive torque limit, N m.

FBalerParameters#

struct FBalerParameters

Trailed large square baler (mechanics.json square_baler; New Holland BigBaler 890 class).

Name Type Unit Default Description
DrawbarZM double .48 Eye height, m.
AxleXM double -3.885 Tandem axle centre, m.
HitchXM double -.98 Tractor drawbar X, tractor frame, m.
WheelCount int 4 Tyres: count, diameter, width, m (sinkage from the rigid Bekker wheel, an upper bound; rolling resistance from ASABE D497.7).
PtoRatedRadS, PtoMinRadS, CrankRatio double PTO: rated and minimum working speeds, rad/s (1000 and 900 rpm). CrankRatio: crank / PTO speed (0.048).
CrankRadiusM, RodLengthM, PlungerMassKg, PlungerFrictionRatio double Slider-crank: crank radius, rod length, m (0.71 m stroke). Plunger mass, kg; plunger slide friction coefficient.
FlywheelInertiaKgM2 double 35 Flywheel plus input shaft inertia, kg m2 (240 kg ring, 0.45/0.30 m radii). ShaftStiffnessNmRad,
ShaftStiffnessNmRad double rad 20000 See above.
ShaftDampingNmSRad double 300 PTO driveline torsion, N m/rad, N m s/rad.
SlipClutchNm double N·m 6000 Flywheel slip clutch, N m (an overrunning clutch also stops the flywheel driving the tractor).
GearEfficiency double .95 Main gearbox efficiency.
ChamberWidthM, ChamberHeightM, BaleLengthM, ChamberStartXM, ChuteEndXM, BaleZM double Chamber: width, height, m; bale length, m; plunger face X at the end of its stroke, m; chute end X, m.
LooseDensityKgM3, BaleDensityKgM3, ExtrusionPressurePa, CompressionExponent double Hay: loose density in the pre-chamber, bale density at the extrusion pressure, kg/m3; extrusion pressure (the density-control friction), Pa; compression exponent (Faborode & O'Callaghan 1986 power form).
FeedIdlePowerW, FeedEnergyJKg, PickupWidthM, PickupCapacityKgS double Pickup and packer: idle power at rated PTO speed, W; energy per kg fed, J/kg; pickup width, m; capacity, kg/s.
SubstepS double s .0005 Internal step used for the plunger/flywheel dynamics, s.

FTractorReference#

struct FTractorReference

Tractor data some implements need for support loads (maxxum_150/mechanics.json tractor_preset).

Name Type Unit Default Description
MassKg, WheelbaseM, TrackM, CgXM, CgZM, FrontTyreStiffnessNm, RearTyreStiffnessNm, RatedPtoKw double MassKg: tractor mass, kg. WheelbaseM, TrackM: m. CgXM, CgZM: centre of mass ahead of the rear axle and above ground, m. FrontTyreStiffnessNm, RearTyreStiffnessNm: per tyre, N/m. RatedPtoKw: PTO rating, kW.

FImplementParameters#

struct FImplementParameters

Everything that defines one implement. Built by MakeImplementParameters from the asset data; overridable per key with SetImplementParameter (Content/Simulation/implements/<id>.json).

Name Type Unit Default Description
Kind EImplementKind EImplementKind::Cultivator Kind of attachment.
bThreePoint bool true True for three-point implements (hitch model, depth control); false for loader, backhoe and baler.
DryMassKg, DryComXM, DryComYM, DryComZM, DryInertiaXKgM2, DryInertiaYKgM2, DryInertiaZKgM2 double DryMassKg: implement mass without payload, kg (mechanics.json). DryComXM, DryComYM, DryComZM: its centre of mass, implement frame, m. DryInertiaXKgM2, DryInertiaYKgM2, DryInertiaZKgM2: principal inertia about it, kg m2.
DesignDepthM double m .12 Working depth used for the demo and the ASABE comparison, m (mechanics.json working_depth_m).
WorkingWidthM double m 2.7 Working width, m.
DesignSpeedMps double m/s 2.222 Typical working speed, m/s.
Hitch FHitchGeometry Three-point hitch geometry and control.
Tines FTineSet Tool sets (unused ones have Count 0).

FImplementParameterValue#

struct FImplementParameterValue

One data-file key and its current value, in the file's units.

Name Type Unit Default Description
Key const char* "" Key without the index, e.g. "tines.pivot_x_m". Index: array element, or -1 for a scalar. Value: in file units.

FImplementControls#

struct FImplementControls

Operator controls for one step. Fields that do not apply to the implement are ignored.

Name Type Unit Default Description
HitchMode EHitchMode EHitchMode::Position Hitch: control mode, lever (0 = lowest .. 1 = highest; in draft mode the depth limit), draft set-point, N, and the EHC position/draft mix (0 = pure position, 1 = pure draft).
bRaise bool false Headland/transport raise (hitch to the top, tools out).
bPtoEngaged bool false PTO switch.
bTransport bool false Transport state (hitch up, PTO off, sprayer boom folded, backhoe stabilizers up).
RollerSettingRad double rad 0.03490658503988659 Disc harrow roller setting (roller_depth_deg), rad: higher lifts the roller and deepens the discs.
bMetering bool true Seed drill: meter clutch engaged.
bSpraying bool false Sprayer: section valves open; boom fold command (0 unfolded .. 1 folded); boom height lift, m.
LoaderLift, LoaderCurl, LoaderPayloadKg double Loader: lift and curl valve levers, -1..1 (positive raises the boom / curls the fork back). Payload on the spears, kg.
BackhoeSwing, BackhoeBoom, BackhoeDipper, BackhoeBucket double Backhoe: swing, boom, dipper and bucket levers, -1..1 (positive = increasing rig angle); stabilizers down.
bPickupDown bool false Baler: pickup lowered; windrow linear density, kg/m.
TineObstacleN double N Extra horizontal force on each tine point this step (a stone), N.

FImplementInput#

struct FImplementInput

Everything the vehicle side provides each step.

Name Type Unit Default Description
DtS double s 1.0 / 120 Step, s.
SpeedMps double m/s 0 Tractor speed along its heading, m/s (negative reversing). AccelXMps2,
AccelXMps2 double 0 See above.
AccelYMps2 double 0 Chassis acceleration, m/s2 (sprayer slosh).
PtoRadS double s 0 Rear PTO shaft speed from the engine, rad/s (0 when the PTO clutch is out).
EngineSpeedRatio double 1 Engine speed / rated, scales the fixed-displacement hydraulic flow.
GroundOffsetM double m 0 GroundOffsetM: ground height under the tools relative to the flat plane through the tractor's wheel contacts, m (positive = higher ground = deeper tools); the pawn folds pitch, terrain and tyre sinkage into it.
Soil FImplementSoil Soil under the implement.
Controls FImplementControls Operator controls.

FImplementState#

struct FImplementState

Integrated state of an implement. Owned by the caller, advanced by StepImplement.

Name Type Unit Default Description
TimeS double s 0 Time since reset, s.
LiftRad double rad 0 Lift-arm angle (the ram position), rad.
LinkLiftRad double rad 0 Actual lower-link angle (higher than LiftRad when the implement rides on its gauges), rad.
DraftFilteredN, DraftIntegralRad double Draft control: filtered sensed draft, N; integrator, rad.
TripRad, TripRateRadS double Tine trip angle and rate, rad and rad/s.
RamPressurePa double Pa 0 Hitch: ram pressure of the last step, Pa; the implement rode on its gauges or soil last step.
RowArmRad double rad Seed drill: opener arm angle of each row, rad (positive raised); seed in the hopper, kg; seed sown, kg; area sown, m2; ground-wheel slip.
DiscSpinRad, WheelSpinRad, PressSpinRad, MeterSpinRad, ShaftSpinRad, PickupSpinRad double Accumulated spin angles for the rig, rad: discs, roller or ground wheels, press wheels, seed meter, PTO-driven shafts, pickup.
TankM3, SprayedM3, SprayedAreaM2, InnerFoldRad, OuterFoldRad, SloshXM, SloshRateXMps, SloshYM, SloshRateYMps double Sprayer: liquid in the tank, m3; sprayed, m3; sprayed area, m2; inner and outer fold angles, rad; slosh displacement and rate (X, Y), m and m/s.
LoaderLiftRad, LoaderCurlRad double Loader: lift and curl angles, rad.
SwingRad, BoomRad, DipperRad, BucketRad, LegRad, BucketSoilKg, DugKg, DumpedKg, TipXM, TipYM, TipZM, SupportHeaveM, SupportPitch, SupportRoll double Backhoe: swing, boom, dipper, bucket and stabilizer angles, rad; soil in the bucket, kg; dug and dumped, kg; bucket tooth tip position (tractor frame, X, Z), m; chassis support plane of the last solve (heave, m; pitch and roll slopes).
PtoAngleRad, FlywheelAngleRad, FlywheelRadS, PreChamberKg, FlakeKg, FormingKg, FormingLengthM, ChuteKg, ChuteXM, IntakeKg, DroppedKg double Baler: PTO-side shaft angle and flywheel angle, rad; flywheel speed, rad/s; pre-chamber crop, kg; flake under compression this stroke, kg; forming-bale mass, kg, and length, m; bale on the chute, kg, and its X, m; crop taken in, kg; crop in dropped bales, kg; bales dropped; plunger strokes.
DraftEnergyJ, PtoEnergyJ, HydraulicEnergyJ double Energies since reset, J: draft (soil and rolling), PTO, hydraulic (pump shaft).

FImplementOutput#

struct FImplementOutput

What the tractor feels and what the implement is doing after one step.

Name Type Unit Default Description
AttachPointM FVector3d m Point the wrench is given about, tractor frame, m (lower-pin midpoint, loader or backhoe mount, drawbar). ExternalForceN,
ExternalForceN FVector3d N See above.
ExternalMomentNm FVector3d N·m Resultant of all soil, ground and process forces on the implement (not its weight), moved to AttachPointM, tractor frame. Apply these to the chassis when the implement mass is part of the chassis body (mounted, loader, backhoe).
TractorForceN, TractorMomentNm FVector3d TractorForceN, TractorMomentNm: quasi-static load the implement puts on the tractor at AttachPointM, including its weight (for a trailed baler: the drawbar force after the baler axle takes its share). Apply these instead when the implement is not a rigid part of the chassis body.
DraftN double N 0 Soil and rolling resistance against travel, N.
VerticalN double N 0 Net vertical soil and ground force on the implement, N (positive down).
LateralN double N 0 Net side force, N (positive to +Y).
PitchMomentNm double N·m 0 ExternalMomentNm.Y.
PtoTorqueNm double N·m 0 Torque at the tractor PTO shaft, N m.
PtoPowerW double W 0 PTO power, W.
HydraulicPowerW double W 0 Pump shaft power for the implement's hydraulics, W (fluid power / pump efficiency).
HydraulicFlowM3s double 0 Flow drawn, m3/s.
HydraulicPressurePa double Pa 0 Highest working pressure, Pa.
DraftPowerW double W 0 DraftN times ground speed, W.
MassKg double kg 0 MassKg: implement mass including payload, kg. ComM: its centre of mass, tractor frame, m. InertiaKgM2: principal inertia about ComM (X, Y, Z), kg m2 (approximate).
PayloadKg double kg 0 PayloadKg: seed, liquid, bale, bucket soil or baled crop carried, kg.
LiftRad, FrameHeightM, SensedDraftN, TopLinkN, RamPressurePa, DepthM, GaugeLoadN, GaugeSinkageM double Hitch: lift angle (lower links), rad; frame height above the working plane, m; sensed draft, N; top-link force, N; ram pressure, Pa; working depth (mean tool depth), m; gauge/roller/wheel load, N; gauge sinkage, m.
TripRad double rad Tines: trip angles, rad; critical depth, m. Discs: side force of the front and rear rows, N.
OpenerDepthM, SeedFlowKgS, SownRateKgM2, SprayFlowM3s, BoomPressurePa, AppliedRateM3M2 double Drill: opener depth (mean), m; seed flow, kg/s; sown rate, kg/m2. Sprayer: flow, m3/s; boom pressure, Pa; applied rate, m3/m2.
FrontAxleN, RearAxleN, FootLoadN, DigForceN double Loader and backhoe: front and rear axle loads (static, with the tractor reference), N; stabilizer foot loads (right, left), N; bucket digging force, N.
PlungerForceN, PlungerPositionM, FlywheelRadS, BalerAxleN, IntakeKgS double Baler: peak plunger force over the step, N; plunger travel from top dead centre, m; flywheel speed, rad/s; baler axle load, N; intake, kg/s.
bInSoil, bTripped, bStarved, bHydraulicStall, bPtoUnderspeed, bFloating bool Flags: tools in the soil; any tine tripped; seed or liquid ran out; hydraulic stall (relief open); PTO below working speed while needed; implement lifted off its gauges by the soil.
bPtoActive bool false PTO driving the implement this step (switch on, not auto-disengaged, shaft turning).

FImplementRigControl#

struct FImplementRigControl

One rig control value for the skeletal mesh (mechanics.json "controls").

Name Type Unit Default Description
Name const char* "" Control name, e.g. "trip_03_deg". Value in the control's unit (degrees or metres; spins in degrees).