NAME

Check_SPICE

Checks the SPICE database table for coverage.


SYNOPSIS

Check_SPICE <Observation ID> | <start time> [<end time>]
[-Kernel_Type <identifier>]
[-Kernel_Status <status>]
[-LSK_kernel <pathname>]
[-SCLK_kernel <pathname>]
[-Configuration <config_pathname>]
[-Server <server>]
[-CAtalog <catalog>]
[-[Very_]Verbose | -Quiet]
[-Help]


OPTIONS

-Kernel_Type <identifier>

The SPICE table records may indicate the coverage time range for ``CK'' and ``SPK'' type kernel data files. Either or both types may be check for coverage that spans the specified time range. By default both kernel types will be checked.

-Kernel_Status <status>

The SPICE kernel files that provide coverage for some time range may contain predicted, reconstructed or smithed data. One or more of these status values may be specified to limit which table records are to be checked for coverage. By default records indicating any status, including unknown (NULL) status, will be checked.

-LSK_kernel <pathname>

For time conversion operations a leap seconds kernel (LSK) file and a spacecraft clock kernel (SCLK) file are required. The default pathname to the LSK kernel file is $HiRISE_ROOT/Data/NAIF/LSK.kernel, where $HiRISE_ROOT is the value of the ``HiRISE_ROOT'' environment variable or ``/HiRISE'' if the environment variable is not present, unless the configuration file contains a SPICE/LSK_Kernel parameter.

-SCLK_kernel <pathname>

For time conversion operations a leap seconds kernel (LSK) file and a spacecraft clock kernel (SCLK) file are required. The default pathname to the SCLK kernel file is $HiRISE_ROOT/Data/NAIF/SCLK.kernel, where $HiRISE_ROOT is the value of the ``HiRISE_ROOT'' environment variable or ``/HiRISE'' if the environment variable is not present, unless the configuration file contains a SPICE/SCLK_Kernel parameter.

-Configuration <pathname>

The configuration file contains the database access information. The configuration file must provide the necessary information needed to identify and connect with the database server where the SPICE (and possibly EDR_Products) table will be found. If the pathname is a simple filename and it is not found in the current working directory it will be looked for in the user's home directory. Default: HiSPICE.conf.

-Server <server>

The configuration file may contain connection information for more than one database. The information for each database is organized by Server name. A Server name corresponds to a parameter group in the confinguration file, with the same name, that contains access information for a database server. Default: The first name in the Server list specified in the configuration.

-CAtalog <catalog>

The database catalog on the server contains that contains the SPICE table to be checked. Default: HiRISE.

-[Very_]Verbose | -Quiet

Verbose operation reports procedure details. The -very_verbose option adds reports from the utilities programs that are used. By default a brief summary reporting (verbose) will be listed. Quiet operation minimizes messages.

-Help

Print this manual page.


DESCRIPTION

The SPICE kernel database table is checked for records which indicate that the associated kernel files contain coverage for a specified time range.

The time range to be checked may be specified directly using time values; if only one time value is specified the ``range'' is that single time. Two time values may be specified in either ascending or descending order. The time values may be specified in any of three recognized forms:

UTC - Coordinated Universal Time

Coordinated Universal Time (UTC) is represented as a familiar calendar time in ``YYYY-MMM-DD HH:MM:SS'' format. The clock time part is optional; if not included it will default to 00:00:00. N.B.: If the representation contains a space character (' ') the entire time must be quoted (with single or double quotes) on the command line; alternatively, a 'T' character may be used instead of the space character.

ET - Ephemeris Time

Ephemeris Time is the time in seconds and decimal fraction of a second since the J2000 epoch - 2000-JAN-01 12:00:00 - in the TDB (Barycentric Dynamical Time) reference system (see ``Time Routines in CSPICE'' at http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/req/time.html). This value is accurate to .00001 second. This representation must always contain a decimal point.

SCLK - Spacecraft Clock

Spacecraft clock time is measured in seconds and fractional second clock ticks since the spacecraft epoch - 1980-JAN-01 00:00:00 - in ``SSSSSSSSSS:FFFFF'' format where SSSSSSSSSS is the seconds count and FFFFF is the fractional second clock ticks with each tick being 1/65536 of a second. N.B.: The delimiter between the integer seconds and fractional second ticks parts is the colon character (':') not a decimal point character ('.').

Regardless of the time representation specified, ET seconds is always used (conversion is done as needed) for the coverage check against the COVERAGE_RANGE_START_TIME_ET and COVERAGE_RANGE_END_TIME_ET SPICE table field values. These coverage time range values are incluse of the end times; the specifed time range to check is also assumed to be an incluse range. All SPICE table records for the selected kernel type that have a converage time range that overlaps the specified time range are selected. The combined coverage time range of all selected SPICE table records must fully contain the specified time range for the check to be successful. If the specified time range begins before, or ends after, the combined coverage time range the coverage is only partial. Also, if there are any gaps between the coverage indicated by multiple records, the coverage is only partial. WARNING: The coverage indicated by each record is assumed to be continuous; any coverage gaps within a kernel file will go unnoticed.

The NAIF SPICE Toolkit software utility chronos is used to accurately convert between these different time representations. These utilities require the use of leap seconds kernel (LSK) and spacecraft clock kernel (SCLK) files. The default pathnames for these files (which are typically generically named links to the most current files of their type) may be overridden by SPICE/LSK_Kernel and SPICE/SCLK_Kernel parameters in the configuration file or on the command line.

The time range to be checked may be specified indirectly using an observation ID. The EDR_Products table record for the observation will be looked up by matching the COMMANDED_ID field value with the specified observation ID. The SPACECRAFT_CLOCK_START_COUNT and SPACECRAFT_CLOCK_STOP_COUNT field values provide the SCLK time range for the observation which will be converted to ET representation.

Note: Configuration parameters may be queried by various utilities. Any utility may used as long as a listing of selected parameters can be obtained with a command line that uses the following syntax:

$Config_Query $parameter_pathname $config_source

where $config_source is the source of the configuration file, $parameter_pathname is the parameter pathname (relative or absolute) that names the parameter of interest, and $Config_Query is the fixed portion of the command line. If a ``Config_Query'' environment variable is present its value will be used for the fixed portion of the command line. By default the $Config_Query is ``Configuration -query''. The Configuration utility will accept both file pathnames and URLs for the $config_source and has the advantage of supporing @Include parameters when the source is a locally accessible file, but as a Java application it runs slower than PPVL_report. The PPVL_report utility is an appropriate alternative that is a fast compiled binary application but it will only accept file pathnames for the $config_source and does not support @Include parameters.


Exit Status

  1. - Success

    All selected files were fetched.

  2. - Bad command line syntax

    A command line syntax usage message will be provided.

  3. - Invalid configuration

    A required configuration parameter could not be found or a parameter value is invalid.

  4. - System error

    A system operation - such as running a helper utility or creating a directory - failed.

  5. - Invalid observation ID

    The specified observation ID does not refer to a single record in the EDR_Products table.

  6. - Database query failed

    A database query failed.

  7. - Time value conversion failed

    A conversion of a time value from one representation to another failed.

  8. - No SPICE coverage

    The SPICE table does not contain any records that provide coverage that overlaps the selected time range. N.B.: This exit status may occur when more than one kernel type is checked but only one type lacks coverage.

  9. - Partial SPICE coverage

    The SPICE table contains records that provide partial coverage of the selected time range. The selected time range may begin before, or end after, the coverage reported in the SPICE records, or there may be a gap between the coverage indicated by more than one record. N.B.: The coverage indicated by each SPICE record is assumed to be continuous.


Author

Bradford Castalia, UA/HiROC


Copyright

Copyright (C) 2009 Arizona Board of Regents on behalf of the Planetary Image Research Laboratory, Lunar and Planetary Laboratory at the University of Arizona.

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License, version 2, as published by the Free Software Foundation.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.


Version

1.14