NAME

Reconcile_SPICE

Reconciles the SPICE database table with the kernel files it references.

SYNOPSIS

Reconcile_SPICE [<record_ID> | <record_pathname> [...]]
[-Configuration <pathname>]
[-Server <server>]
[-CAtalog <catalog>]
[-LSK_kernel <pathname>]
[-SCLK_kernel <pathname>]
[-Refresh]
[-No_op]
[-[Very_]Verbose | -Quiet]
[-Help]

OPTIONS

-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 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 updated. Default: HiRISE.

-LSK_kernel <pathname>

To report the time range coverage of a kernel file a leap seconds kernel (LSK) file and a spacecraft clock kernel (SCLK) file are required. The default LSK kernel file is named LSK.kernel in the $HiRSIE_ROOT/Data/NAIF directory - where $HiRSIE_ROOT is the value of the HiRSIE_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>

To report the time range coverage of a kernel file a leap seconds kernel (LSK) file and a spacecraft clock kernel (SCLK) file are required. The default SCLK kernel file is named SCLK.kernel in the $HiRSIE_ROOT/Data/NAIF directory - where $HiRSIE_ROOT is the value of the HiRSIE_ROOT environment variable, or /HiRISE if the environment variable is not present - unless the configuration file contains a SPICE/SCLK_Kernel parameter.

-Refresh

Normally when a SPICE table record is not reconciled with its kernel file the record is deleted from the table (unless the -No_op option is specified, of course). With the -Refesh option a record that is not reconciled but the kernel file exists and produces valid values, including the same kernel type identifier as found in the record, has its coverage time values refreshed with the values from the file. This can be useful if a key dependency file - LSK or SCLK kernel files - has changed such that the time values generated from old kernel files are now different.

-No_op

Do not apply any table update record deletion or field value change operations, just list what would be done. By default this mode is not enabled.

-[Very_]Verbose | -Quiet

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

-Help

Print this manual page.

DESCRIPTION

The contents of the SPICE database table are reconciled against the pathname of the SPICE kernel file specified in each record. The PATHNAME field of the table record will contain the fully qualified pathname to the kernel file specified.

If one or more <record_ID> or <record_pathname> command line arguments are specified, then only the records with field values that match each record ID - a unique number in the ID field - or record pathname - the value of the PATHNAME field - will be reconciled. When a relative pathname is specified it is expanded to its fully qualified form before being used to select table records.

A database table record is reconciled if all of the following conditions are met:

The kernel file exists

The file specified by the PATHNAME field must exist and be a regular file.

The kernel type is correct

The kernel file is expected to contain an identification sequence in its first eight characters - following a '/' delimiter and excluding any trailing space characters - that specifies the type of kernel data it contains. The KERNEL_TYPE field of the table record must contain the same kernel type identification.

The time range coverage matches

For kernel types "CK" and "SPK" a SPICE Toolkit utility program will be used to obtain the time range coverage of the data in the kernel file. It must be possible to determine the time range coverage for the file. If the file contains multiple time range segments the coverage of the file will be from the minimum segment start time to the maximum segment end time. The SCLK - spacecraft clock count - representations of the time range coverage values must match the COVERAGE_RANGE_START_TIME_SCLK and COVERAGE_RANGE_END_TIME_SCLK field values of the table record.

The chronos NAIF SPICE Toolkit software utility is used to accurately generate the time representations.

The kernel types "LSK" and "SCLK" do not have time range coverages.

See the Update_SPICE procedure for more details on how the SPICE table entries are managed.

A database record that is not reconciled against the file is specifies is to be deleted from the table. If the -No_Op option has been specified the record deletion is not done but that it would be done is reported.

All command line arguments have default values. However, configuration parameter values may be used instead of the default values. All configuration parameters used by this procedure - except the database access parameters which are in the -Server group - are sought in the SPICE group. The options descriptions provide the name of the parameter for the particular option.

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

0 - Success

Reconciliation completed successfully.

1 - Bad command line syntax

A command line syntax usage message will be provided.

2 - Invalid configuration

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

3 - System error

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

4 - Kernel file error

There is a problem with a kernel file.

5 - Database query failed

A database query failed.

6 - Time value conversion failed

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

7 - Database update failed

The update of the SPICE table to delete or change a record failed.

Author

Bradford Castalia, UA/HiROC

Copyright

Copyright (C) 2010-2020 Arizona Board of Regents on behalf of the Lunar and Planetary Laboratory at the University of Arizona.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

   http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Version

1.7