Class YUMAParser

  • All Implemented Interfaces:
    DataLoader

    public class YUMAParser
    extends Object
    implements DataLoader
    This class reads Yuma almanac files and provides GPS almanacs.

    The definition of a Yuma almanac comes from the U.S. COAST GUARD NAVIGATION CENTER.

    The format of the files holding Yuma almanacs is not precisely specified, so the parsing rules have been deduced from the downloadable files at NAVCEN and at CelesTrak.

    Since:
    8.0
    Author:
    Pascal Parraud
    • Constructor Detail

      • YUMAParser

        public YUMAParser​(String supportedNames)
        Simple constructor.

        This constructor does not load any data by itself. Data must be loaded later on by calling one of the loadData() method or the loadData(inputStream, fileName) method.

        The supported files names are used when getting data from the loadData() method that relies on the data providers manager. They are useless when getting data from the loadData(input, name) method.

        Parameters:
        supportedNames - regular expression for supported files names (if null, a default pattern matching files with a ".alm" extension will be used)
        See Also:
        loadData()
    • Method Detail

      • loadData

        public void loadData()
        Loads almanacs.

        The almanacs already loaded in the instance will be discarded and replaced by the newly loaded data.

        This feature is useful when the file selection is already set up by the data providers manager configuration.

      • stillAcceptsData

        public boolean stillAcceptsData()
        Description copied from interface: DataLoader
        Check if the loader still accepts new data.

        This method is used to speed up data loading by interrupting crawling the data sets as soon as a loader has found the data it was waiting for. For loaders that can merge data from any number of sources (for example JPL ephemerides or Earth Orientation Parameters that are split among several files), this method should always return true to make sure no data is left over.

        Specified by:
        stillAcceptsData in interface DataLoader
        Returns:
        true while the loader still accepts new data
      • getSupportedNames

        public String getSupportedNames()
        Get the supported names for data files.
        Returns:
        regular expression for the supported names for data files
      • getPRNNumbers

        public List<Integer> getPRNNumbers()
        Gets the PRN numbers of all the GPS almanacs read from the file.
        Returns:
        the PRN numbers of all the GPS almanacs read from the file