Package org.ka2ddo.yaac.gps
Enum Class GpsLogMode
- All Implemented Interfaces:
Serializable
,Comparable<GpsLogMode>
,Constable
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 ConstantDescriptionLog 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 TypeMethodDescriptionGet the file type to be displayed or used for log files of this type.Get the class that implements a logger of the specified mode.toString()
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[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
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
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
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
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
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
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
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 nameNullPointerException
- if the argument is null
-
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
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
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 classEnum<GpsLogMode>
- Returns:
- the name of this enum constant
-