public class Orbits
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static class |
Orbits.OrbitFieldHandler
allow orbits to be used in file names
|
Modifier and Type | Method and Description |
---|---|
int |
compare(java.lang.String a,
java.lang.String b)
return -1 if a is before b, 0 if they are equal, and 1 if a is after b.
|
java.lang.String |
first()
return the first orbit id, so that we can iterate through all
|
DatumRange |
getDatumRange(java.lang.String orbit)
return the DatumRange for this orbit number.
|
java.lang.String |
getOrbit(Datum d)
returns the first orbit containing the time, or null if none do.
|
java.lang.String |
getOrbitOnOrBefore(Datum d)
return the closest orbit on or before datum d.
|
static Orbits |
getOrbitsFor(java.lang.String sc)
Return the orbits for the named spacecraft, or those described in the file pointed to the URL when
the "sc" identifier is a URL.
|
java.lang.String |
getSpacecraft() |
static java.util.Map<java.lang.String,java.lang.String> |
getSpacecraftIdExamples()
return examples of spacecraft ids which can be used, and a human-readable label
in a linked hash map.
|
java.net.URL |
getURL()
return the URL used to populate the orbits.
|
static boolean |
isOrbitsFile(java.lang.String sc)
provide method for clients to see if the URI represents an orbits file, without
constantly going into the synchronized block, which was causing things to hang for
Masafumi.
|
java.lang.String |
last() |
static void |
main(java.lang.String[] args) |
java.lang.String |
next(java.lang.String orbit)
return the next orbit number, or null if there are no more orbit numbers.
|
java.lang.String |
prev(java.lang.String orbit)
return the previous orbit number, or null if there are no more orbit numbers.
|
static void |
reset()
reset the loaded missions.
|
static Orbits |
resetOrbitsFor(java.lang.String sc)
force a reload of the orbits file.
|
static java.lang.String |
trimOrbit(java.lang.String orbit)
Orbit numbers are typically just a number, but some missions like Cassini had letter names for orbits
as well.
|
public DatumRange getDatumRange(java.lang.String orbit) throws java.text.ParseException
orbit
- java.text.ParseException
public java.lang.String getOrbit(Datum d)
d
- public java.lang.String getOrbitOnOrBefore(Datum d)
d
- the datumhttp://jfaden.net/~jbf/autoplot/script/demos/jeremy/onOrBefore.jy
public java.lang.String next(java.lang.String orbit)
orbit
- public java.lang.String prev(java.lang.String orbit)
orbit
- public static java.lang.String trimOrbit(java.lang.String orbit)
orbit
- public int compare(java.lang.String a, java.lang.String b)
a
- b
- public java.lang.String first()
public java.lang.String last()
public java.lang.String getSpacecraft()
public static java.util.Map<java.lang.String,java.lang.String> getSpacecraftIdExamples()
public static void reset()
public static Orbits resetOrbitsFor(java.lang.String sc)
sc
- the string identifier for the spacecraft, such as "rbspa-pp", or URL to orbit file.public static Orbits getOrbitsFor(java.lang.String sc)
sc
- the string identifier for the spacecraft, such as "rbspa-pp", or URL to orbit file.java.lang.IllegalArgumentException
- when the orbits file cannot be readpublic static boolean isOrbitsFile(java.lang.String sc)
sc
- the string identifier for the spacecraft, such as "rbspa-pp", or URL to orbit file.public java.net.URL getURL()
public static void main(java.lang.String[] args) throws java.text.ParseException
java.text.ParseException