Skip to content

AcresCoreFarm.h#

Core/Source/AcresCoreFarm.h Generated

What one environment's machines leave on the farm: crushed crop and wheel ruts, the per-episode half of FAcresFarmRuntime (Wheel, Body, Stamp and the rut map) without Unreal. The crop layout, growth and soil come from the shared FAcresWorld; this holds only the changes, sparsely, so thousands of environments stay small and a reset is a clear().

The accounting is the game's: a tyre stamp crushes the 0.095 m2 samples (4 x 4 per 1.52 m x 1 m patch) inside its footprint rectangle when the contact pressure is over 10 kPa and the crop is past 2 % growth; the body sweep crushes every sample under the machine's footprint whose plants stand taller than the underbody clearance; a sample is crushed once. Ruts: 65 % of the sinkage, at most 0.35 m, never shallower, on 25 cm cells.

One environment's thread only (no locking).

FAcresFarmStamp#

struct FAcresFarmStamp

One stamp on the farm (the arguments of FAcresFarmRuntime::Wheel or Body) and what it did.

Name Type Unit Default Description
Kind int 0 0 tyre, 1 body.
Wheel int -1 0..3 for a tyre, -1 for the body.
X, Y, Z, ForwardX, ForwardY, WidthM, LengthM double Footprint centre, ENU m; heading along the ground (the x, y components of the 3D unit heading, as the game passes them); footprint width across and length along travel, m.
PressurePa, SinkageM, TyreDiameterM, ClearanceM double Tyre: mean contact pressure, Pa; sinkage, m (0 on hard ground); tyre diameter, m. Body: underbody clearance, m.
CrushedM2 double 0 Crop area this stamp crushed, m2, and the field of the last patch it crushed (0: none).
CrushedByZoneM2 double Of CrushedM2, the area by task zone (FAcresWorld::ZoneAt; all zone 0 without a zone raster), m2.

FAcresFarmState#

class FAcresFarmState

Per-environment farm changes. See the file comment.

Name Type Unit Default Description
CrushedM2 double 0 Crop area crushed since the reset, m2: in total and per field (index 0 unused).
CrushedByZoneM2 double Crushed area by task zone since the reset, m2 (FAcresWorld::ZoneAt).
Crushed std::unordered_map<uint32_t, uint16_t> Crushed sample masks by patch index (FAcresWorld::Patches); rut depth by 25 cm cell key.

FAcresFarmState::Reset#

Forgets every mark (a fresh farm).

void Reset();

FAcresFarmState::RutAt#

Rut depth of the 25 cm cell under a point, m (0 where no wheel sank).

double RutAt(double X, double Y) const;

FAcresFarmState::Wheel#

Applies a tyre stamp: crushes crop, deepens ruts. Fills Stamp.CrushedM2 and Stamp.Field.

void Wheel(const FAcresWorld& World, FAcresFarmStamp& Stamp);

FAcresFarmState::Body#

Applies the body sweep: crushes crop taller than the clearance. Fills Stamp.CrushedM2 and Stamp.Field.

void Body(const FAcresWorld& World, FAcresFarmStamp& Stamp);