public class Cycle
extends java.lang.Object
A class for working with cycle information. Essentially this class is just a structure for holding different pieces of information related to an MRO planning cycle. In addition, the utility has the ability to load cycle information from a state file or from the database given a cycle. And finally, the class has a method for "incrementing" from one cycle to the next based on the settings of the current cycle object. It should be noted that the incremented values are only estimates and should not be used in cases where it is critical for these values to be precise.
Note: The methods related to the use of state files have been deprecated. There is no longer a need to use the state file as a source of cycle information, this has been replaced with the use of the Cycle_Lister and Cycle_Editor classes.
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
DEFAULT_CIPP_VALUE |
static int |
DEFAULT_CYCLE_ID
Default values used when creating a new cycle object.
|
static double |
DEFAULT_END_LSUBS |
static int |
DEFAULT_END_ORBIT
Default values used when creating a new cycle object.
|
static double |
DEFAULT_END_TIME |
static java.lang.String |
DEFAULT_HITS_VALUE |
static double |
DEFAULT_START_LSUBS |
static int |
DEFAULT_START_ORBIT
Default values used when creating a new cycle object.
|
static double |
DEFAULT_START_TIME |
static int |
DEFAULT_STATE_FILE_VERSION
Default values used when creating a new cycle object.
|
static java.lang.String |
ID
Class identifier
|
static java.lang.String |
SPICE_TO_DB_TIME_FORMAT_STRING
This is the format string passed to JSPICE to convert ephemeris time into
a time format recognized by the database server.
|
Constructor and Description |
---|
Cycle()
Create a new cycle object with default values.
|
Cycle(int cycle_id)
Create a new cycle given a cycle id.
|
Modifier and Type | Method and Description |
---|---|
java.lang.String |
CIPP()
Get the CIPP supporting this cycle.
|
void |
CIPP(java.lang.String cipp_id)
Set the CIPP supporting this cycle.
|
boolean |
Cycle_Data_Confirmed() |
void |
Cycle_Data_Confirmed(boolean confirmation) |
int |
Cycle_ID()
Retrieve the cycle id of the cycle
|
void |
Cycle_ID(int cycle_id)
Sets the cycle id of the cycle object
|
double |
End_LsubS()
Retrieve the solar longitude (LS) at the end of the cycle.
|
void |
End_LsubS(double lsubs)
Set the solar longitude at the end of the cycle.
|
int |
End_Orbit()
Retrieve the ending orbit of the cycle
|
void |
End_Orbit(int end_orbit)
Set the ending orbit of the cycle.
|
double |
End_Time()
Deprecated.
|
void |
End_Time(double end_time)
Deprecated.
|
java.lang.String |
Ephem_Time_To_DB_Time(double ephemeris_time)
Convert ephemeris time to a format suitable for ingestion into a database.
|
PIRL.Database.Database |
Get_Database() |
java.lang.String |
HiTS()
Get the HiTS setting for this cycle.
|
void |
HiTS(java.lang.String hits_id)
Set the HiTS for this cycle.
|
Cycle |
Increment_Cycle()
Increment the current cycle to the next successive cycle.
|
boolean |
Is_Preliminary()
Indicates if the cycle information is "preliminary." Essentially a cycle
is considered preliminary if the state file has been designated preliminary
or if the cycle information was derived from a previous cycle via the
Increment_Cycle() method. |
void |
Load_Cycle_Data_From_Database(int cycle_id)
Load information about a give a cycle from a database.
|
void |
Load_Cycle_Data_From_State_File(java.lang.String state_filename)
Deprecated.
There is no longer a need to work with state files in this class
|
void |
Load_Data_From_State_File()
Deprecated.
All methods involving state files are deprecated since the Orbits
table in the database now contains the information that would be retrieved
from a state file.
|
void |
Set_Database(PIRL.Database.Database database,
java.lang.String catalog) |
void |
setStandDownCycle(boolean standDown) |
boolean |
standDownCycle() |
double |
Start_LsubS()
Retrieve the solar longitude (LS) at the start of the cycle.
|
void |
Start_LsubS(double lsubs)
Set the solar longitude (LS) at the beginning of the cycle.
|
int |
Start_Orbit()
Retrieve the starting orbit of the cycle
|
void |
Start_Orbit(int start_orbit)
Set the starting orbit of the cycle
|
java.util.Date |
Start_Time()
Deprecated.
|
void |
Start_Time(double start_time)
Deprecated.
|
int |
State_File_Version()
Deprecated.
|
void |
State_File_Version(int version)
Deprecated.
|
java.lang.String |
State_File()
Deprecated.
|
void |
State_File(java.lang.String filename)
Deprecated.
|
void |
Update_DB()
Given a Database object and a catalog, this method with write the parameters
for a cycle to a database containing a Cycle_map table.
|
public static final java.lang.String ID
public static final java.lang.String SPICE_TO_DB_TIME_FORMAT_STRING
public static final java.lang.String DEFAULT_CIPP_VALUE
public static final java.lang.String DEFAULT_HITS_VALUE
public static final int DEFAULT_CYCLE_ID
public static final int DEFAULT_START_ORBIT
public static final int DEFAULT_END_ORBIT
public static final int DEFAULT_STATE_FILE_VERSION
public static final double DEFAULT_START_TIME
public static final double DEFAULT_END_TIME
public static final double DEFAULT_START_LSUBS
public static final double DEFAULT_END_LSUBS
public Cycle()
public Cycle(int cycle_id)
Load_Cycle_Data_From_Database(int)
or
Load_Cycle_Data_From_State_File(String)
, in which case the input
cycle_id will be over-written by the load operation.cycle_id
- public void Load_Data_From_State_File() throws java.io.FileNotFoundException, Invalid_Argument_Exception, java.io.IOException, State_File.Validation_Exception
State_File(String)
method.java.io.FileNotFoundException
Invalid_Argument_Exception
java.io.IOException
State_File.Validation_Exception
Load_Cycle_Data_From_State_File(String state_filename)
public void Load_Cycle_Data_From_State_File(java.lang.String state_filename) throws java.io.FileNotFoundException, java.io.IOException, State_File.Validation_Exception
state_filename
- - the state file containing the cycle information.java.io.FileNotFoundException
- if the state file does not existjava.io.IOException
- if the state file can not be readState_File.Validation_Exception
- if the information in the state file can't be validatedpublic void Load_Cycle_Data_From_Database(int cycle_id) throws PIRL.Database.Database_Exception
cycle_id
- - the cycle number to retrieve information for.PIRL.Database.Database_Exception
- - if a problem with retrieving database information occurs.SPICE_Exception
- - if a problem occurs doing any of the time conversionspublic Cycle Increment_Cycle()
Cycle_ID()
by one, and then extrapolating the ranges of the next cycle
based on the ranges of the current cycle.public java.lang.String Ephem_Time_To_DB_Time(double ephemeris_time)
ephemeris_time
- - the ephemeris time to convertpublic void Update_DB() throws PIRL.Database.Database_Exception
PIRL.Database.Database_Exception
- - if an error occurrs trying to access the database.public boolean Is_Preliminary()
Increment_Cycle()
method.public int Cycle_ID()
public void Cycle_ID(int cycle_id)
cycle_id
- - an integerpublic java.util.Date Start_Time()
public void Start_Time(double start_time)
start_time
- the value of the ephemeris time at the start of the cycle.public double End_Time()
public void End_Time(double end_time)
end_time
- the double value of the ephemeris timepublic int Start_Orbit()
public void Start_Orbit(int start_orbit)
start_orbit
- the integer value of the starting orbitpublic int End_Orbit()
public void End_Orbit(int end_orbit)
end_orbit
- an integer value indicating the orbit the cycle ends on.public double Start_LsubS()
public void Start_LsubS(double lsubs)
lsubs
- the solar longitude should be a double precision valuepublic double End_LsubS()
public void End_LsubS(double lsubs)
lsubs
- the solar longitude should be a double precision numberpublic java.lang.String State_File()
Increment_Cycle()
method).public void State_File(java.lang.String filename)
filename
- the state file, including the full path on the file system.public int State_File_Version()
public void State_File_Version(int version)
version
- public void HiTS(java.lang.String hits_id)
hits_id
- - An identifier of the HiTS supporting this cycle.public java.lang.String HiTS()
public void CIPP(java.lang.String cipp_id)
cipp_id
- - An identifier of the CIPP supporting this cycle.public java.lang.String CIPP()
public boolean standDownCycle()
public void setStandDownCycle(boolean standDown)
public boolean Cycle_Data_Confirmed()
public void Cycle_Data_Confirmed(boolean confirmation)
public void Set_Database(PIRL.Database.Database database, java.lang.String catalog)
public PIRL.Database.Database Get_Database()
Copyright \ (C) Arizona Board of Regents on behalf of the \ Planetary Image Research Laboratory, Lunar and \ Planetary Laboratory at the University of Arizona