public class Observation_ID
extends java.lang.Object
The ID is a 32-bit number that uniquely identifies every HiRISE observation, and it is carried along with the observation from the planning stage all the way through to the final released data product. The ID has two forms: a numeric, binary representation as an unsigned 32-bit integer and a text representation more easily parsed by a human. The latter form is used, for example, in HiRISE observation filenames.
Information about an observation is encoded in the
Observation_ID
as a set of bitfields, with a total of 32 bits
per ID. We define the following: bit 0 is the bit that controls whether the
integer is even or odd. If bit 0 of an integer is 0, then the integer is
even. If bit 0 is 1, then the integer is odd. Bit 1 is the next bit, and so
on.
There are two different interpretations of the Observation_ID
's
bitfields. The first is for pre-Mars orbit observations ("pre-orbit"). These
observations are acquired during the period of time from initial integration
and testing at the instrument's manufacturing facility to Mars approach and
insertion. The second interpretation is for observations while the Mars
Reconnaissance Orbiter (MRO) is in orbit around Mars, from initial
aerobraking to the late-mission relay phase and beyond.
The two forms share the top five bits, which identify the mission phase for
the observation. A set of integer constants is used to represent the phases.
Most of the Mission_Phase
values are reserved for future use.
The following table outlines the various phases:
Mission_Phase | Mission_Phase Text |
---|---|
INTEGRATION_AND_TESTING |
INT |
CALIBRATION |
CAL |
ATLO |
ATL |
KENNEDY_SPACE_CENTER |
KSC |
LAUNCH |
LAU |
CRUISE |
CRU |
APPROACH |
APR |
AEROBRAKING |
AEB |
TRANSITION |
TRA |
PRIMARY_SCIENCE_PHASE |
PSP |
RELAY |
REL |
EXTENDED_SCIENCE_PHASE |
ESP |
RESERVED_1 |
R01 |
RESERVED_2 |
R02 |
RESERVED_3 |
R03 |
RESERVED_4 |
R04 |
RESERVED_5 |
R05 |
RESERVED_6 |
R06 |
RESERVED_7 |
R07 |
RESERVED_8 |
R08 |
RESERVED_9 |
R09 |
RESERVED_10 |
R10 |
RESERVED_11 |
R11 |
RESERVED_12 |
R12 |
RESERVED_13 |
R13 |
RESERVED_14 |
R14 |
RESERVED_15 |
R15 |
RESERVED_16 |
R16 |
RESERVED_17 |
R17 |
RESERVED_18 |
R18 |
RESERVED_19 |
R19 |
SVT |
SVT |
A pre-orbit Observation_ID
has two fields:
Mission_Phase
and Time
. These fields are broken
down in the following table:
Bit Range | Count | Parameter |
---|---|---|
27-31 | 5 | Mission_Phase |
0-26 | 27 | Time |
The Time
field holds the number of seconds that have passed
since the HiRISE EPOCH
, which is January 1, 2004, 00:00:00.
Time
is UTC-based.
The text representation for a pre-orbit Observation_ID
is as
follows:
PPP_yyyymmddTHHMMSS
PPP
- Mission_Phase
text
yymmdd_HHMMSS
- Time
yyyy
- year
mm
- month
dd
- day of month
T
- (marker)
HH
- hour (24-hour clock)
MM
- minute
SS
- second
An in-orbit Observation_ID
has three fields:
Mission_Phase
, Orbit_Number
, and
Target
. These fields are broken down in the following table:
Bit Range | Count | Parameter |
---|---|---|
27-31 | 5 | Mission_Phase |
10-26 | 17 | Orbit_Number |
0-9 | 10 | Target |
Orbit_Number
begins at 0 with the first aerobraking orbit and
continues to increase until end-of-mission.
Target
identifies the target at which the instrument is pointed
for a given observation. With 10 bits assigned to Target
, there
are 1024 possible Target
numbers.
The text representation for an in-orbit Observation_ID
is as
follows:
PPP_NNNNNN_TTTT
PPP
- Mission_Phase
text
NNNNNN
- Orbit_Number
(zero-padded)
TTTT
- Target
(zero-padded)
The text representation of the Target
number is defined as
follows: Values between 0000 and 3595, inclusive, reflect the central
latitude of the observation to within a half-degree, multiplied by 10.
(0905, for example, is thus a latitude of 90.5 degrees.) 0.0 degrees is the
night-side equator, which is where the orbit number increments. 90.0 south
pole on the ascending pass. 180.0 is the day-side equator on the ascending
pass. 270.0 is the north pole on the descending pass.
Text values between 9000 and 9303, inclusive, represent off-planet targets such as Phobos, Deimos, or stars.
For any numeric Target
representation N (0...1023,
inclusive), the text represenation T is defined as follows:
N | T |
---|---|
0 <= N < 720 | T = N x 5 |
720 <= N <= 1023 | T = 8280 + N |
The conversion is easily reversible, although T is discontinuous.
The SVT phase is a special case mission phase. It is used to represent images taken during ATLO sequence verification tests (SVTs) that are designed to simulate in-orbit observation conditions. In all ways, the SVT phase is therefore treated as an in-orbit phase, although it will never actually be used while in orbit around Mars.
(...)
Modifier and Type | Field and Description |
---|---|
static int |
AEROBRAKING
The aerobraking mission phase.
|
static int |
APPROACH
The approach mission phase.
|
static int |
ATLO
The assembly, test, and launch operations mission phase.
|
static int |
CALIBRATION
The calibration mission phase.
|
protected static java.lang.String |
CPMM_AND_CHANNEL_PATTERN |
static int |
CRUISE
The cruise mission phase.
|
static int |
DEFAULT_INORBIT_PHASE
The default mission phase for in-orbit observations.
|
static int |
DEFAULT_MISSION_PHASE
The default mission phase.
|
static int |
DEFAULT_OBSERVATION_ID
The default
Observation_ID value. |
static int |
DEFAULT_ORBIT_NUMBER
The default value for the
Orbit_Number component of an in-orbit
Observation_ID . |
static int |
DEFAULT_PREORBIT_PHASE
The default mission phase for pre-orbit observations.
|
static int |
DEFAULT_TARGET
The default value for the
Target component of an in-orbit
Observation_ID . |
static int |
DEFAULT_TIME
The default value for the
Time component of a pre-orbit
Observation_ID . |
static java.lang.String |
DEFAULT_TIME_TEXT_FORMAT
The default text format for the
Time component of an
Observation_ID . |
protected static java.lang.String |
DELIMITER_PATTERN |
static int |
EPOCH
Reference date for Observation_ID pre-orbit times.
|
static int |
EXTENDED_SCIENCE_PHASE
The extended science mission phase.
|
static char |
EXTENSION_DELIMITER
An extension delimiter used in parsing
Observation_ID text. |
protected static java.lang.String |
EXTENSION_PATTERN |
protected static java.lang.String |
GAP_INDICATOR_PATTERN |
static java.lang.String |
ID
Class identification name with source code version and date.
|
protected static int |
INORBIT_MISSION_PHASE_GROUP |
protected static int |
INORBIT_ORBIT_NUMBER_GROUP |
protected static int |
INORBIT_PREFIX_GROUP |
protected static int |
INORBIT_SUFFIX_GROUP |
protected static int |
INORBIT_TARGET_GROUP |
protected static java.lang.String |
INSTRUMENT_ID_PATTERN |
static int |
INTEGRATION_AND_TESTING
The integreation and testing mission phase.
|
static int |
INVALID_OBSERVATION_ID
The invalid
Observation_ID value. |
static java.lang.String |
JPL_TIME_TEXT_FORMAT
The JPL format for the text representation of time.
|
static int |
KENNEDY_SPACE_CENTER
The Kennedy Space Center mission phase.
|
static int |
LAST_PREORBIT_PHASE
The last pre-orbit mission phase.
|
static int |
LAUNCH
The launch mission phase.
|
static java.lang.String[] |
MISSION_PHASE_ABBREVIATION
The three-letter text representation of each mission phase, indexed by the
32 mission phase constants.
|
static int |
MISSION_PHASE_BIT_COUNT
The number of bits used for the
Mission_Phase component. |
static int |
MISSION_PHASE_MASK
The
Mission_Phase bitmask. |
static int |
MISSION_PHASE_MAX
The maximum value of the
Mission_Phase component. |
static int[] |
MISSION_PHASE_MAX_ORBIT
The orbit numbers associated with the mission phases.
|
static int[] |
MISSION_PHASE_MAX_TIME
The times/dates associated with the mission phases.
|
static java.lang.String[] |
MISSION_PHASE_NAME
The full descriptive name of each mission phase, indexed by the 32 mission
phase constants.
|
protected static java.lang.String |
MISSION_PHASE_PATTERN |
static int |
MISSION_PHASE_START
The index of the first
Mission_Phase bit. |
protected static java.lang.String |
OBSERVATION_ID_PATTERN |
protected static java.lang.String |
OPTIONAL_DELIMITER_PATTERN |
static int |
ORBIT_NUMBER_BIT_COUNT
The number of bits used for the
Orbit_Number in-orbit
component. |
static int |
ORBIT_NUMBER_MASK
The
Orbit_Number in-orbit component bitmask. |
static int |
ORBIT_NUMBER_MAX
The maximum value of the
Orbit_Number in-orbit component. |
static int |
ORBIT_NUMBER_MIN
The minimum value of the
Orbit_Number in-orbit component. |
protected static java.lang.String |
ORBIT_NUMBER_PATTERN |
static int |
ORBIT_NUMBER_START
The index of the first
Orbit_Number bit in an in-orbit ID. |
static java.lang.String |
PDS_TIME_TEXT_FORMAT
The PDS format for the text representation of time.
|
protected static java.lang.String |
PREFIX_PATTERN |
protected static int |
PREORBIT_MISSION_PHASE_GROUP |
protected static int |
PREORBIT_PREFIX_GROUP |
protected static int |
PREORBIT_SUFFIX_GROUP |
protected static int |
PREORBIT_TIME_GROUP |
static int |
PRIMARY_SCIENCE_PHASE
The primary science mission phase.
|
static int |
RELAY
The telecommunications relay mission phase.
|
protected static java.lang.String |
REQUIRED_DELIMITER_PATTERN |
static int |
RESERVED_1
A reserved mission phase.
|
static int |
RESERVED_10
A reserved mission phase.
|
static int |
RESERVED_11
A reserved mission phase.
|
static int |
RESERVED_12
A reserved mission phase.
|
static int |
RESERVED_13
A reserved mission phase.
|
static int |
RESERVED_14
A reserved mission phase.
|
static int |
RESERVED_15
A reserved mission phase.
|
static int |
RESERVED_16
A reserved mission phase.
|
static int |
RESERVED_17
A reserved mission phase.
|
static int |
RESERVED_18
A reserved mission phase.
|
static int |
RESERVED_19
A reserved mission phase.
|
static int |
RESERVED_2
A reserved mission phase.
|
static int |
RESERVED_3
A reserved mission phase.
|
static int |
RESERVED_4
A reserved mission phase.
|
static int |
RESERVED_5
A reserved mission phase.
|
static int |
RESERVED_6
A reserved mission phase.
|
static int |
RESERVED_7
A reserved mission phase.
|
static int |
RESERVED_8
A reserved mission phase.
|
static int |
RESERVED_9
A reserved mission phase.
|
protected static int |
RSDS_OPS_CPMM_AND_CHANNEL_GROUP |
protected static int |
RSDS_OPS_EXTENSION_GROUP |
protected static int |
RSDS_OPS_GAP_GROUP |
protected static int |
RSDS_OPS_INSTRUMENT_ID_GROUP |
protected static int |
RSDS_OPS_OBSERVATION_ID_GROUP |
protected static int |
RSDS_OPS_SPACECRAFT_ID_GROUP |
protected static int |
RSDS_OPS_VERSION_GROUP |
protected static int |
RSDS_TEST_CPMM_AND_CHANNEL_GROUP |
protected static int |
RSDS_TEST_EXTENSION_GROUP |
protected static int |
RSDS_TEST_GAP_GROUP |
protected static int |
RSDS_TEST_ID_GROUP |
protected static int |
RSDS_TEST_INSTRUMENT_ID_GROUP |
protected static int |
RSDS_TEST_OBSERVATION_ID_GROUP |
protected static int |
RSDS_TEST_SPACECRAFT_ID_GROUP |
protected static int |
RSDS_TEST_VERSION_GROUP |
static java.lang.String |
RSDS_TIME_TEXT_FORMAT
The RSDS format for the text representation of time.
|
protected static java.lang.String |
SPACECRAFT_ID_PATTERN |
protected static java.lang.String |
SUFFIX_PATTERN |
static int |
SVT
The sequence verification tests mission phase.
|
static int |
TARGET_BIT_COUNT
The number of bits used for the
Target in-orbit component. |
static int |
TARGET_MASK
The
Target in-orbit component bitmask. |
static int |
TARGET_MAX
The maximum value of the
Target in-orbit component. |
protected static java.lang.String |
TARGET_PATTERN |
static int |
TARGET_START
The index of the first
Target bit in an in-orbit ID. |
protected static java.lang.String |
TEST_ID_PATTERN |
static char |
TEXT_DELIMITER
A text delimiter used in parsing
Observation_ID text. |
static int |
TIME_BIT_COUNT
The number of bits used for the
Time pre-orbit component. |
static int |
TIME_MASK
The
Time pre-orbit component bitmask. |
static int |
TIME_MAX
The maximum value of the
Time pre-orbit component. |
protected static java.lang.String |
TIME_PATTERN |
static int |
TIME_START
The index of the first
Time bit in a pre-orbit ID. |
static int |
TOTAL_MISSION_PHASES
The total number of mission phases.
|
static int |
TRANSITION
The transition mission phase.
|
protected static java.lang.String |
VERSION_PATTERN |
Constructor and Description |
---|
Observation_ID()
|
Observation_ID(int value)
Creates an
Observation_ID with the specified value . |
Observation_ID(int the_mission_phase,
int the_time)
Creates a pre-orbit
Observation_ID with the specified
Mission_Phase and Time components. |
Observation_ID(int the_mission_phase,
int the_orbit_number,
int the_target)
Creates an in-orbit
Observation_ID with the specified
Mission_Phase , Orbit_Number , and
Target components. |
Observation_ID(java.lang.String the_id_text)
Creates an
Observation_ID based on a text string. |
Modifier and Type | Method and Description |
---|---|
static int |
extract_mission_phase(java.lang.String the_text)
Parses a
Mission_Phase component from a text String . |
static int |
extract_mission_phase(java.lang.String the_text,
boolean use_defaults)
Parses a
Mission_Phase component from a text String . |
static int |
extract_orbit_number(java.lang.String the_text)
Parses an
Orbit_Number in-orbit component from a text String . |
static int |
extract_orbit_number(java.lang.String the_text,
boolean use_defaults)
Parses an
Orbit_Number in-orbit component from a text String . |
static int |
extract_target(java.lang.String the_text)
Parses a
Target in-orbit component from a text String . |
static int |
extract_target(java.lang.String the_text,
boolean use_defaults)
Parses a
Target in-orbit component from a text String . |
static int |
extract_time(java.lang.String the_text)
Parses a
Time pre-orbit component from a text String . |
static int |
extract_time(java.lang.String the_text,
boolean use_defaults)
Parses a
Time pre-orbit component from a text String . |
Observation_ID |
hex_value(java.lang.String id_text)
Sets this
Observation_ID 's numeric value using a string
representing a hexidecimal 32-bit integer. |
Observation_ID |
hex_value(java.lang.String id_text,
boolean use_defaults)
Sets this
Observation_ID 's numeric value using a string
representing a hexadecimal 32-bit integer. |
boolean |
is_preorbit()
Returns
true if this Observation_ID is a pre-orbit
ID, false if not. |
Observation_ID |
mission_phase_from_orbit_number(int orbit_number)
Sets
Mission_Phase component given the orbit number. |
Observation_ID |
mission_phase_from_time(int seconds)
Sets
Mission_Phase component given the number of seconds
since the Observation_ID EPOCH. |
int |
mission_phase()
Gets the
Mission_Phase component of this
Observation_ID . |
Observation_ID |
mission_phase(int the_mission_phase)
Sets the
Mission_Phase component of this
Observation_ID . |
Observation_ID |
mission_phase(java.lang.String mission_phase_text)
Sets the
Mission_Phase component of this
Observation_ID from a string. |
Observation_ID |
mission_phase(java.lang.String mission_phase_text,
boolean use_defaults)
Sets the
Mission_Phase component of this
Observation_ID from a string. |
int |
orbit_number()
Gets the in-orbit
Orbit_Number component of this
Observation_ID . |
Observation_ID |
orbit_number(int the_orbit_number)
Sets the in-orbit
Orbit_Number component of this
Observation_ID . |
Observation_ID |
orbit_number(java.lang.String orbit_number_text)
Sets the in-orbit
Orbit_Number component of this
Observation_ID based on a text string. |
Observation_ID |
orbit_number(java.lang.String orbit_number_text,
boolean use_defaults)
Sets the in-orbit
Orbit_Number component of this
Observation_ID based on a text string. |
java.lang.String |
parse(java.lang.String the_text)
Sets the value of this
Observation_ID using a text
representation. |
java.lang.String |
parse(java.lang.String id_text,
boolean use_defaults)
Sets the value of this
Observation_ID using a text
representation. |
int |
target()
Gets the in-orbit
Target component of this
Observation_ID . |
Observation_ID |
target(int the_target)
Sets the in-orbit
Target component of this
Observation_ID . |
Observation_ID |
target(java.lang.String target_text)
Sets the in-orbit
Target component of this
Observation_ID based on an text string. |
Observation_ID |
target(java.lang.String target_text,
boolean use_defaults)
Sets the in-orbit
Target component of this
Observation_ID based on an text string. |
java.lang.String |
text()
Gets the text representation of this
Observation_ID . |
Observation_ID |
text(java.lang.String the_text)
Sets the value of this
Observation_ID using a text
representation. |
Observation_ID |
text(java.lang.String the_text,
boolean use_defaults)
Sets the value of this
Observation_ID using a text
representation. |
Observation_ID |
time_now()
Sets the pre-orbit
Time component of this
Observation_ID to the current time, as determined from the
system clock. |
static java.lang.String |
time_text_format()
Gets the format used for formatting and interpretting time text.
|
static void |
time_text_format(java.lang.String the_time_text_format)
Sets the format used for formatting and interpretting time text.
|
java.lang.String |
time_text(int time_in_seconds)
Produces a formatted text
String from an integer number of seconds
since the HiRISE EPOCH . |
java.lang.String |
time_text(int time_in_seconds,
int epoch)
Produces a formatted text
String from an integer number of seconds
since a given epoch. |
int |
time()
Gets the pre-orbit
Time component of this
Observation_ID . |
Observation_ID |
time(int the_time)
Sets the pre-orbit
Time component of this
Observation_ID . |
Observation_ID |
time(java.lang.String time_text)
Sets the pre-orbit
Time component of this
Observation_ID from a string. |
Observation_ID |
time(java.lang.String time_text,
boolean use_defaults)
Sets the pre-orbit
Time component of this
Observation_ID from a string. |
Observation_ID |
time(java.lang.String time_text,
java.lang.String time_text_format)
Sets the pre-orbit
Time component of this
Observation_ID from a string based on the specified
time_text_format . |
Observation_ID |
time(java.lang.String time_text,
java.lang.String time_text_format,
boolean use_defaults)
Sets the pre-orbit
Time component of this
Observation_ID from a string based on the specified
time_text_format . |
java.lang.String |
toString()
Produces the text representation of this
Observation_ID . |
int |
value()
Gets the 32-bit numeric value of this
Observation_ID . |
Observation_ID |
value(int value)
Sets the 32-bit numeric value of this
Observation_ID . |
Observation_ID |
value(java.lang.String id_text)
Sets this
Observation_ID 's numeric value using a string
representing a 32-bit integer. |
Observation_ID |
value(java.lang.String id_text,
boolean use_defaults)
Sets this
Observation_ID 's numeric value using a string
representing a 32-bit integer. |
static java.lang.String |
zero_pad_binary(long number,
int digits)
Returns a zero-padded text string of a number in base-2 (binary) notation.
|
static java.lang.String |
zero_pad_hex(long number,
int digits)
Returns a zero-padded text string of a number in base-16 (hexadecimal)
notation.
|
static java.lang.String |
zero_pad_number(long number,
int digits)
Returns a zero-padded text string of a number in base-10 (decimal) notation.
|
static java.lang.String |
zero_pad_number(long number,
int digits,
int radix)
Returns a zero-padded text string of a number in a given radix.
|
public static final java.lang.String ID
public static final int MISSION_PHASE_START
Mission_Phase
bit. Bits are indexed such
that bit 0 determines whether an integer is even or odd.public static final int MISSION_PHASE_BIT_COUNT
Mission_Phase
component.public static final int MISSION_PHASE_MAX
Mission_Phase
component.public static final int MISSION_PHASE_MASK
Mission_Phase
bitmask. Each bit involved in the
Mission_Phase
component is ON
; all others are
OFF
.public static final int TIME_START
Time
bit in a pre-orbit ID. Bits are
indexed such that bit 0 determines whether an integer is even or odd.public static final int TIME_BIT_COUNT
Time
pre-orbit component.public static final int TIME_MAX
Time
pre-orbit component.public static final int TIME_MASK
Time
pre-orbit component bitmask. Each bit involed in the
Time
component is ON
; all others are
OFF
.public static final int ORBIT_NUMBER_START
Orbit_Number
bit in an in-orbit ID. Bits
are indexed such that bit 0 determines whether an integer is even or odd.public static final int ORBIT_NUMBER_BIT_COUNT
Orbit_Number
in-orbit
component.public static final int ORBIT_NUMBER_MIN
Orbit_Number
in-orbit component.public static final int ORBIT_NUMBER_MAX
Orbit_Number
in-orbit component.public static final int ORBIT_NUMBER_MASK
Orbit_Number
in-orbit component bitmask. Each bit involved
in the Orbit_Number
is ON
; all others are
OFF
.public static final int TARGET_START
Target
bit in an in-orbit ID. Bits are
indexed such that bit 0 determines whether an integer is even or odd.public static final int TARGET_BIT_COUNT
Target
in-orbit component.public static final int TARGET_MAX
Target
in-orbit component.public static final int TARGET_MASK
Target
in-orbit component bitmask. Each bit involved in the
Target
is ON
; all others are OFF
.public static final java.lang.String DEFAULT_TIME_TEXT_FORMAT
Time
component of an
Observation_ID
. This format produces dates of the following
form, using March 17, 2005, at 11:15 and 45 seconds in the evening as an
example: 20050317T111545.public static final java.lang.String PDS_TIME_TEXT_FORMAT
public static final java.lang.String RSDS_TIME_TEXT_FORMAT
public static final java.lang.String JPL_TIME_TEXT_FORMAT
public static final int INTEGRATION_AND_TESTING
public static final int CALIBRATION
public static final int ATLO
public static final int KENNEDY_SPACE_CENTER
public static final int LAUNCH
public static final int CRUISE
public static final int APPROACH
public static final int AEROBRAKING
public static final int TRANSITION
public static final int PRIMARY_SCIENCE_PHASE
public static final int RELAY
Note: This mission phase name has been abandoned by the MRO project.
It has been renamed Extended Science Phase
.
We maintain this phase, Relay, for backwards compatibility with applications
that expect it to exist.
public static final int EXTENDED_SCIENCE_PHASE
Primary Science Phase
. It is
an continuation of PSP and is part of the nominal MRO mission; it is not
to be confused with an extended mission phase.
The Extended Science Phase was forerly called Relay
, but the
latter was abandoned in favor of a more accurate term.
public static final int RESERVED_1
public static final int RESERVED_2
public static final int RESERVED_3
public static final int RESERVED_4
public static final int RESERVED_5
public static final int RESERVED_6
public static final int RESERVED_7
public static final int RESERVED_8
public static final int RESERVED_9
public static final int RESERVED_10
public static final int RESERVED_11
public static final int RESERVED_12
public static final int RESERVED_13
public static final int RESERVED_14
public static final int RESERVED_15
public static final int RESERVED_16
public static final int RESERVED_17
public static final int RESERVED_18
public static final int RESERVED_19
public static final int SVT
public static final int TOTAL_MISSION_PHASES
public static final int LAST_PREORBIT_PHASE
public static final int DEFAULT_PREORBIT_PHASE
public static final int DEFAULT_INORBIT_PHASE
public static final int DEFAULT_MISSION_PHASE
public static final java.lang.String[] MISSION_PHASE_ABBREVIATION
Observation_ID
.public static final java.lang.String[] MISSION_PHASE_NAME
Observation_ID
, but they are used in
exception messages, and they may be suitable for other uses as well. A
JComboBox
that presents the individual mission phases
might use this array, for example.public static final int[] MISSION_PHASE_MAX_TIME
public static final int[] MISSION_PHASE_MAX_ORBIT
public static final int INVALID_OBSERVATION_ID
Observation_ID
value.public static final int DEFAULT_OBSERVATION_ID
Observation_ID
value.public static final int DEFAULT_TIME
Time
component of a pre-orbit
Observation_ID
.public static final int DEFAULT_ORBIT_NUMBER
Orbit_Number
component of an in-orbit
Observation_ID
.public static final int DEFAULT_TARGET
Target
component of an in-orbit
Observation_ID
.public static final char TEXT_DELIMITER
Observation_ID
text.public static final char EXTENSION_DELIMITER
Observation_ID
text.public static final int EPOCH
protected static final java.lang.String DELIMITER_PATTERN
protected static final java.lang.String REQUIRED_DELIMITER_PATTERN
protected static final java.lang.String OPTIONAL_DELIMITER_PATTERN
protected static final java.lang.String PREFIX_PATTERN
protected static final java.lang.String SUFFIX_PATTERN
protected static final java.lang.String MISSION_PHASE_PATTERN
protected static final java.lang.String TIME_PATTERN
protected static final java.lang.String ORBIT_NUMBER_PATTERN
protected static final java.lang.String TARGET_PATTERN
protected static final int PREORBIT_PREFIX_GROUP
protected static final int PREORBIT_MISSION_PHASE_GROUP
protected static final int PREORBIT_TIME_GROUP
protected static final int PREORBIT_SUFFIX_GROUP
protected static final int INORBIT_PREFIX_GROUP
protected static final int INORBIT_MISSION_PHASE_GROUP
protected static final int INORBIT_ORBIT_NUMBER_GROUP
protected static final int INORBIT_TARGET_GROUP
protected static final int INORBIT_SUFFIX_GROUP
protected static final java.lang.String TEST_ID_PATTERN
protected static final java.lang.String SPACECRAFT_ID_PATTERN
protected static final java.lang.String INSTRUMENT_ID_PATTERN
protected static final java.lang.String OBSERVATION_ID_PATTERN
protected static final java.lang.String CPMM_AND_CHANNEL_PATTERN
protected static final java.lang.String GAP_INDICATOR_PATTERN
protected static final java.lang.String VERSION_PATTERN
protected static final java.lang.String EXTENSION_PATTERN
protected static final int RSDS_OPS_SPACECRAFT_ID_GROUP
protected static final int RSDS_OPS_INSTRUMENT_ID_GROUP
protected static final int RSDS_OPS_OBSERVATION_ID_GROUP
protected static final int RSDS_OPS_CPMM_AND_CHANNEL_GROUP
protected static final int RSDS_OPS_GAP_GROUP
protected static final int RSDS_OPS_VERSION_GROUP
protected static final int RSDS_OPS_EXTENSION_GROUP
protected static final int RSDS_TEST_ID_GROUP
protected static final int RSDS_TEST_SPACECRAFT_ID_GROUP
protected static final int RSDS_TEST_INSTRUMENT_ID_GROUP
protected static final int RSDS_TEST_OBSERVATION_ID_GROUP
protected static final int RSDS_TEST_CPMM_AND_CHANNEL_GROUP
protected static final int RSDS_TEST_GAP_GROUP
protected static final int RSDS_TEST_VERSION_GROUP
protected static final int RSDS_TEST_EXTENSION_GROUP
public Observation_ID()
public Observation_ID(int value)
Observation_ID
with the specified value
.value
- the numeric value of the new Observation_ID
.public Observation_ID(int the_mission_phase, int the_time)
Observation_ID
with the specified
Mission_Phase
and Time
components. If
the_mission_phase
is not a pre-orbit mission phase, DEFAULT_PREORBIT_PHASE
will be used instead. If the_time
is
less than 0, the current time, as determined from the system clock, will be
used. If the_time
is greater than TIME_MAX
, DEFAULT_TIME
will be used instead.the_mission_phase
- the pre-orbit mission phase for the new
Observation_ID
.the_time
- the Time
component for the new
Observation_ID
.public Observation_ID(int the_mission_phase, int the_orbit_number, int the_target)
Observation_ID
with the specified
Mission_Phase
, Orbit_Number
, and
Target
components. If the_mission_phase
is not an
in-orbit mission phase, DEFAULT_INORBIT_PHASE
will be used instead.
If the_orbit_number
is less than 0 or greater than ORBIT_NUMBER_MAX
, DEFAULT_ORBIT_NUMBER
will be used instead. If
the_target
is less than 0 or greater than TARGET_MAX
,
DEFAULT_TARGET
will be used instead.the_mission_phase
- The in-orbit mission phase for the new
Observation_ID
.the_orbit_number
- The Orbit_Number
component for the
new Observation_ID
.the_target
- The Target
component for the new
Observation_ID
.public Observation_ID(java.lang.String the_id_text)
Observation_ID
based on a text string. If the text
string cannot be interpretted as a valid Observation_ID
, INVALID_OBSERVATION_ID
will be used instead.public int value()
Observation_ID
. Because
the Java language does not support an unsigned 32-bit integer primitive data
type, some care may be needed before displaying this numeric value to an
operator.Observation_ID
.public Observation_ID value(int value)
Observation_ID
.value
- The new 32-bit value of this Observation_ID
.Observation_ID
.public Observation_ID value(java.lang.String id_text, boolean use_defaults) throws Invalid_Argument_Exception
Observation_ID
's numeric value using a string
representing a 32-bit integer. If id_text
cannot be parsed
for a valid observation ID, an Invalid_Argument_Exception
is thrown.
If use_defaults
is true
, the
DEFAULT_OBSERVATION_ID
will be used instead.id_text
- The text from which the Observation_ID's new value
will be parsed. It must be an 32-bit integer.
It may be zero-padded.use_defaults
- If true
, DEFAULT_OBSERVATION_ID
will be used if the value cannot be parsed;
otherwise, an Invalid_Argument_Exception
will be thrown.Observation_ID
.Invalid_Argument_Exception
- If no valid value can be parsed
from the argument.public Observation_ID value(java.lang.String id_text)
Observation_ID
's numeric value using a string
representing a 32-bit integer. This method calls value(String,boolean)
with
use_defaults
set to true
.id_text
- The text from which the Observation_ID's new value
will be parsed. It must be an 32-bit integer.
It may be zero-padded.Observation_ID
.value(String, boolean)
public Observation_ID hex_value(java.lang.String id_text, boolean use_defaults) throws Invalid_Argument_Exception
Observation_ID
's numeric value using a string
representing a hexadecimal 32-bit integer. If id_text
cannot
be parsed for a valid observation ID, an Invalid_Argument_Exception
is thrown. If use_defaults
is true
, the
DEFAULT_OBSERVATION_ID
will be used instead.id_text
- The text from which the Observation_ID
's new
value will be parsed. It must be an hexadecimal 32-bit integer.
It may be zero-padded.use_defaults
- If true
, DEFAULT_OBSERVATION_ID
will be used if the hex_value cannot be parsed;
otherwise, an Invalid_Argument_Exception
will be thrown.Observation_ID
.Invalid_Argument_Exception
- If no valid value can be parsed from the
argument.public Observation_ID hex_value(java.lang.String id_text)
Observation_ID
's numeric value using a string
representing a hexidecimal 32-bit integer. This method calls hex_value(String,boolean)
with
use_defaults
set to true
.id_text
- The text from which the Observation_ID's new value
will be parsed. It must be an 32-bit integer.
It may be zero-padded.Observation_ID
.hex_value(String, boolean)
public int mission_phase()
Mission_Phase
component of this
Observation_ID
. The value of this component will be one of the
mission phase constants of the Observation_ID
class.Mission_Phase
component of this
Observation_ID
.public Observation_ID mission_phase(int the_mission_phase) throws Out_of_Range_Exception
Mission_Phase
component of this
Observation_ID
. The value of this component must be one of the
mission phase constants of the Observation_ID
class, or
an Out_of_Range_Exception
will be thrown.
Note that if a pre-orbit ID has its mission phase set to an in-orbit phase,
the correct interpretation of the resulting ID's Orbit_Number
and Target
components is uncertain. Likewise, if an in-orbit ID
is converted to a pre-orbit ID, the Time
component is suspect.
the_mission_phase
- The new Mission_Phase
component of
this Observation_ID
.Observation_ID
.Out_of_Range_Exception
- If the_mission_phase
is out
of range.public Observation_ID mission_phase(java.lang.String mission_phase_text, boolean use_defaults) throws Out_of_Range_Exception, Invalid_Argument_Exception
Mission_Phase
component of this
Observation_ID
from a string. This method compares
the mission_phase_text
to the MISSION_PHASE_NAME
and MISSION_PHASE_ABBREVIATION
arrays. The comparison is
done ignoring case and, for the latter comparison, ignoring delimiters
as defined by DELIMITER_PATTERN
. If
mission_phase_text
cannot be parsed for a valid mission phase,
an Invalid_Argument_Exception
is thrown. Or if the
mission phase is out of range, an Out_of_Range_Exception
is thrown. If use_defaults
is true
, the
DEFAULT_MISSION_PHASE
will be used instead.mission_phase_text
- The text from which the mission phase will
be parsed.use_defaults
- If true
, DEFAULT_MISSION_PHASE
will be used if the mission phase cannot be
parsed or if the value is out of range; otherwise, an
Invalid_Argument_Exception
or Out_of_Range_Exception
will be thrown.Observation_ID
.Out_of_Range_Exception
- If parsed the_mission_phase
is
out of range.Invalid_Argument_Exception
- If no valid mission phase could be parsed
from mission_phase_text
.public Observation_ID mission_phase(java.lang.String mission_phase_text)
Mission_Phase
component of this
Observation_ID
from a string. This method calls
mission_phase(String,boolean)
with use_defaults
set to
true
.mission_phase_text
- The text from which the mission phase will
be parsed.Observation_ID
.mission_phase(String, boolean)
public Observation_ID mission_phase_from_time(int seconds) throws Out_of_Range_Exception
Mission_Phase
component given the number of seconds
since the Observation_ID EPOCH. If seconds is negative, then the current
system time will be used. If the current system time happens to be prior to
the Observation_ID EPOCH, then the Observation_ID EPOCH will be used
instead.
This method compares seconds to the different elements of the
MISSION_PHASE_MAX_TIME array, using the first value that to
which seconds is less than or equal to derive a mission phase.
It is important to note that seconds is relative to the Observation_ID
epoch (Jan 1, 2004, 00:00:00 UTC), not the Unix epoch (Jan 1, 1970, 00:00:00
UTC). Because of this distinction, it is possible to supply a seconds value
that represents a time greater than the Unix 32-bit maximum date of January
19, 2038, 03:14:07 UTC. In this case, this method will throw an
Out_of_Range_Exception
.
It is equally important to note that seconds may be greater than
Observation_ID.TIME_MAX, which applies only to calculations
involving the time component of a pre-orbit Observation_ID. Thus, this
method may set the mission phase component to an in-orbit value if not used
carefully.seconds
- The number of seconds since the Observation_ID.EPOCH.Out_of_Range_Exception
- If seconds represents a time greater than
January 19, 2038, 03:14:07 UTC.public Observation_ID mission_phase_from_orbit_number(int orbit_number) throws Out_of_Range_Exception
Mission_Phase
component given the orbit number.
This method compares seconds to the different elements of the
MISSION_PHASE_MAX_ORBIT array, using the first value that to
which the orbit number is less than or equal to derive a mission phase.
If the orbit_number
is less than ORBIT_NUMBER_MIN
or greater than ORBIT_NUMBER_MAX
an Out_of_Range_Exception
will be thrown.orbit_number
- The orbit_number to use to return the mission_phase.Out_of_Range_Exception
- If orbit_number is less than
ORBIT_NUMBER_MIN
or greater than ORBIT_NUMBER_MAX
.public int time() throws Out_of_Range_Exception
Time
component of this
Observation_ID
. If the ID is not a pre-orbit ID, an Out_of_Range_Exception
will be thrown.Time
component of this Observation_ID
.Out_of_Range_Exception
- If the ID is not a pre-orbit ID.public Observation_ID time(int the_time) throws Out_of_Range_Exception
Time
component of this
Observation_ID
. If the ID is not a pre-orbit ID, an Out_of_Range_Exception
will be thrown. Futhermore, if the_time
is less than 0 or greater than TIME_MAX
, an
Out_of_Range_Exception
will be thrown.the_time
- The new value for the Time
component of
this Observation_ID
.Observation_ID
.Out_of_Range_Exception
- If the ID is not a pre-orbit ID or if
the_time
is out of range.public Observation_ID time(java.lang.String time_text, boolean use_defaults) throws Out_of_Range_Exception, Invalid_Argument_Exception
Time
component of this
Observation_ID
from a string. This method uses the
extract_time(java.lang.String, boolean)
function to parse the time; the format is
the current value of time_text_format. If time_text
cannot be
parsed for a valid time, an Invalid_Argument_Exception
is thrown.
Or if the parsed time is less than 0 or greater than TIME_MAX
or if the ID is not a pre-orbit ID, an Out_of_Range_Exception
is
thrown. If use_defaults
is true
, the
DEFAULT_TIME
will be used instead.time_text
- The text from which the time will be parsed.use_defaults
- If true
, DEFAULT_TIME
will be used if the time cannot be parsed or if the
parsed value is out of range; otherwise,
an Invalid_Argument_Exception
or
Out_of_Range_Exception
will be thrown.Invalid_Argument_Exception
- If no valid time component could be
parsed from time_text given time_format or if this Observation_ID is
not a pre-orbit ID.Out_of_Range_Exception
- If the parsed time component falls outside
the range [EPOCH, EPOCH + TIME_MAX] or if the ID is not a pre-orbit ID.public Observation_ID time(java.lang.String time_text)
Time
component of this
Observation_ID
from a string. This method calls
time(String,boolean)
with use_defaults
set to
true
.time_text
- The text from which the time will be parsed.time(String, boolean)
public Observation_ID time(java.lang.String time_text, java.lang.String time_text_format, boolean use_defaults) throws Out_of_Range_Exception, Invalid_Argument_Exception
Time
component of this
Observation_ID
from a string based on the specified
time_text_format
. This method uses the
extract_time(java.lang.String, boolean)
function to parse the time; the format is
the value of time_text_format
. If time_text
cannot be parsed for a valid time, an Out_of_Range_Exception
is
thrown. Or if the parsed time is less than 0 or greater than
TIME_MAX
or if the ID is not a pre-orbit ID, an
Out_of_Range_Exception
is thrown. If use_defaults
is
true
, the DEFAULT_TIME
will be used instead.time_text
- The text from which the time will be parsed.use_defaults
- If true
, DEFAULT_TIME
will be used if the time cannot be parsed or if the
parsed value is out of range; otherwise,
an Invalid_Argument_Exception
or
Out_of_Range_Exception
will be thrown.Observation_ID
.Invalid_Argument_Exception
- If no valid time component could be
parsed from time_text given time_format or if this
Observation_ID
is not a pre-orbit ID.Out_of_Range_Exception
- If the parsed time component falls outside
the range [EPOCH, EPOCH + TIME_MAX] or if the ID is not a pre-orbit ID.public Observation_ID time(java.lang.String time_text, java.lang.String time_text_format)
Time
component of this
Observation_ID
from a string based on the specified
time_text_format
. This method calls
time(String, String, boolean)
with use_defaults
set to true
.time_text
- The text from which the time will be parsed.Observation_ID
.time(String,String,boolean)
public Observation_ID time_now() throws Out_of_Range_Exception
Time
component of this
Observation_ID
to the current time, as determined from the
system clock. If the ID is not a pre-orbit ID, an Out_of_Range_Exception
will be thrown. If the current system time is less
than the EPOCH
, 0 will be used instead, reflecting 0 seconds
after the HiRISE epoch. If the Time
component would be greater
than TIME_MAX
, then TIME_MAX
will be used instead.Observation_ID
.Out_of_Range_Exception
- If the ID is not a pre-orbit ID.public int orbit_number() throws Out_of_Range_Exception
Orbit_Number
component of this
Observation_ID
. If the ID is not an in-orbit ID, an Out_of_Range_Exception
is thrown.Orbit_Number
component of this
Observation_ID
.Out_of_Range_Exception
- If the ID is not an in-orbit ID.public Observation_ID orbit_number(int the_orbit_number) throws Out_of_Range_Exception
Orbit_Number
component of this
Observation_ID
. If the ID is not an in-orbit ID, an Out_of_Range_Exception
is thrown. If the_orbit_number
is
less than 0 or greater than ORBIT_NUMBER_MAX
, an Out_of_Range_Exception
is thrown.the_orbit_number
- The new orbit number for this
Observation_ID
Observation_ID
.Out_of_Range_Exception
- If the ID is not an in-orbit ID or if
the_orbit_number
is out of range.public Observation_ID orbit_number(java.lang.String orbit_number_text, boolean use_defaults) throws Invalid_Argument_Exception, Out_of_Range_Exception
Orbit_Number
component of this
Observation_ID
based on a text string.
If the orbit number cannot be parsed from the string, an Invalid_Argument_Exception
is thrown. Or if orbit number is
less than 0 or greater than ORBIT_NUMBER_MAX
, an Out_of_Range_Exception
is thrown. If use_defaults
is
true
, the DEFAULT_ORBIT_NUMBER
will be used instead.orbit_number_text
- The text from which to extract the new orbit
number for this Observation_ID
use_defaults
- If true
, DEFAULT_ORBIT_NUMBER
will be used if the orbit number cannot be parsed
or if the parsed value is out of range; otherwise,
an Invalid_Argument_Exception
or
Out_of_Range_Exception
will be thrown.Observation_ID
.Invalid_Argument_Exception
- If the ID cannot be extracted from
the orbit_number_text.Out_of_Range_Exception
- If the ID is not an in-orbit ID or if
the_orbit_number
is out of range.public Observation_ID orbit_number(java.lang.String orbit_number_text)
Orbit_Number
component of this
Observation_ID
based on a text string. This method calls
orbit_number(String,boolean)
with use_defaults
set to
true
.orbit_number_text
- The text from which to extract the new orbit
number for this Observation_ID
Observation_ID
.orbit_number(String, boolean)
public int target() throws Out_of_Range_Exception
Target
component of this
Observation_ID
. If the ID is not an in-orbit ID, an Out_of_Range_Exception
is thrown.Target
component of this
Observation_ID
.Out_of_Range_Exception
- If the ID is not an in-orbit ID.public Observation_ID target(int the_target) throws Out_of_Range_Exception
Target
component of this
Observation_ID
. If the ID is not an in-orbit ID, an Out_of_Range_Exception
is thrown. If the_target
is less than
0 or greater than TARGET_MAX
, and Out_of_Range_Exception
is
thrown.
Note that the_target
is the numeric representation
(N) of the Target
, not the text representation
(T).
the_target
- The numeric value of the target for this
Observation_ID
Observation_ID
.Out_of_Range_Exception
- If the ID is not an in-orbit ID or if
the_target
is out of range.public Observation_ID target(java.lang.String target_text, boolean use_defaults) throws Invalid_Argument_Exception, Out_of_Range_Exception
Target
component of this
Observation_ID
based on an text string. If the target cannot be
parsed from the string, an Invalid_Argument_Exception
is thrown.
If target is less than 0 or greater than TARGET_MAX
, an
Out_of_Range_Exception
is thrown. If use_defaults
is
true
, the DEFAULT_TARGET
will be used instead.
Note that the_target
is the numeric representation
(N) of the Target
, not the text representation
(T).
target_text
- The numeric value of the target for this
Observation_ID
use_defaults
- If true
, DEFAULT_TARGET
will be used if the target cannot be parsed or if the
parsed value is out of range; otherwise, an
Invalid_Argument_Exception
or
Out_of_Range_Exception
will be thrown.Observation_ID
.Invalid_Argument_Exception
- If the target cannot be extracted from
the target_text.Out_of_Range_Exception
- If the ID is not an in-orbit ID or if
the_target
is out of range.public Observation_ID target(java.lang.String target_text)
Target
component of this
Observation_ID
based on an text string. This method calls
time(String,boolean)
with use_defaults
set to
true
.target_text
- The numeric value of the target for this
Observation_ID
Observation_ID
.text(String, boolean)
public java.lang.String text()
Observation_ID
. The text
representation is discussed in detail in the Observation_ID
overview.Observation_ID
.public Observation_ID text(java.lang.String the_text, boolean use_defaults) throws Invalid_Argument_Exception, Out_of_Range_Exception
Observation_ID
using a text
representation. If the_text
cannot be parsed for a valid
observation ID, an Invalid_Argument_Exception
is thrown. If
use_defaults
is true
, appropriate default values
will be used as needed instead.the_text
- The text from which to parse an observation ID.use_defaults
- If true
, default values for the
various components of an Observation_ID
will be used
when they cannot be determined from the_text
. If
false
, an Invalid_Argument_Exception
will be
thrown instead.Observation_ID
.Invalid_Argument_Exception
- If an observation ID cannot be parsed
from the_text
and use_defaults
is
false
.Out_of_Range_Exception
- If a one of the parsed values is out of
range and use_defaults
is false
.parse(String,boolean)
public Observation_ID text(java.lang.String the_text)
Observation_ID
using a text
representation. If the_text
cannot be parsed for a valid
observation ID, appropriate default values will be used as needed instead.
This method calls parse(String,boolean)
with
use_defaults
set to true
.the_text
- The text from which to parse an observation ID.Observation_ID
.parse(String,boolean)
public boolean is_preorbit()
true
if this Observation_ID
is a pre-orbit
ID, false
if not.true
if this Observation_ID
is a pre-orbit
ID, false
if not.public java.lang.String time_text(int time_in_seconds, int epoch)
String
from an integer number of seconds
since a given epoch. The format of the text may be changed by an invocation
of the time_text_format(String)
method.time_in_seconds
- The number of seconds since the epoch
.epoch
- A reference point in time; the number of seconds since the
Unix epoch of Jan 1, 1970, 00:00:00 UTC.time_text_format(String)
public java.lang.String time_text(int time_in_seconds)
String
from an integer number of seconds
since the HiRISE EPOCH
. The format of the text may be changed by
an invocation of the time_text_format(String)
method.time_in_seconds
- The number of seconds since the HiRISE EPOCH
.time_text_format(String)
public java.lang.String toString()
Observation_ID
.toString
in class java.lang.Object
Observation_ID
.text()
public java.lang.String parse(java.lang.String id_text, boolean use_defaults) throws Invalid_Argument_Exception, Out_of_Range_Exception
Observation_ID
using a text
representation. If the_text
cannot be parsed for a valid
observation ID, an Invalid_Argument_Exception
is thrown. If
use_defaults
is true
, appropriate default values
will be used as needed instead.
This method returns the text that was not used in the interpretation of an
observation ID. Subclasses of Observation_ID
can use this
returned text to parse additional information.
id_text
- The text from which to parse an observation ID.use_defaults
- If true
, default values for the
various components of an Observation_ID
will be used
when they cannot be determined from the_text
. If
false
, an Invalid_Argument_Exception
will be
thrown instead.Invalid_Argument_Exception
- If an observation ID cannot be parsed
from the_text
and use_defaults
is
false
.Out_of_Range_Exception
- If a one of the parsed values is out of
range and use_defaults
is false
.public java.lang.String parse(java.lang.String the_text)
Observation_ID
using a text
representation. If the_text
cannot be parsed for a valid
observation ID, appropriate default values will be used as needed instead.
This method calls parse(String,boolean)
with
use_defaults
set to true
.
This method returns the text that was not used in the interpretation of an
observation ID. Subclasses of Observation_ID
can use this
returned text to parse additional information.
the_text
- The text from which to parse an observation ID.text(String, boolean)
public static int extract_mission_phase(java.lang.String the_text, boolean use_defaults) throws Invalid_Argument_Exception
Mission_Phase
component from a text String
.the_text
- The text to be parsed.use_defaults
- If true
, a DEFAULT_MISSION_PHASE
will be used if a mission phase cannot be
parsed; otherwise, an Invalid_Argument_Exception
will be
thrown.Mission_Phase
.Invalid_Argument_Exception
- If a mission phase cannot be parsed
from the_text
and use_defaults
is
false
.public static int extract_mission_phase(java.lang.String the_text)
Mission_Phase
component from a text String
. If
a mission phase cannot be parsed from the_text
, a DEFAULT_MISSION_PHASE
will be returned.the_text
- the text to be parsed.Mission_Phase
.public static int extract_time(java.lang.String the_text, boolean use_defaults) throws Invalid_Argument_Exception
Time
pre-orbit component from a text String
.the_text
- The text to be parsed.use_defaults
- If true
, a DEFAULT_TIME
will
be used if a time cannot be parsed; otherwise, an Invalid_Argument_Exception
will be thrown.Time
, in seconds since the HiRISE EPOCH
.Invalid_Argument_Exception
- If a time cannot be parsed from
the_text
and use_defaults
is
false
.public static int extract_time(java.lang.String the_text)
Time
pre-orbit component from a text String
.
If a time cannot be parsed from the_text
, a DEFAULT_TIME
will be returned.the_text
- The text to be parsed.Time
, in seconds since the HiRISE EPOCH
.public static int extract_orbit_number(java.lang.String the_text, boolean use_defaults) throws Invalid_Argument_Exception
Orbit_Number
in-orbit component from a text String
.the_text
- The text to be parsed.use_defaults
- If true
, a DEFAULT_ORBIT_NUMBER
will be used if an orbit number cannot be parsed;
otherwise, an Invalid_Argument_Exception
will be thrown.Orbit_Number
.Invalid_Argument_Exception
- If an orbit number cannot be parsed from
the_text
and use_defaults
is
false
.public static int extract_orbit_number(java.lang.String the_text)
Orbit_Number
in-orbit component from a text String
. If an orbit number cannot be parsed from the_text
, a
DEFAULT_ORBIT_NUMBER
will be returned.the_text
- The text to be parsed.Orbit_Number
.public static int extract_target(java.lang.String the_text, boolean use_defaults) throws Invalid_Argument_Exception
Target
in-orbit component from a text String
.
The target number is expected to be in text form (T), not in
numeric form (N).the_text
- The text to be parsed.use_defaults
- If true
, a DEFAULT_TARGET
will
be used if a target cannot be parsed; otherwise, an Invalid_Argument_Exception
will be thrown.Target
.Invalid_Argument_Exception
- If a target cannot be parsed from
the_text
and use_defaults
is
false
.public static int extract_target(java.lang.String the_text)
Target
in-orbit component from a text String
.
If a target cannot be parsed from the_text
, a DEFAULT_TARGET
will be returned. The target number is expected to be in
text form (T), not in numeric form (N).the_text
- The text to be parsed.Target
.public static java.lang.String time_text_format()
time_text(int,int)
method, the parse(String,boolean)
method, and the extract_time(String,boolean)
method. It is also used in the creation of
the Observation_ID
's text representation, via the text()
method and the toString()
method.public static void time_text_format(java.lang.String the_time_text_format) throws Invalid_Argument_Exception
time_text(int,int)
method, the parse(String,boolean)
method, and the extract_time(String,boolean)
method. It is also used in the creation of
the Observation_ID
's text representation, via the text()
method and the toString()
method.
This method should be used with care, since it alters the way in which putative observation ID text will be interpretted.
the_time_text_format
- The new format to be used.Invalid_Argument_Exception
- If the_time_text_format
includes an underscore, which has special meaning in interpretting an
observation ID.public static java.lang.String zero_pad_number(long number, int digits, int radix)
number
- The number to format.digits
- The minimum number of digits to return.radix
- The base used to format the number.public static java.lang.String zero_pad_number(long number, int digits)
number
- The number to format.digits
- The minimum number of digits to return.public static java.lang.String zero_pad_binary(long number, int digits)
number
- The number to format.digits
- The minimum number of digits to return.public static java.lang.String zero_pad_hex(long number, int digits)
number
- The number to format.digits
- The minimum number of digits to return.Copyright \ (C) Arizona Board of Regents on behalf of the \ Planetary Image Research Laboratory, Lunar and \ Planetary Laboratory at the University of Arizona