Skip to main content

AEROSIM-TS-89

Project task

Implement the authoritative primary chase-camera rig

Active flight starts in the primary chase view, which follows the controlled aircraft continuously without becoming a second owner of aircraft state.

AEROSIM-TS-89Canonical ID TASK-0089
Verified flow state
Done
Owner
AeroSim Architecture and Delivery
Component
Web Application — Three.js primary chase-camera rig
Repository
corp-v1-aerosim/corp-v1-aerosim

Delivery scope

Implement applications/web/src/flight/cameras/primary-chase-camera.ts, applications/web/test/flight/primary-chase-camera.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/cameras/primary-chase-camera.ts
  • applications/web/test/flight/primary-chase-camera.spec.ts

Inputs

  • ActiveFlightStarted { attemptId, aircraftEntityId, initialPose, simulationStep } emitted once after the world and controlled aircraft are ready.
  • AircraftFrame { attemptId, simulationStep, position, orientation, velocity } from the authoritative flight runtime on each committed step.
  • ChaseCameraConfig { offsetMetres, lookAheadSeconds, positionSmoothing, rotationSmoothing } whose numeric fields are finite and within configured bounds.

Outputs

  • PrimaryCameraState { attemptId, sourceStep, position, quaternion, lookAt } selected as the active camera for the first rendered active-flight frame.
  • One camera update per committed AircraftFrame; the update reads aircraft state and writes only camera transform state.

Failure boundaries

  • Reject start when the aircraft entity is absent, the attempt identifier differs from the active attempt, or any pose/configuration number is non-finite; do not activate a camera.
  • Ignore an AircraftFrame whose attemptId is stale or whose simulationStep is not greater than the last applied step, retaining the last valid camera state.
  • If camera computation produces a non-finite transform, retain the last valid transform and emit PrimaryCameraFault with attemptId and sourceStep; never write aircraft pose, velocity, forces, or input ownership.

Excluded scope

  • Secondary-camera registration or selection.
  • Simulation stepping, aircraft-force calculation, pause handling, and session termination.

Verification steps

  • Run applications/web/test/flight/primary-chase-camera.spec.ts and assert that ActiveFlightStarted selects the chase rig before the first active-flight render.
  • Replay a fixed AircraftFrame trace and assert exactly one ordered camera state per increasing simulationStep and zero writes to aircraft or input-owner stores.
  • Inject missing aircraft, stale attempt/step, out-of-range configuration, and NaN/Infinity values; assert no activation or invalid transform is published and PrimaryCameraFault is emitted where specified.

Traceability

Requirements

Dependencies

UI/UX applicability

non_visual

This Task owns technical or behavioral acceptance and does not claim direct visual conformance to the approved UI/UX package.

Acceptance evidence

Verified delivery: application PR #140 reviewed head 6b540617f46e40f38eaeb9087aa1c6248673dd3b merged as a5bbb026841a454d42e0f0496f7c010c9c3ef57f7. Primary chase activation precedes first active render; increasing frames yield one ordered finite camera state; stale frames retain the last valid transform; invalid configuration/start and non-finite computation fail closed without aircraft/input mutation. Focused tests pass 5/5; web tests pass 1,109/1,109 plus existing browser suites; lint, typecheck, build, audit, candidate runs 4388-4389, and integration/publication runs 4390-4391 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.