Skip to content

Make SpecularCoverage.get_topk_coverage return transmitter IDs and unify the coverage output type with calculate_coverage #37

Description

@vinay0000

Context

SpecularCoverage.calculate_coverage returns List[Tuple[DiscreteCoverageTP, List[float]]], one tuple per GNSS transmitter. get_topk_coverage returns the same tuple type but one entry per rank (best-first by RCG, selected per time step). Because the selected transmitter varies per time step, get_topk_coverage currently drops transmitter identity entirely — unlike its trajectory-domain twin specular.get_topk_trajectories, which returns selected_ids_by_time.

To recover identity, Mission.execute_gnssr_coverage_calculator (added for the topk feature) re-ranks the same RCGs through get_topk_trajectories, feeding it a throwaway placeholder PositionSeries purely as a vehicle. This works (both functions use identical ranking logic), but it's a workaround that couples coverage to the trajectory API and is non-obvious.

Proposal

  1. Have get_topk_coverage accept ids and return the selected transmitter id per (time, rank) directly — mirroring get_topk_trajectories.
  2. Replace the ad-hoc (DiscreteCoverageTP, List[float]) tuple with a single, shared return type (e.g. a small dataclass carrying coverage, rcg, and optionally transmitter_id(s)) used by both calculate_coverage and get_topk_coverage, so consumers handle one consistent structure.
  3. Simplify Mission.execute_gnssr_coverage_calculator to use the new IDs directly and drop the placeholder-PositionSeries workaround.

Acceptance criteria

  • get_topk_coverage returns, or makes available, the transmitter id behind each rank at each time step.
  • calculate_coverage and get_topk_coverage share one documented return type.
  • The placeholder-PositionSeries hack in mission.py is removed.
  • Existing callers / the dshield-cygnss-demo example and dshield_format_converter are updated to the new type.

Related: orbitpy/coveragecalculator.py (SpecularCoverage), orbitpy/specular.py (get_topk_trajectories), orbitpy/mission.py (execute_gnssr_coverage_calculator).

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