Skip to main content

AEROSIM-TS-3

Project task

Capture continuous flight controls and control ownership

Supported pitch, roll, yaw, and thrust inputs produce normalized authoritative control commands, while input loss or ownership changes are surfaced without silently transferring control.

AEROSIM-TS-3Canonical ID TASK-0003
Verified flow state
Done
Owner
AeroSim Architecture and Delivery
Component
Web Application — browser input adapters and control-ownership state
Repository
corp-v1-aerosim/corp-v1-aerosim

Delivery scope

Implement applications/web/src/flight/input/flight-control-adapter.ts, applications/web/test/flight/flight-control-adapter.spec.ts. Consume only the inputs listed in this contract, publish only its listed outputs, enforce every failure boundary before commit, and prove the listed exclusions remain unchanged through the verification steps.

Implementation contract

Implementation artifacts

  • applications/web/src/flight/input/flight-control-adapter.ts
  • applications/web/test/flight/flight-control-adapter.spec.ts

Inputs

  • Raw control samples from each declared device mapping with monotonic sampledAt, deviceId, connection state, and pitch/roll/yaw/thrust channel values.
  • ControlOwnership { attemptId, ownerId, deviceId, epoch } for the active flight attempt.
  • InputMappingConfig containing per-channel dead zone, inversion, scale, clamp range, and staleAfterMs.

Outputs

  • FlightControlCommand { attemptId, ownerId, ownershipEpoch, sequence, sampledAt, pitch, roll, yaw, thrust } with normalized finite channels clamped to [-1,1] except thrust [0,1].
  • ControlAvailabilityChanged for connect, disconnect, stale sample, or ownership change; no replacement owner is selected implicitly.

Failure boundaries

  • Reject samples from a device or ownership epoch that does not match ControlOwnership; publish no FlightControlCommand.
  • Reject non-finite values, regressing timestamps/sequences, unknown mappings, and samples older than staleAfterMs; publish an explicit unavailable/invalid reason.
  • On disconnect or ownership change, emit neutralized controls for the current owner epoch once, mark control unavailable, and wait for an explicit new ControlOwnership record.

Excluded scope

  • Applying commands to aircraft forces or motion.
  • Camera, instrument, pause, completion, retry, or restart behavior.

Verification steps

  • Run applications/web/test/flight/flight-control-adapter.spec.ts for every declared device mapping and channel boundary, dead zone, inversion, scale, and clamp case.
  • Feed a monotonic sustained sample trace and assert ordered normalized commands with no gaps or duplicate sequence values.
  • Inject disconnect, ownership-epoch changes, stale/out-of-order samples, unknown mappings, and NaN/Infinity; assert one neutralization where specified, explicit availability state, and no silent owner transfer.

Traceability

Requirements

Dependencies

Acceptance evidence

Verified delivery: application PR #134 reviewed head 65e235f52d163597c21937eb3ea909816d5a9a6a merged as 796592409609f94db3708a33e42ba677bb8ffd40. Flight-control adapter normalizes declared device mappings, publishes 200 gap-free ordered owned commands, rejects stale, invalid, mismatched and regressing input, and neutralizes exactly once on disconnect or ownership change without implicit transfer. Focused tests: 9 passed; web suite: 1,104 passed plus 11 invalid-action and 27 environment-presentation tests. Exact-head and post-merge CI runs 4322, 4323, 4327, 4328 passed. Release completion verified on product 1.0.0.0 at GitOps revision 5d3712d89dfbf7dacd993348e55f497d126c7bf9 with Argo Synced/Healthy, exact image digests, authenticated API/database access, and three-world configured-flight acceptance.

Current evidence boundary

No current implementation, acceptance, release, or deployment evidence is claimed for this planned Task. Any prior implementation may be used only as prototype and discovery evidence.