AEROSIM-TS-31
Define the normalized height-data contract
Terrain rendering and collision consume one validated normalized height-data representation with explicit dimensions, scale, origin, sampling, and coordinate conventions.
- Verified flow state
- Done
- Owner
- AeroSim Architecture and Delivery
- Feature
- AEROSIM-FT-47
- Component
- Web Application / Deterministic flight runtime — Shared flight-core — normalized terrain data contract
- Repository
- corp-v1-aerosim/corp-v1-aerosim
Delivery scope
Define HeightData {width,height,samples,heightScale,cellSize,origin,sampling} and normalize row-major source samples into Float32Array using x-east, y-up, z-south coordinates and bilinear sampling. Primary files: packages/flight-core/src/terrain/height-data.ts, packages/flight-core/src/terrain/normalize-height-data.ts, packages/flight-core/tests/terrain/height-data.test.ts, packages/flight-core/tests/fixtures/ridge-5x5.json.
Implementation contract
Implementation artifacts
- packages/flight-core/src/terrain/height-data.ts
- packages/flight-core/src/terrain/normalize-height-data.ts
- packages/flight-core/tests/terrain/height-data.test.ts
- packages/flight-core/tests/fixtures/ridge-5x5.json
Inputs
- RawHeightData with integer width/height, numeric row-major samples, positive heightScale and cellSize, and Vector3 origin
- ridge-5x5.json deterministic source fixture
Outputs
- NormalizedHeightData with samples.length=width*height and sampleHeight(x,z) function
- Stable terrain bounds and grid-to-world/world-to-grid transforms
Failure boundaries
- Reject width or height below 2, sample-count mismatch, non-finite samples, non-positive scales, and unsupported sampling modes.
- Return OutOfTerrainBounds for sample coordinates outside the closed grid extent; do not clamp silently.
Excluded scope
- GeoTIFF decoding, coordinate-reference-system reprojection, streaming terrain tiles, and procedural terrain generation are not included.
Verification steps
- pnpm --filter @aerosim/flight-core test -- terrain/height-data.test.ts
- Validate ridge-5x5, sample all vertices and cell centers, then run explicit dimension, NaN, scale, and bounds rejection fixtures.
Traceability
Dependencies
- AEROSIM-TS-27Canonical ID: TASK-0027
- AEROSIM-TS-30Canonical ID: TASK-0030
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 #51 merged the normalized HeightData contract as def0b6d662de0304d82431765ce4f080ffadbb1b; follow-up PR #52 merged fractional-transform rejection as 08ffb367a65955e32aeeb632eb805061b46fb5da; current integration retains the required artifacts; the focused terrain suite passes 46/46; exact-head integration validation and immutable image publication passed remotely at ade1706b80d1642a6763f2827cfb2e6b3fc8ddaf. 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.