Function lupnt::cheby_verify¶
Defined in File spice_cheby.cc
Function Documentation¶
-
int lupnt::cheby_verify(double *seg, long len)¶
Verify that the provided segment meets the constraints of a uniform set of coefficient records. Return 0 on success or 1 if the segment is invalid. This should be done before using the segment in order to avoid segfaults on invalid data.
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_segmentimmediately 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
segin doubles
- Returns:
0 if
segis a valid uniform set of coefficient records, 1 otherwise