public class State_File
extends java.lang.Object
This class is not a complete implementation of the state file specification. In particular, it lacks the "output" components (IPTF, IEXCL, DAYV, and ROLLP).
Modifier and Type | Class and Description |
---|---|
static class |
State_File.Comparator
A comparator for state files.
|
static class |
State_File.Directories
A set of directory absolute pathnames.
|
static class |
State_File.Validation_Exception
An exception for reporting problems with the verification of a state file's
data.
|
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
APPLICATION_GROUP
The application group for state file parameters.
|
static java.lang.String |
DEFAULT_DLINK_DIRECTORY |
static java.lang.String |
DEFAULT_EXCL_DIRECTORY |
static java.lang.String |
DEFAULT_LSK_DIRECTORY |
static java.lang.String |
DEFAULT_OPTG_DIRECTORY |
static java.lang.String |
DEFAULT_PCK_DIRECTORY |
static java.lang.String |
DEFAULT_ROLL_DIRECTORY |
static java.lang.String |
DEFAULT_SCLK_DIRECTORY |
static java.lang.String |
DEFAULT_SPK_DIRECTORY |
static java.lang.String |
DEFAULT_STATE_FILE_DIRECTORY
The default location for MRO state files on the HiROC filesystem.
|
static java.lang.String |
DLINK_DIRECTORY |
static java.lang.String |
EXCL_DIRECTORY |
static java.lang.String |
ID
Class identification name with source code version and date.
|
static java.util.regex.Pattern |
LONG_STATE_FILENAME
The pattern describing the filenames of long MRO state files, which cover a
two-week period.
|
static java.lang.String |
LSK_DIRECTORY |
static java.lang.String |
MRO_SPK_REGEX
The spacecraft ephemeris filename pattern.
|
static java.lang.String |
OPTG_DIRECTORY |
static java.lang.String |
PCK_DIRECTORY |
static java.lang.String |
PLANETARY_SPK_REGEX
The planetary ephemeris filename pattern.
|
static java.lang.String |
ROLL_DIRECTORY |
static java.lang.String |
SCLK_DIRECTORY |
static java.util.regex.Pattern |
SHORT_STATE_FILENAME
The pattern describing the filenames of short MRO state files, which cover
a one-week period.
|
static java.lang.String |
SPK_DIRECTORY |
static java.lang.String |
STATE_FILE_DIRECTORY |
Constructor and Description |
---|
State_File(java.io.File file)
Creates a new state file from an input file.
|
State_File(java.lang.String filename)
Creates a new state file from an input filename.
|
Modifier and Type | Method and Description |
---|---|
boolean |
covers(double et)
Determines whether this state file contains data for the given ephemeris
time.
|
java.lang.Double |
getBegEt() |
java.lang.Integer |
getCommentOrbitMax()
Gets the allowed maximum orbit from the state file.
|
java.lang.Integer |
getCommentOrbitMin()
Gets the allowed minimum orbit from the state file.
|
java.lang.String |
getDlinkPathname() |
java.lang.Double |
getEndEt() |
java.util.List<java.lang.String> |
getExclPathnames() |
java.lang.String |
getFilename() |
java.lang.String |
getLskPathname() |
java.lang.String |
getMroSpkPathname()
Gets the MRO SPK pathname.
|
java.lang.String |
getOptgPathname() |
java.lang.String |
getPckPathname() |
java.lang.String |
getPlanetarySpkPathname()
Gets the planetary SPK pathname.
|
java.util.List<java.lang.String> |
getPtfPathnames() |
java.lang.String |
getRollPathname() |
java.lang.String |
getSclkPathname() |
java.util.List<java.lang.String> |
getSpkPathnames() |
java.lang.Double |
getStartEt()
An alias for getBegEt().
|
static java.util.List<State_File> |
getStateFiles() |
static java.util.List<State_File> |
getStateFiles(PIRL.Configuration.Configuration configuration) |
static java.util.List<State_File> |
getStateFiles(java.lang.String stateFileDirectory) |
java.util.List<java.lang.String> |
getStates() |
static void |
main(java.lang.String... args)
Invokes a state file demo application.
|
static State_File |
synthesizeFromPtf(java.lang.String ptfPathname,
PIRL.Configuration.Configuration configuration) |
public static final java.lang.String ID
public static final java.lang.String PLANETARY_SPK_REGEX
public static final java.lang.String MRO_SPK_REGEX
public static final java.lang.String APPLICATION_GROUP
public static final java.lang.String STATE_FILE_DIRECTORY
public static final java.lang.String DEFAULT_STATE_FILE_DIRECTORY
getStateFiles(String)
method if no other directory name is supplied.public static final java.lang.String LSK_DIRECTORY
public static final java.lang.String DEFAULT_LSK_DIRECTORY
public static final java.lang.String SCLK_DIRECTORY
public static final java.lang.String DEFAULT_SCLK_DIRECTORY
public static final java.lang.String PCK_DIRECTORY
public static final java.lang.String DEFAULT_PCK_DIRECTORY
public static final java.lang.String SPK_DIRECTORY
public static final java.lang.String DEFAULT_SPK_DIRECTORY
public static final java.lang.String OPTG_DIRECTORY
public static final java.lang.String DEFAULT_OPTG_DIRECTORY
public static final java.lang.String EXCL_DIRECTORY
public static final java.lang.String DEFAULT_EXCL_DIRECTORY
public static final java.lang.String ROLL_DIRECTORY
public static final java.lang.String DEFAULT_ROLL_DIRECTORY
public static final java.lang.String DLINK_DIRECTORY
public static final java.lang.String DEFAULT_DLINK_DIRECTORY
public static final java.util.regex.Pattern SHORT_STATE_FILENAME
public static final java.util.regex.Pattern LONG_STATE_FILENAME
public State_File(java.io.File file) throws Invalid_Argument_Exception, java.io.IOException, State_File.Validation_Exception
The file argument cannot be null.
file
- the file from which to create the state file.Invalid_Argument_Exception
- if file is null.java.io.IOException
- if the file cannot be read.State_File.Validation_Exception
- if the state file contents are not valid.public State_File(java.lang.String filename) throws Invalid_Argument_Exception, java.io.IOException, State_File.Validation_Exception
The filename argument cannot be null or empty.
filename
- the name of the file from which to create the state file.Invalid_Argument_Exception
- if filename is null or
empty.java.io.IOException
- if an unknown IO problem develops.State_File.Validation_Exception
- if the state file contents are not valid.public java.lang.String getFilename()
public java.lang.String getPckPathname()
public java.lang.String getLskPathname()
public java.util.List<java.lang.String> getSpkPathnames()
public java.lang.String getMroSpkPathname()
MRO_SPK_REGEX
to determine which of the SPKs in getSpkPathnames()
is the MRO SPK; failing that, it blindly uses the first
in the list.public java.lang.String getPlanetarySpkPathname()
PLANETARY_SPK_REGEX
to determine which of the SPKs in getSpkPathnames()
is the planetary SPK; failing that, it blindly uses the
second in the list.public java.lang.String getOptgPathname()
public java.lang.String getSclkPathname()
public java.lang.String getRollPathname()
public java.util.List<java.lang.String> getExclPathnames()
public java.lang.String getDlinkPathname()
public java.util.List<java.lang.String> getPtfPathnames()
public java.lang.Double getBegEt()
public java.lang.Double getStartEt()
public java.lang.Double getEndEt()
public java.util.List<java.lang.String> getStates()
public java.lang.Integer getCommentOrbitMin()
This value is extracted from a comment in the JPL POST-produced state files, which exists outside the scope of the state file interface specification. It therefore is not perfectly reliable and is not even guaranteed to exist or actually be valid.
The comment is of the following form:
### Allowed orbits: 16113 through 16291
If the comment is not found in the file, or if one of the orbits is not an integer, or if the minimum is greater than the maximum, this method returns a null
getCommentOrbitMax()
public java.lang.Integer getCommentOrbitMax()
This value is extracted from a comment in the JPL POST-produced state files, which exists outside the scope of the state file interface specification. It therefore is not perfectly reliable and is not even guaranteed to exist or actually be valid.
The comment is of the following form:
### Allowed orbits: 16113 through 16291
If the comment is not found in the file, or if one of the orbits is not an integer, or if the minimum is greater than the maximum, this method returns a null
getCommentOrbitMin()
public boolean covers(double et)
et
- the time in question.public static java.util.List<State_File> getStateFiles(java.lang.String stateFileDirectory) throws java.io.FileNotFoundException
java.io.FileNotFoundException
public static java.util.List<State_File> getStateFiles(PIRL.Configuration.Configuration configuration) throws java.io.FileNotFoundException
java.io.FileNotFoundException
public static java.util.List<State_File> getStateFiles() throws java.io.FileNotFoundException
java.io.FileNotFoundException
public static State_File synthesizeFromPtf(java.lang.String ptfPathname, PIRL.Configuration.Configuration configuration) throws java.io.FileNotFoundException, java.io.IOException, SPICE_Exception
java.io.FileNotFoundException
java.io.IOException
SPICE_Exception
public static void main(java.lang.String... args)
args
- state file pathnames.Copyright \ (C) Arizona Board of Regents on behalf of the \ Planetary Image Research Laboratory, Lunar and \ Planetary Laboratory at the University of Arizona