Orbits are a map of string identifiers to DatumRanges, typically used to enumerate the orbits a spacecraft makes. For example, Cassini orbit "C" was from 2004-366T07:03 to 2005-032T03:27 and "33" was from 2006-318T23:34 to 2006-330T22:23. There are two types of orbits: canonical, which have an identifier like "cassini" and can be used by the community, and user which have identifiers like https://raw.githubusercontent.com/autoplot/orbits/main/psp/psp-aa25.txt. In either case, these refer to a file. The canonical ones are stored on the das2 website at http://das2.org/Orbits/<id>.dat. This file is a three-column ASCII file with the orbit id in either the first or last column. Note any line not meeting this spec is ignored, so that orbit files can contain additional documentation (and can sit within a wiki).
return -1 if a is before b, 0 if they are equal, and 1 if a is after b.
return the first orbit id, so that we can iterate through all
return the DatumRange for this orbit number. Note this IS NOT an OrbitDatumRange.
returns the first orbit containing the time, or null if none do.
return the closest orbit on or before datum d.
Return the orbits for the named spacecraft, or those described in the file pointed to the URL when the "sc" identifier is a URL. Example files may be on the wiki page http://das2.org/wiki/index.php/Orbits.<SC%gt;, or on the classpath in /orbits/<SC>.dat The orbits file will be read by ignoring any line that does not contain three non-space blobs, and either the first two or last two should parse as an ISO8601 string. The ISO8601 strings must start with 4-digit years, either Note the input can then be html, with a pre section containing the orbits. Note the wiki page is the source for cassini and crres, but other missions may come from special places encoded here. Mediawiki introduced two problems: first, that typos were not identified clearly because a 200 (ok) code is returned for any URL. Second, it's not trivial to set up mirrors that put data into the wiki. For this reason, the wiki should only be used as a reference for humans and other use is discouraged. This now uses special code for rbspb-pp and rbspa-pp that looks at UIowa, LANL and at virbo.org. This should not be called from the event thread, because it may block briefly while the orbits are loaded.
return examples of spacecraft ids which can be used, and a human-readable label in a linked hash map. This may fall out-of-sync with the list of IDs which would work (see https://das2.org/Orbits/), but this should be considered a bug.
return the URL used to populate the orbits.
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.
return the next orbit number, or null if there are no more orbit numbers.
return the previous orbit number, or null if there are no more orbit numbers.
reset the loaded missions.
force a reload of the orbits file. TODO: ideally the freshness of the orbits file would be checked every ten seconds, but there's quite a bit of coding to do that properly. This will force the reload, for example when the green play button is pressed on the Autoplot Events List.
Orbit numbers are typically just a number, but some missions like Cassini had letter names for orbits as well. This encapsulates the code to identify the canonical orbit from the string, by removing trailing _'s and 0's.