Skip to content

linkBudget initializes from unwritten antenna messages and simpleAntenna omits the ground normal #1671

Open

Description

@dhutererprats

Describe the bug

A producer chain using groundLocation, simpleAntenna, and linkBudget can initialize incorrectly despite scheduling producers before consumers.

LinkBudget::Reset() reads antenna messages before SimpleAntenna has published them. The zero-filled environment fields identify both antennas as space antennas. This disables atmospheric attenuation for the rest of the run and adds an erroneous pointing loss for the ground antenna.

Separately, SimpleAntenna::populateOutputMsg() does not copy GroundStateMsgPayload.rHat_LP_N into AntennaLogMsgPayload.nHat_LP_N. With a zero normal, the slant calculation evaluates a 0 degree ground elevation, so attenuation no longer depends on the real geometry. At 8.2 GHz with an 800 km spacecraft altitude, attenuation is 0.6597 dB at every elevation tested from 10 to 90 degrees, compared with about 0.058 dB at zenith with the correct normal.

Publishing antenna outputs during Reset alone is insufficient. GroundLocation::Reset() does not publish its position, so linkBudget can cache sea-level atmospheric conditions for an elevated station. For a 1,624 m station at 20 GHz and 0.7 rad elevation, that workaround gives 0.67146325 dB instead of the correctly initialized 0.33555029 dB.

To reproduce

  1. Connect groundLocation.currentGroundStateOutMsg to a ground SimpleAntenna and connect a spacecraft state message to a second SimpleAntenna.
  2. Connect both antenna outputs to linkBudget and enable atmospheric attenuation and pointing loss.
  3. Schedule the models in producer-before-consumer order and run InitializeSimulation() followed by a simulation step.
  4. Inspect atmosAtt, getL_point(), and getL_atm().
  5. After the antennas have published, set atmosAtt to True again and reset linkBudget. Repeat at several elevations. The zero normal makes getL_atm() independent of the actual elevation.

Reproduced on develop 016955f using the native C++ producers.

Expected behavior

The first correctly ordered execution tick should initialize the link using published antenna environments and the actual ground altitude. The antenna output should preserve the inertial ground normal.

Until the required inputs are available, the output should provide zero CNR and no usable bandwidth. Reset should discard previous results and rebuild cached atmospheric conditions from updated producer outputs.

Additional context

Affected tagged releases: 2.10.0 through 2.12.2.

This is distinct from PR #1607, which corrected ground geometry and relative velocities, and PR #1648, which corrected atmospheric integration. Neither addresses this producer-chain initialization and normal-propagation problem.

Reproduced with a Release/Ninja native build on macOS 26.7.2 arm64 using AppleClang 21.0.0.

Activity

  1. added 3 commits that reference this issue on Nov 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions