Function lupnt::cheby_verify

Function Documentation

int lupnt::cheby_verify(double *seg, long len)

Verify that a raw SPK Chebyshev segment has the expected uniform-record structure before it is used by cheby_posvel/cheby_posvel_ad.

Called by cheby_segment immediately after reading each segment from a DAF/SPK file, to guard against segfaults on malformed data.

Parameters:
  • seg – Raw SPK Chebyshev segment data

  • len – Length of seg in doubles

Returns:

0 if seg is a valid uniform set of coefficient records, 1 otherwise