Skip to content

Port the CUBE predicted-surface producer (external-prior load + per-sounding touchdown interpolation) to make slope correction active #59

Description

@rolker

Part of #15. Issue #15 ported the node-level slope-correction math (Node::setPredictedDepth + the corrected offset in Node::insert) but explicitly deferred the predicted-surface producer that drives it. With no producer, predicted_depth_ / Sounding::predicted_depth_at_touchdown stay at INVALID_DATA so the offset is 0 (correct-but-uncorrected) in production.

This issue ports the producer subsystem the port wholly lacks, as one umbrella (the two pieces only deliver value together):

  1. External-prior load (cube_grid_initialise analog, cube_grid.c:1665,1712,1730): load a prior bathymetry array, seed each node's predicted_depth_/variance via setPredictedDepth, and seed a base null hypothesis.
  2. Per-sounding touchdown interpolation (cube_grid_interpolate + the mapsheet_cube.c:2434 range overwrite): bilinearly blend the 4 surrounding nodes' predicted_depth_ at each sounding's touchdown (de,dn) and set Sounding::predicted_depth_at_touchdown (returns the no-correction sentinel if any corner is no-data).

The Grid-vs-GeoGrid interpolation geometry decision (regular bilinear vs the GGGS-cell analog) belongs here, with a per-node seed API on Grid/GeoGrid. Once landed, slope correction is active end-to-end; until then, deployed behaviour remains uncorrected (#15 is honest about this).


Authored-By: Claude Code Agent
Model: Claude Opus 4.8 (1M context)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions