AcresCoreWorld.h#
Core/Source/AcresCoreWorld.h Generated
The static world of ACRES Core, shared read-only by every environment: the ACRE terrain, the surface map, the tyre surface templates and soil parameters of tractor.json, the soil texture and soil-water unit grids, the field raster, the crop patches and the named places. It replaces what the game does inside Unreal around the engine-free models: AAcresVehiclePawn::SampleSurface and SoilLibraryClassAt, FAcresFarmRuntime::Initialize (units, cells, patches) and Sample (soil water at a wheel), FAcresFieldSetup (fields, surface polygons, crop season).
Load it once per process; afterwards any number of threads may query it (nothing in it changes). What changes per environment (ruts, crushed crop) is in FAcresFarmState (AcresCoreFarm.h); the soil-water scenario is an FAcresConditions value each environment holds.
Frames: Core ENU metres about the tile centre (x east, y north). The game's grids are indexed in Unreal's world (X east, Y south), so lookups mirror y where they reach them (Unreal Y = -y).
SurfaceTemplateName#
Name of a surface template ("asphalt", ..., "dirt_track").
ESurfaceTemplate#
Surface template indices, the game's SampleSurface order (FVehicleInput::SurfaceIndex; 6 is "mapped").
| Value | Description |
|---|---|
SurfaceAsphaltTemplate |
|
SurfaceConcreteTemplate |
|
SurfaceGravelTemplate |
|
SurfaceDrySoilTemplate |
|
SurfaceWetSoilTemplate |
|
SurfaceMudTemplate |
|
SurfaceMappedTemplate |
|
SurfaceSodLaneTemplate |
|
SurfaceSodTemplate |
|
SurfaceDirtTrackTemplate |
|
SurfaceTemplateCount |
ECropKind#
Crop kinds (AcresCrops.h order).
| Value | Description |
|---|---|
CropCorn |
|
CropSoybean |
|
CropPotato |
|
CropKindCount |
FAcresCropPatch#
One 1.52 m x 1 m crop patch (FAcresFarmRuntime's Patch): origin, ENU m; full-grown plant height, m; field 1-59; crop kind.
FAcresConditions#
Soil-water scenario of one environment (version 1 of the scouting task: constant during an episode).
The game starts every soil cell of the 4 m water grid at a fraction of the way from its unit's wilting point to its field capacity (farm.json initial_fraction..., 0.5; the menu's per-field wetness, 0..1.3 where above 1 moves toward saturation) and reports the surface wetness relative to that start (0 at the start). Without rain or a water-grid state, that is what the wheels see; Core reproduces it per cell.
| Name | Type | Unit | Default | Description |
|---|---|---|---|---|
GlobalFraction |
double |
Antecedent fraction for every soil cell (NaN: farm.json's value). | ||
FieldFraction |
double |
Per field 1..59: its own fraction (NaN: GlobalFraction). Index 0 unused. | ||
SurfaceFilm |
double |
0 |
Rain film on the surface, 0..1 (the weather model's interception store; wets soil and nothing else). |
FAcresWorldOptions#
Options of FAcresWorld::Load.
| Name | Type | Unit | Default | Description |
|---|---|---|---|---|
ContentDir |
std::string |
Acres/Content/Simulation (the game's data folder). | ||
bFlat |
bool |
false |
A flat world instead of the ACRE tile: a plane at FlatZ with one surface everywhere (the log replays of the Polaris test stand, tests). FlatSurface is a tractor.json surface name, or "bench_asphalt" / "bench_grass" / "bench_gravel" for the Polaris test stand's grounds (Tools/PolarisModel/UtvBench.h). | |
CropSeason |
std::string |
"2026" |
Crop season file ACRE/crops_<season>.json ("legacy": fields.json land cover); growth fraction of every planted field (the game's default 1: mature); whether fields without surveyed patches are planted on the patch grid. | |
bFarmWater |
bool |
true |
The wheels read the farm's soil water (the game's FAcresFarmRuntime::Sample); false keeps the tractor.json templates' own water content, as the game does without a farm (-FarmDisabled). | |
CropHeightM |
double |
m | Full-grown plant height per crop kind (corn, soybean, potato), m: the game takes it from the patch meshes' bounds; these are estimates (they only matter for the body sweep against the 0.33 m clearance). | |
SceneFile |
std::string |
Obstacle scene for the LiDAR and collisions (Core/Data/acre_scene.json; empty: none). | ||
ObstaclesFile, GroundClassesFile |
std::string |
The scouting map's obstacles (ACRE/Scouting/obstacles.json: the collision geometry the ground classes use) for the collisions and obstacle distances, with the shapes the scene lacks added for the LiDAR (needs SceneFile); and its ground classes (ACRE/Scouting/ground_classes.u8, 0.5 m) as the task zones, so the crushed crop is counted per class: 0 crop, 1 lane, 2 verge, 3 edge band, 4 obstacle, 5 other. Empty: none. |
FAcresPlace#
Named place of places.json: ENU position, m; heading, deg compass (NaN when the place has none).
FAcresWorld#
The static world. See the file comment.
| Name | Type | Unit | Default | Description |
|---|---|---|---|---|
ZoneCount |
static constexpr int |
8 |
Task zones: a raster the task layer sets (the scouting task's ground classes: e.g. 0 other, 1 lane or verge, 2 edge band, 3 crop), so crushed crop is counted per zone where each sample stands. Cell (i, j) covers x in [X0 + i c, X0 + (i + 1) c), y in [Y0 + j c, Y0 + (j + 1) c) (rows run north); values are clamped to ZoneCount - 1; outside the raster the zone is 0. Set it before stepping (not thread-safe with Step). | |
Options |
FAcresWorldOptions |
Options it was loaded with. | ||
Terrain |
FAcresTerrain |
Terrain (a plane in a flat world). | ||
Scene |
std::unique_ptr<FAcresScene> |
Obstacle scene for the LiDAR and collisions (null without FAcresWorldOptions::SceneFile). | ||
SurfaceMap |
AcresSim::FSurfaceMap |
Surface polygons (Unreal world metres, as the game's map). | ||
SurfaceCodes |
std::vector<unsigned char> |
Maps without surface_polygons.json: surfaces.u8, one template code 0-5 per 1.524 m survey cell (the game's fallback), and its lookup. | ||
Templates |
AcresSim::FVehicleInput |
tractor.json surface templates by ESurfaceTemplate (HasTemplate false where the file has none). | ||
FlatSurface |
AcresSim::FVehicleInput |
The flat world's surface (bFlat). | ||
Ground |
AcresSim::FGroundParameters |
tractor.json soil block (the session's ground: soil library class per wheel from the soil map when ClassFromTexture) and vehicle.water_drag_cd. | ||
SoilTexture |
std::vector<uint8_t> |
Soil texture group per 1.524 m survey cell (1000 x 1000, row v). | ||
FarmWidth |
int |
0 |
4 m farm grid (field-grid.json): cells per side, corner (Unreal metres, both axes), cell size. | |
FieldIds, Cover, CellUnit, CellKind |
std::vector<uint8_t> |
Per 4 m cell: field id (field_ids.u8), cover code (cover.u8), water unit and kind (0 soil, 1 pavement, 2 gravel). | ||
UnitWilting, UnitFieldCapacity, UnitSaturated |
std::vector<double> |
Surface-layer water contents of the SSURGO units (soils.json; unit 0 = the most common one): wilting point, field capacity, saturation, m3/m3. | ||
InitialFraction, GravelFieldCapacity |
double |
farm.json initial_fraction_between_wilting_and_field_capacity; gravel's field capacity. | ||
FieldCrop |
int |
Crop per field after the season (-1 none, else ECropKind); farm.json crop parameters; degree days per field. | ||
Patches |
std::vector<FAcresCropPatch> |
Crop patches and their 4 m bins (CSR over BinCount x BinCount bins from BinOrigin, m). | ||
Places |
std::vector<FAcresPlace> |
Named places. |
FAcresWorld::Load#
Loads everything; false with Error on a missing or malformed file.
FAcresWorld::SurfaceClassAt#
Surface-map class (AcresSim::ESurfaceClass) at a point; field where no polygon holds it.
FAcresWorld::SurfaceAt#
The surface a wheel stands on (the game's SampleSurface, FAcresFarmRuntime::Sample and SoilLibraryClassAt): the tractor.json template of the surface-map class, the soil water of the 4 m grid bilinear at the point, the rut depth of the 25 cm rut cell and, on soil, the library class of the mapped soil unit.
| Argument | Description |
|---|---|
Conditions |
Soil-water scenario. |
RutDepthM |
Existing rut depth at the point, m (FAcresFarmState::RutAt). |
OutClass |
Receives the surface-map class (may be null). |
Returns: The wheel's surface input (controls left at their defaults).
FAcresWorld::FieldAt#
Field id 1-59 of the 4 m field raster at a point (0: none; FAcresFarmRuntime::FieldAt).
FAcresWorld::FieldPolygonAt#
Field id 1-59 whose polygon (fields.json) holds a point (0: none; FAcresFieldSetup::FieldAtUv).
FAcresWorld::SoilTextureAt#
Soil texture group (AcresSim::SoilFine / Medium / Coarse) of the mapped SSURGO unit at a point.
FAcresWorld::CellTheta#
Surface-layer water content of a 4 m cell under a scenario, m3/m3 (pavement 0, gravel its field capacity).
FAcresWorld::FieldGrowth#
Growth fraction 0..1 of a field's crop (AcresFarm::Growth of its degree days).
FAcresWorld::PatchBin#
Crop patches whose 4 m bin (ENU floor(x / 4), floor(y / 4)) is (Bx, By): [Begin, End) into PatchIndex.
FAcresWorld::FindPlace#
A named place by id or name (case-insensitive); null when unknown.
FField#
Fields of fields.json: outer ring in survey (u, v) cells and bounds, by id (index 0 unused).