Skip to main content

predict_ranges

Function predict_ranges 

Source
pub fn predict_ranges(
    source: &dyn ObservableEphemerisSource,
    requests: &[RangePredictionRequest],
    options: PredictOptions,
    out: &mut [RangePrediction],
) -> Result<(), ObservablesError>
Expand description

Predict geometric ranges for many (satellite, receiver, epoch) requests in one call, writing into a caller-provided out slice.

out[i] is filled from requests[i] using the same per-request transmit_time_satellite_state machinery (light-time iteration + Sagnac transport), so the batch is bit-identical to calling that predictor in a loop and projecting the geometry fields; this is amortization of the call boundary only, not a different algorithm. options.carrier_hz is unused (ranges carry no Doppler); options.light_time / options.sagnac are honored.

Errors:

  • ObservablesError::InvalidInput with field out if out.len() differs from requests.len().
  • The first request error (invalid input or missing ephemeris) aborts the batch and is returned; out is then partially written.