ReviewOS

also looking at this

stacks/drone

feat: model one point-load intake with conserved momentum

#99
Merged chris wants to merge codex/cargo-fleet-custody into main
45 files +3133 -169
docs/api.mdmodified+24-0
Changes to docs/api.md
@@ -38,6 +38,30 @@ forgetting a lease, not a guaranteed real-time deadline. Do not automatically re
3838without independently checking operator authority. `close()` is idempotent. The SITL example has
3939a hard 30-second duration and a deliberately artificial target.
4040
41## Modeled cargo missions
42
43The cargo modules expose the owned runtime directly, without an external-autopilot dependency:
44
45- `planCargoDelivery(configuration)` in `resources/functions/drone/cargo/plan.ts` captures a
46 complete declaration and validates the normal/alternate mission graph and declared reserve.
47- `simulateCargoDelivery({ configuration, scenario? })` in `cargo/delivery.ts` under the same
48 drone folder runs its actual loaded rigid body through the raw sensors, estimator, mission,
49 controls, authority and watchdog. Omitting configuration selects only the closed named fixture.
50- `cargoDeliverySummary(run)` produces a bounded compact projection, preserving actual mission,
51 custody and host-loss outcomes. A matched failure demonstration is not delivery completion.
52- `createCargoDeliveryCoordinator(declaration, modeledMechanism)` in `cargo/coordinator.ts`
53 implements `VehiclePayloadPort`, captured readiness and idempotent cancellation. Its adapter
54 contract is synchronous and explicitly modeled, with no built-in hardware I/O.
55
56The [cargo guide](cargo-delivery.md) defines the flat synthetic origin, finite load/route bounds,
57one-release and receipt semantics, phase-bound faults, native CLI exit codes and remaining
58fleet/physical/BVLOS work. Budgets are declared power ceilings, not electrical measurements.
59
60`createReceivingRigidBody({ expectedPointLoad, ...bodyOptions })` in `controls/physics.ts`
61provides the separate [point-load intake prerequisite](cargo-delivery.md#point-load-intake-prerequisite).
62It integrates real modeled mass/CG changes after one coincident inelastic point capture.
63The caller still owns the parcel, finite station handling and captured fleet custody protocol.
64
4165## Target sources
4266
4367`createGpsTargetSource({ targetId, origin, maxSpeedMps?, now? })` converts trusted phone or GNSS fixes