Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Firmware/simulator/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ One row per day, in short; the details are in the sections of this file (the lin

| Date | What changed |
|---|---|
| 12 Nov 2026 | **Set up AgOpenWeb from your measures** (version 1.4): tractor buttons, Renato's Maxxum 135 and Farmall 115C; an implement on the drawbar takes the chosen tractor's pin ([the page](#set-up-agopenweb-from-your-measures)). [Action](#how-it-is-built) on `ubuntu-26.04`. |
| 12 Nov 2026 | **Set up AgOpenWeb from your measures** (version 1.5): buttons for Renato's Farmall 115C, Maxxum 135 and Puma 180; a drawbar implement takes the tractor's pin ([the page](#set-up-agopenweb-from-your-measures)). [Action](#how-it-is-built) on `ubuntu-26.04`. |
| 11 Nov 2026 | `build.py` leaves the pages' own build date (`PAGE_BUILT`) empty, so the pages' new "is this the running firmware's page" check stays off here. The pretend Keya reports its current in amps, the kickout sensor. |
| 10 Nov 2026 | Teensy page: the pretend UM982 reports its temperature (59 °C, from `HWSTATUSA`) and the module's name on the network reads `AiO-3F2A`, as the firmware now does. |
| 9 Nov 2026 | **Set up AgOpenWeb from your measures** 1.3: front corner, drawbar at the tyre, turns by headland, reasons ([the page](#set-up-agopenweb-from-your-measures)). Seed drill: 19 sections offline; short start page. [Action](#how-it-is-built) on Node 24. Check: pages in a web card's frame ([How it is built](#how-it-is-built)). |
Expand Down Expand Up @@ -64,7 +64,7 @@ To run it on your own computer: `python3 Firmware/simulator/build.py` and open `

## Set up AgOpenWeb from your measures

**https://renatorgr.github.io/Boards/aow-settings/** is not a module page: a calculator. Choose the machine (a tractor, an articulated one that bends at its joint, a harvester steered from the back, each with its own turning geometry), type its wheelbase, the angle on the stop and the overhang, and the implement as AgOpenWeb's Tool page has it (front fixed, rear fixed, trailing or TBT, the sections and their width, the overlap, the tool offset, the hitch, trailing hitch and pivot distances, the implement length), and it suggests what to put in AgOpenWeb's Vehicle & Tool page, each value with its reason, and draws the turn from above: the U-turn radius, the turn style and the rows to skip, the distance from boundary, the headland width, the extension, the Go around radius and the tramline passes. Two tractor buttons fill in Renato's Case IH Maxxum 135 (2.7 m, 42°) and his Farmall 115C (2.3 m, about 45°, 540/65 R34 tyres, its drawbar pin 0.74 m behind the rear axle); an implement on the drawbar moves to the chosen tractor's pin. It opens on the Maxxum with his 8 m sprayer on the front linkage; a second button fills in his semi-mounted 3 m no-till drill (its pivot behind the lower links, its wheels behind the discs). Three more buttons have typical measures: a manure spreader on two axles (measured to the middle between them; its beaters swing out as the tractor straightens), a trailed disc harrow and a 4-furrow reversible plough on the 3-point linkage, drawn with a K-turn since a plough skips no rows. A long implement's rear corner (its length) is followed through the turn too: a K-turn backs it towards the edge first. A trailed implement's drawbar must stay off the rear tyres: from the hitch pin, the drawbar's width, the rear track and the tyres' width and height, the page finds the angle where the drawbar touches a tyre and keeps the turn 5° under it; the tyre counts at the drawbar's height (a field, 0.5 m by default), where it is shorter than at its axle, so the drawbar touches it later than the whole wheel would say. A drawbar pin inside the tyres' back edge touches them long before 90° and then sets the radius; a semi-mounted implement's pivot, further back, does not, but its own stop may: a field takes the most the drawbar may turn to each side, from its stop or from what the farmer knows. Two more buttons hold Renato's quick disc harrow on the 3-point linkage and his semi-mounted roller (120° of swing in all), their measures guessed until he takes them. A rigid implement is measured with a tape from the axle nearest to it (a front sprayer from the front axle); AgOpenWeb measures it from the pivot, so for a front implement on a tractor the page adds the wheelbase and shows the hitch length to type in.
**https://renatorgr.github.io/Boards/aow-settings/** is not a module page: a calculator. Choose the machine (a tractor, an articulated one that bends at its joint, a harvester steered from the back, each with its own turning geometry), type its wheelbase, the angle on the stop and the overhang, and the implement as AgOpenWeb's Tool page has it (front fixed, rear fixed, trailing or TBT, the sections and their width, the overlap, the tool offset, the hitch, trailing hitch and pivot distances, the implement length), and it suggests what to put in AgOpenWeb's Vehicle & Tool page, each value with its reason, and draws the turn from above: the U-turn radius, the turn style and the rows to skip, the distance from boundary, the headland width, the extension, the Go around radius and the tramline passes. Three tractor buttons, by power, fill in Renato's Case IH Farmall 115C (2.3 m, about 45°, 540/65 R34 tyres, its drawbar pin 0.74 m behind the rear axle), his Maxxum 135 (2.7 m, 42°) and his Puma 180 CVX (2.88 m and 33° from its manual's turning circle, 2 m track, 650/65 R42 tyres, its pin 0.9 m back); an implement on the drawbar moves to the chosen tractor's pin. It opens on the Maxxum with his 8 m sprayer on the front linkage; a second button fills in his semi-mounted 3 m no-till drill (its pivot behind the lower links, its wheels behind the discs). Three more buttons have typical measures: a manure spreader on two axles (measured to the middle between them; its beaters swing out as the tractor straightens), a trailed disc harrow and a 4-furrow reversible plough on the 3-point linkage, drawn with a K-turn since a plough skips no rows. A long implement's rear corner (its length) is followed through the turn too: a K-turn backs it towards the edge first. A trailed implement's drawbar must stay off the rear tyres: from the hitch pin, the drawbar's width, the rear track and the tyres' width and height, the page finds the angle where the drawbar touches a tyre and keeps the turn 5° under it; the tyre counts at the drawbar's height (a field, 0.5 m by default), where it is shorter than at its axle, so the drawbar touches it later than the whole wheel would say. A drawbar pin inside the tyres' back edge touches them long before 90° and then sets the radius; a semi-mounted implement's pivot, further back, does not, but its own stop may: a field takes the most the drawbar may turn to each side, from its stop or from what the farmer knows. Two more buttons hold Renato's quick disc harrow on the 3-point linkage and his semi-mounted roller (120° of swing in all), their measures guessed until he takes them. A rigid implement is measured with a tape from the axle nearest to it (a front sprayer from the front axle); AgOpenWeb measures it from the pivot, so for a front implement on a tractor the page adds the wheelbase and shows the hitch length to type in.

The rules are AgOpenWeb's own (its `SagittaTurnGeometry`, `YouTurnCreationService` and `VehicleToolLimits`): the turn is drawn by the tractor's pivot, which must stay inside the field edge pulled in by the distance from boundary; a pass closer than twice the radius needs a loop (Sagitta or Keyhole), skipped rows or a K-turn (AgOpenWeb drives a 126° arc and a straight tail; as soon as the tractor reverses the turn is over for AgOpenWeb and its guidance is on the next pass, backing up too, so the tractor backs up until it is on that pass and straight; a trailed implement that would jackknife backing up gets no K-turn), a pass at twice the radius or more gets a plain semicircle. The radius is 1.2 × the tightest the machine can do (wheelbase ÷ tan of the steering angle; an articulated machine (wheelbase ÷ 2) ÷ tan of half the articulation angle), never under 4 m; the distance from boundary keeps what sweeps the widest in the turn, the outer corner of the tractor's nose (half the machine's width, from its rear track and tyres, out from the centre line) or the implement's outer end, a safety margin inside the edge (1 m by default, a field of the page: more where the edge is irregular); each turn is followed step by step every 10 cm, with the implement (a trailed one following its hitch without side slip) and the machine's far end, and the headland is the turn's depth plus that distance plus how far back into the field anything not yet straight on a pass reaches (the implement finishing its pass, a front implement or a trailed one until it is straight on the next pass, a K-turn's tail), in whole passes. The drawing shows the pivot's path, both ends of the implement and the outer corner of the machine's far end. What is not geometry (the section timing, the steering gains, the antenna position) is not suggested.

Expand Down
9 changes: 6 additions & 3 deletions Firmware/simulator/aow-settings/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
<meta name="viewport" content="width=device-width,initial-scale=1">
<meta name="color-scheme" content="dark light">
<title>Set up AgOpenWeb from your measures</title>
<script src="settings.js?v=1.4"></script> <!-- the version in the address: a browser that kept the old file fetches the new one -->
<script src="settings.js?v=1.5"></script> <!-- the version in the address: a browser that kept the old file fetches the new one -->
<style>
:root{color-scheme:dark;--bg:#121511;--card:#1b1f1a;--ink:#e7ebe3;--mute:#9aa395;--line:#2e352b;--warn:#ffb74d;--acc:#8cc068;--accInk:#10140f;--soft:#232a21;--pass:#4a5a44;--fence:#e06c5a;--tool:#6aa4d9}
@media (prefers-color-scheme:light){:root{color-scheme:light;--bg:#f2f4ef;--card:#ffffff;--ink:#1c2318;--mute:#5f6b5a;--line:#d4dbcf;--warn:#b45309;--acc:#4c7d2a;--accInk:#ffffff;--soft:#e9eee5;--pass:#b9c7b1;--fence:#c0392b;--tool:#2f6fb0}}
Expand Down Expand Up @@ -88,8 +88,9 @@

<div class="presets" id="tractors">
<span class="plabel">Tractor</span>
<button type="button" data-name="maxxum" onclick="tractor('maxxum')">Case IH Maxxum 135</button>
<button type="button" data-name="farmall" onclick="tractor('farmall')">Case IH Farmall 115C</button>
<button type="button" data-name="maxxum" onclick="tractor('maxxum')">Case IH Maxxum 135</button>
<button type="button" data-name="puma" onclick="tractor('puma')">Case IH Puma 180 CVX</button>
</div>
<div class="presets" id="implements">
<span class="plabel">Implement</span>
Expand Down Expand Up @@ -173,10 +174,12 @@ <h3>Every turn AgOpenWeb can make here, the smallest headland first</h3>
else set("axleToToolLabel", "Rear axle to the working line (m)", "the boom, the discs, the rows behind the rear axle, with a tape");
}
const TRACTORS = {
// Renato's tractors: they fill the Machine card. `pin`: the drawbar's hitch pin behind the rear axle, the hitch length of the implements
// Renato's tractors, by power (the buttons' order too): they fill the Machine card. `pin`: the drawbar's hitch pin behind the rear axle, the hitch length of the implements
// that go on the drawbar (`onDrawbar` below); a semi-mounted implement brings its own pivot instead.
maxxum: {machine: "tractor", wheelbase: 2.7, steer: 42, overhang: 1.5, trackWidth: 1.81, tyreWidth: 0.65, wheelDiameter: 1.8, pin: 0.7,
note: "Renato's Case IH Maxxum 135: 2.7 m wheelbase, 42° measured with the steer wizard, 1.81 m rear track. Its rear tyres (650/65 R38) and the drawbar pin 0.7 m behind the rear axle are guessed until he measures them."},
puma: {machine: "tractor", wheelbase: 2.88, steer: 33, overhang: 1.5, trackWidth: 2.0, tyreWidth: 0.65, wheelDiameter: 1.91, pin: 0.9,
note: "Renato's Case IH Puma 180 CVX: 2.88 m wheelbase (its manual), 2 m rear track, 650/65 R42 rear tyres, the drawbar pin 0.9 m behind the rear axle as his AgOpenWeb profile has it. 33° of steering from the manual: the middle of the rear axle turns on an 8.87 m circle with a 1.83 m front track (5.15 m with 1.55 m). It turns wider than AgOpenWeb's 4 m floor, so the tractor sets the radius. A wider front track may let it steer a little more: the steer wizard will tell. The front overhang is guessed."},
farmall: {machine: "tractor", wheelbase: 2.3, steer: 45, overhang: 1.3, trackWidth: 1.7, tyreWidth: 0.54, wheelDiameter: 1.57, pin: 0.74,
note: "Renato's Case IH Farmall 115C: 2.3 m wheelbase, 1.7 m rear track, 540/65 R34 rear tyres, the drawbar pin 0.74 m behind the rear axle. About 45° of steering, by eye until a wheel angle sensor measures it: any angle over 35° gives the same turn, AgOpenWeb's 4 m floor. The front overhang is guessed."}
};
Expand Down
2 changes: 1 addition & 1 deletion Firmware/simulator/aow-settings/settings.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
// (Sagitta or Keyhole), a pass at twice the radius or more gets a plain semicircle.
"use strict";
(function (root) {
const VERSION = "1.4"; // shown under the page's title and in index.html's "settings.js?v=": raise both with every change
const VERSION = "1.5"; // shown under the page's title and in index.html's "settings.js?v=": raise both with every change
const RADIUS_FACTOR = 1.2; // the turn radius over the tightest the tractor can do: the steering stays off its stop
const RADIUS_FLOOR = 4.0; // AgOpenWeb's simple turn path never goes below 4 m
const MARGIN = 1.0; // room kept between what sweeps the widest and the field edge, unless `margin` says otherwise
Expand Down
12 changes: 12 additions & 0 deletions Firmware/simulator/aow-settings/test.js
Original file line number Diff line number Diff line change
Expand Up @@ -267,6 +267,18 @@ const tractor = {machine: "tractor", wheelbase: 2.7, maxSteerDeg: 40, overhang:
eq("Farmall spreader radius", fs.radius, 5.4);
eq("Farmall spreader headland", row(fs, "headland").value, "30 m (3 passes)");
eq("Farmall tightest turn", fs.rMin, 2.3); // 2.3 m ÷ tan 45°: AgOpenWeb's 4 m floor is wider anyway
// Renato's Puma 180 CVX: tall 650/65 R42 tyres (1.91 m) but a wide 2 m track and the pin 0.9 m back: the drawbar touches at 82.5°;
// its manual's turning circle (8.87 m at the rear axle's centre, 2.884 m wheelbase) gives 33° of steering, so the tractor sets the radius
const puma = {machine: "tractor", wheelbase: 2.88, maxSteerDeg: 33, overhang: 1.5, trackWidth: 2.0, tyreWidth: 0.65, wheelDiameter: 1.91, drawbarHeight: 0.5, margin: 1};
const ps = S.suggest(Object.assign({mount: "trailed", width: 10, overlap: 0, hitchLength: 0.9, drawbar: 4.8, pivotToTool: 3, length: 3.3, drawbarWidth: 0.3}, puma));
eq("Puma spreader touches the tyre", ps.touchDeg, 82.5);
eq("Puma spreader radius", ps.radius, 5.4); // 1.2 × 2.88 ÷ tan 33° = 5.3: wider than the tyres need
eq("Puma spreader headland", row(ps, "headland").value, "30 m (3 passes)");
const pf = S.suggest(Object.assign({mount: "front", width: 8, overlap: 0, axleToTool: 2, hitchLength: 1, length: 0, sprayerWidth: 8}, puma));
eq("Puma tightest turn", pf.rMin, 4.4); // 2.88 ÷ tan 33° = 4.43: half the manual's 8.87 m circle
eq("Puma front sprayer radius", pf.radius, 5.4);
eq("Puma front sprayer turn", row(pf, "style").value, "Sagitta, skip 1"); // 8 m passes no longer fit a plain semicircle (twice 5.4 m)
eq("Puma front sprayer headland", row(pf, "headland").value, "24 m (3 passes)");
const fd = S.suggest(Object.assign({mount: "trailed", width: 3, overlap: -0.05, hitchLength: 1.54, drawbar: 4.15, pivotToTool: -1.6, drawbarWidth: 0.3}, farmall));
eq("Farmall drill distance", row(fd, "distance").value, "3.3 m"); // the nose's corner: (1.7 + 0.54) ÷ 2 = 1.12 m off the centre line, 1.3 m ahead
eq("Farmall drill turn", row(fd, "style").value, "Keyhole, skip 1");
Expand Down
5 changes: 5 additions & 0 deletions Firmware/simulator/smoke-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -219,6 +219,11 @@ async function teensy(browser, port, q, name) {
await expect(pg, what, "#results tbody tr[data-key=radius] td.v", /^5\.4 m$/); // its lower 540/65 R34 tyres let the drawbar fold to 76°
await expect(pg, what, "#results tbody tr[data-key=fold] td.v", /^touches the tyres at 76°$/);
await shot(pg, "aow-settings-farmall-spreader");
await pg.click("button:has-text('Case IH Puma 180 CVX')"); await pg.waitForTimeout(300);
await expect(pg, what, "#tractors button.on", /^Case IH Puma 180 CVX$/);
if ((await pg.inputValue("#wheelbase")) !== "2.88" || (await pg.inputValue("#steer")) !== "33" || (await pg.inputValue("#hitch")) !== "0.9") fail.push(what + ": the Puma button should set its wheelbase, its steering and its drawbar pin");
await expect(pg, what, "#results tbody tr[data-key=radius] td.v", /^5\.4 m$/); // 33° from its manual: the tractor sets the radius, the drawbar only folds to 82.5°
await expect(pg, what, "#results tbody tr[data-key=fold] td.v", /^touches the tyres at 82\.5°$/);
await pg.click("button:has-text('Case IH Maxxum 135')"); await pg.waitForTimeout(300);
if ((await pg.inputValue("#hitch")) !== "0.7") fail.push(what + ": the Maxxum button should put the spreader back on its 0.7 m pin");
await expect(pg, what, "#results tbody tr[data-key=radius] td.v", /^6 m$/);
Expand Down