Function lupnt::LinearInterp1d

Function Documentation

double lupnt::LinearInterp1d(const VecXd &x, const VecXd &z, double xi)

Linear interpolation in 1D.

Piecewise-linear interpolation of a 1D tabulated function z(x) at point ix.

Used throughout the simulator for lookups in tabulated data: e.g. Sp3Loader::GetPositionEcef interpolates GNSS satellite ECEF position/clock-bias columns vs. epoch, GnssConstellation/GnssMeasurement interpolate fitted ECI state history vs. epoch, and Antenna::ComputeGain interpolates a 1D antenna gain pattern vs. angle.

Parameters:
  • x – Vector of x values

  • z – Vector of z values

  • xi – x interpolation point

  • x – Strictly monotonic table of independent-variable samples

  • z – Table of dependent-variable values, same size as x

  • ix – Query point; must lie within [x(0), x(end)] (within EPS), else throws

Returns:

Linearly interpolated value of z at ix