HiRISE

HiRISE.HiCat.Utilities
Class Update_Mars_Year

java.lang.Object
  extended by HiRISE.HiCat.Utilities.Update_Mars_Year

public class Update_Mars_Year
extends Object

A simple class for updating the start and end times of the Mars years stored in the Mars_Year table in HiCat. This utility should probably be rerun whenever the SPICE leap seconds kernel is updated, although it probably won't make a huge difference.

To Do:

There are several additions in functionality that can potentially be added to this class:

Version:
1.4
Author:
Rodney Heyd UA/HiRISE

Field Summary
static String DEFAULT_CONFIGURATION_FILENAME
           
static String DEFAULT_LEAP_SECONDS_KERNEL
           
static int EXIT_COMMAND_LINE_SYNTAX_ERROR
           
static int EXIT_CONFIGURATION_ERROR
           
static int EXIT_DATABASE_ERROR
           
static int EXIT_SPICE_ERROR
           
static int EXIT_SUCCESS
           
static String ID
           
 
Method Summary
 String ephemerisTime2UTC(double et)
          A utility method that converts ephemeris time into a UTC date string in a format suitable for ingestion into HiCat.
static void main(String[] arguments)
          Main method that calls the class capabilities to update the Mars_Year table.
 void setUTCTimes(int year, double start_time_et, double end_time_et)
          This method updates a single set of UTC time fields in the database given the Mars year, and the start and end times for the year in ephemeris time.
 void updateMarsYearTable()
          Updates the UTC time fields in the Mars_Year table based on the values of the ephemeris time fields already in the table.
static void Usage()
          
 boolean verbose()
          Get the current verbose setting.
 void verbose(boolean verbose)
          Turn verbose mode on or off.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ID

public static final String ID
See Also:
Constant Field Values

DEFAULT_CONFIGURATION_FILENAME

public static final String DEFAULT_CONFIGURATION_FILENAME
See Also:
Constant Field Values

DEFAULT_LEAP_SECONDS_KERNEL

public static final String DEFAULT_LEAP_SECONDS_KERNEL
See Also:
Constant Field Values

EXIT_SUCCESS

public static final int EXIT_SUCCESS
See Also:
Constant Field Values

EXIT_CONFIGURATION_ERROR

public static final int EXIT_CONFIGURATION_ERROR
See Also:
Constant Field Values

EXIT_DATABASE_ERROR

public static final int EXIT_DATABASE_ERROR
See Also:
Constant Field Values

EXIT_SPICE_ERROR

public static final int EXIT_SPICE_ERROR
See Also:
Constant Field Values

EXIT_COMMAND_LINE_SYNTAX_ERROR

public static final int EXIT_COMMAND_LINE_SYNTAX_ERROR
See Also:
Constant Field Values
Method Detail

updateMarsYearTable

public void updateMarsYearTable()
                         throws Database_Exception
Updates the UTC time fields in the Mars_Year table based on the values of the ephemeris time fields already in the table.

Throws:
Database_Exception - if the database query or update operations fail
See Also:
setUTCTimes(int, double, double)

setUTCTimes

public void setUTCTimes(int year,
                        double start_time_et,
                        double end_time_et)
                 throws Database_Exception
This method updates a single set of UTC time fields in the database given the Mars year, and the start and end times for the year in ephemeris time.

Parameters:
year - - The Mars year to be updated
start_time_et - - the start time of the year in ephemeris time
end_time_et - - the end time of the year in ephemeris time
Throws:
Database_Exception - if the database update operation fails for any reason

ephemerisTime2UTC

public String ephemerisTime2UTC(double et)
A utility method that converts ephemeris time into a UTC date string in a format suitable for ingestion into HiCat.

Parameters:
et -
Returns:
a UTC date string

verbose

public void verbose(boolean verbose)
Turn verbose mode on or off.

Parameters:
verbose - if set to true, status information will be sent to stdout as records are processed, when set to off no output will be generated unless an error occurs.

verbose

public boolean verbose()
Get the current verbose setting.

Returns:
a boolean, if true verbose is on.

main

public static void main(String[] arguments)
Main method that calls the class capabilities to update the Mars_Year table. Command line syntax information is provided in Usage() method.

Exit Status Values

0 - Success
1 - Configuration Error
2 - Database Error
3 - SPICE Error
4 - Command Line Syntax Error

Parameters:
arguments - Array of command line arguments

Usage

public static void Usage()

Usage: Update_Mars_Year <Options>
  Options -
    [-Configuration <filename>]
    [-Verbose]
    [-Help]

Description

This utility is for updating the UTC start and end times of the Mars Years listed in the Mars_Year table in HiCat.

Options


HiRISE

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