Enum Class GpsLogMode

java.lang.Object
java.lang.Enum<GpsLogMode>
org.ka2ddo.yaac.gps.GpsLogMode
All Implemented Interfaces:
Serializable, Comparable<GpsLogMode>, Constable

public enum GpsLogMode extends Enum<GpsLogMode>
This enumeration defines the various formats that can be used to write a GPS position report to a disk file.
Author:
Andrew Pavlin, KA2DDO
  • Nested Class Summary

    Nested classes/interfaces inherited from class java.lang.Enum

    Enum.EnumDesc<E extends Enum<E>>
  • Enum Constant Summary

    Enum Constants
    Enum Constant
    Description
    Log GPS using CSV format, in the order latitude, longitude, elevation, and timestamp (the latter in the format accepted by Microsoft Excel).
    Log GPS using GPSD's JSON structure format, one complete structure (with all sub-structures) per line in the text log file.
    Log GPS using the GPX (GPS eXchange format) XML schema.
    Log GPS data using the legacy mode that YAAC used prior to the implementation of a choice of GPS logging mode.
    Log GPS using NMEA-0183 format, regardless of the actual incoming format.
  • Method Summary

    Modifier and Type
    Method
    Description
    Get the file type to be displayed or used for log files of this type.
    Class<? extends GpsLogger>
    Get the class that implements a logger of the specified mode.
    Returns the name of this enum constant, as contained in the declaration.
    static GpsLogMode
    Returns the enum constant of this class with the specified name.
    static GpsLogMode[]
    Returns an array containing the constants of this enum class, in the order they are declared.

    Methods inherited from class java.lang.Object

    getClass, notify, notifyAll, wait, wait, wait
  • Enum Constant Details

    • NATIVE

      public static final GpsLogMode NATIVE
      Log GPS data using the legacy mode that YAAC used prior to the implementation of a choice of GPS logging mode. This mode logged the GPS data as ASCII text in exactly the format it was received from the source (NMEA or GPS JSON), and kept all sources (local and remote) merged into a single file.
    • CSV

      public static final GpsLogMode CSV
      Log GPS using CSV format, in the order latitude, longitude, elevation, and timestamp (the latter in the format accepted by Microsoft Excel). A unique file will be used for each source.
    • NMEA0183

      public static final GpsLogMode NMEA0183
      Log GPS using NMEA-0183 format, regardless of the actual incoming format. GPSD JSON format will be converted to the most efficient NMEA sentences available, depending on what fields are provided from GPSD. A unique file will be used for each source.
    • GPSD_JSON

      public static final GpsLogMode GPSD_JSON
      Log GPS using GPSD's JSON structure format, one complete structure (with all sub-structures) per line in the text log file. A unique file will be used for each source.
    • GPX

      public static final GpsLogMode GPX
      Log GPS using the GPX (GPS eXchange format) XML schema. A unique file will be used for each source. Loss of GPS signal will end a track segment, and resumption of signal reception will start another track segment.
  • Method Details

    • values

      public static GpsLogMode[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static GpsLogMode valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null
    • getFileType

      public String getFileType()
      Get the file type to be displayed or used for log files of this type.
      Returns:
      String of log file suffix (without leading period)
    • getLoggerClass

      public Class<? extends GpsLogger> getLoggerClass()
      Get the class that implements a logger of the specified mode. Class.newInstance() can be used to instantiate a logger for the mode.
      Returns:
      Class<? extends GpsLogger> of the logger
    • toString

      public String toString()
      Returns the name of this enum constant, as contained in the declaration. This method may be overridden, though it typically isn't necessary or desirable. An enum type should override this method when a more "programmer-friendly" string form exists.
      Overrides:
      toString in class Enum<GpsLogMode>
      Returns:
      the name of this enum constant