sctiks_c |

## Procedurevoid sctiks_c ( SpiceInt sc, ConstSpiceChar * clkstr, SpiceDouble * ticks ) ## AbstractConvert a spacecraft clock format string to number of "ticks". ## Required_ReadingSCLK ## KeywordsCONVERSION TIME ## Brief_I/OVariable I/O Description -------- --- -------------------------------------------------- sc I NAIF spacecraft identification code. clkstr I Character representation of a spacecraft clock. ticks O Number of ticks represented by the clock string. ## Detailed_Inputsc is the NAIF ID number for the spacecraft whose clock string is being converted. clkstr is a character string representing a spacecraft clock time, WITHOUT PARTITION NUMBER. Using Galileo as an example, the full format is wwwwwwww:xx:y:z where z is a mod-8 counter (values 0-7) which increments approximately once every 8 1/3 ms., y is a mod-10 counter (values 0-9) which increments once every time z turns over, i.e., approximately once every 66 2/3 ms., xx is a mod-91 (values 0-90) counter which increments once every time y turns over, i.e., once every 2/3 seconds. wwwwwwww is the Real-Time Image Count (RIM), which increments once every time xx turns over, i.e., once every 60 2/3 seconds. The roll-over expression for the RIM is 16777215, which corresponds to approximately 32 years. wwwwwwww, xx, y, and z are referred to interchangeably as the fields or components of the spacecraft clock. SCLK components may be separated by any of the following characters: " " "." ":" "," "-" Any number of spaces may separate the components and the delimiters. The presence of the RIM component is required. Successive components may be omitted, and in such cases are assumed to represent zero values. Values for the individual components may exceed the maximum expected values. For instance, "0:0:0:9" is an acceptable Galileo clock string, and will convert to the same number of ticks as "0:0:1:1". Consecutive delimiters containing no intervening digits are treated as if they delimit zero components. Trailing zeros should always be included to match the length of the counter. For example, a Galileo clock count of "25684.90" should not be represented as "25684.9". Some spacecraft clock components have offset, or starting, values different from zero. For example, with an offset value of 1, a mod 20 counter would cycle from 1 to 20 instead of from 0 to 19. See the SCLK required reading for a detailed description of the Voyager and Mars Observer clock formats. ## Detailed_Outputticks is the number of ticks represented by the spacecraft clock string. A tick is defined to be the smallest time increment expressible by the spacecraft clock. An analogy may be drawn between a spacecraft clock and a standard wall clock, measuring hours, minutes and seconds. The number of ticks represented by the wall clock string hh:mm:ss would be the number of seconds represented by that time. For example: 00:00:10 would convert to 10 00:01:00 would convert to 60 00:10:00 would convert to 600 01:00:00 would convert to 3600 01:01:00 would convert to 3660 See the Examples section below for examples for actual spacecraft clocks. ## ParametersNone. ## Exceptions1) If the spacecraft clock type is not supported then the error SPICE(NOTSUPPORTED) is signalled. 2) If any of the extracted clock components cannot be parsed as integers, or the string has too many components, or the value of one of the components is less than the offset value, then the error is diagnosed by routines called by this routine. 3) Invalid spacecraft ID's are not diagnosed. ## FilesNone. ## ParticularsNote the important difference between scencd_c and ## Examples
## RestrictionsNone. ## Literature_ReferencesNone. ## Author_and_InstitutionJ.M. Lynch (JPL) R.E. Thurman (JPL) ## Version-CSPICE Version 1.1.1, 14-AUG-2006 (EDW) Replace mention of ldpool_c with furnsh_c. -CSPICE Version 1.1.0, 08-FEB-1998 (NJB) References to C2F_CreateStr_Sig were removed; code was cleaned up accordingly. String checks are now done using the macro CHKFSTR. -CSPICE Version 1.0.0, 25-OCT-1997 (NJB) Based on SPICELIB Version 1.0.1, 10-MAR-1992 (WLT) ## Index_Entriesconvert spacecraft_clock string to ticks |

Wed Apr 5 17:54:42 2017