| docs | ||
| src | ||
| tests/TankFitPro.Core.Tests | ||
| .gitignore | ||
| build-windows.cmd | ||
| Directory.Build.props | ||
| README.md | ||
| TankFitPro.sln | ||
TankFit Pro
Portable Windows desktop truck scale / tanker simulation and training app.
TankFit Pro puts a trainee in front of a realistic weigh-in: a tractor and tanker trailer on a platform scale, a legal-for-trade scale head that will not print while the deck is in motion, load configurations built from real product densities, and guided scenarios that score every move.
No hardware, no installer, no account, no network.
Repository layout
| Path | What it is |
|---|---|
TankFitPro.sln |
Solution containing all three projects |
src/TankFitPro.Core/ |
Simulation engine — weights, units, scale behaviour, load configs, scenarios, JSON persistence. Targets net8.0, builds and tests anywhere. |
src/TankFitPro.App/ |
WPF desktop dashboard. Targets net8.0-windows. |
tests/TankFitPro.Core.Tests/ |
xUnit tests for the engine (60 tests). |
docs/ |
Product notes and the reference UI spec. |
The engine has no reference to WPF or to any UI type, so it can be lifted into a Nexus Point module later without touching the simulation code.
Running the tests
dotnet test
Runs on Linux, macOS or Windows — the Core project and its tests are plain net8.0.
Building
dotnet build # whole solution, App included
Running on Windows
Prerequisite: .NET 8 Desktop Runtime (or the .NET 8 SDK).
dotnet run --project src\TankFitPro.App
Building the portable copy
build-windows.cmd
This publishes a single-file, no-install TankFitPro.exe into publish\. Copy that folder
anywhere — a USB stick, a shared drive, a training laptop — and double-click the exe. Nothing is
written to the registry or to Program Files.
Equivalent command if you prefer to type it out:
dotnet publish src\TankFitPro.App -c Release -r win-x64 --self-contained false -o publish
Add --self-contained true if the target machine will not have the .NET 8 Desktop Runtime; the
output grows to roughly 150 MB but needs no prerequisites at all.
Using the app
Top bar — app identity, the current instruction or feedback message, and live compliance and scale-motion chips.
Left rail — navigation and the System Connected / Operator Admin status block. The hamburger collapses the rail to icons.
Centre — the rig on the deck. The tank shows its actual product level, the placard reflects the selected product, and detaching the tractor visibly pulls it forward off the deck. Four tiles below break the reading down into tare, product, combination gross and the last recorded ticket.
Right panel
| Control | What it does |
|---|---|
| Run Scenario / Play | Starts the selected scenario, then demonstrates each step for half credit |
| Stop | Leaves the scenario and returns to free play |
| Gross Weight | The scale head. Large digital readout with lb / kg selector |
| Config Load | Cycles the saved load configurations |
| Detach / Attach Trailer | Drops the trailer on the deck, or backs under and recouples |
| Deck Controls | Drive On, Drive Off, Wait for Stable, Record Weight |
Bottom bar — scale name, stable/in-motion indicator, last-updated time, and the wall clock.
Load configurations
Five presets ship with the app, from an empty purged tanker to a full 9,000 gal shell of diesel that
puts the combination 13,370 lb over the federal limit. On first launch the app writes
configurations.json next to the executable; edit it to add your own trucks, trailers and products
(capacity in gallons, density in lb/gal) and restart. Delete the file to get the factory set back.
Weigh entries
IN asks for the ID number this trip is filed under, then opens an entry at the settled deck weight with the time it was taken. OUT lists the entries still awaiting a weigh-out, oldest first — pick one and it is completed with the current settled weight, so the net weight is always the difference between two readings on the same record. The picker is keyboard-driven: Up and Down move one row, Page Up and Page Down jump a screenful, Enter (or a double-click) confirms, Escape cancels.
IDs are text, so 0042 stays 0042. An ID that is already awaiting its weigh-out cannot be weighed
in again, and an entry cannot be weighed out twice. Clear log clears the panel only — it never
deletes an entry.
Entries live in weigh-entries.json next to the executable, with the same fallback to a per-user
folder the rest of the app uses. Saves are atomic — written to a temporary file and swapped in,
keeping the previous copy as weigh-entries.json.bak — and a weigh-in or weigh-out that cannot be
written to disk is refused rather than reported as recorded. An unreadable file is renamed to
weigh-entries.json.corrupt rather than overwritten, and the app falls back to the backup.
Scenarios
- Empty Tanker Weigh-In — establish a legal tare.
- Partial Load — Detached Trailer — split a combination weight by dropping the trailer.
- Overweight Full Load Warning — top a tank off and catch the over-gross condition.
While a scenario is running, every button press is checked against the current step. Correct moves score full marks, a demonstrated step scores half, and wrong attempts cost credit and return the step's hint. The pass mark is 70%.
Reference numbers
With the default equipment — 17,600 lb tractor, 12,320 lb / 9,000 gal aluminium petroleum tanker:
| Configuration | Gross |
|---|---|
| Empty, coupled, on the deck | 29,920 lb |
| Diesel #2 at 67% (startup default) | 72,430 lb |
| Same load, tractor detached | 54,830 lb |
| Diesel #2 full shell | 93,370 lb — overweight |
Limits of the MVP
- Simulation only. There is no connection to real scale hardware or to a scale head protocol.
- Axle-by-axle weights are modelled as limits on the equipment records but are not yet split out in the UI; only gross and the tare/product breakdown are shown.
- Scenario definitions are code-authored (
BuiltInScenarios). The step model is already declarative, so loading them from JSON is a small follow-up. - No licensing, payment, user accounts or telemetry.