# Enum Class Fix

Object
Enum<Fix>
Fix

All Implemented Interfaces:
  `Serializable`, `Comparable<Fix>`, `Constable`

public enum Fix extends Enum<Fix>
Type of GPS fix (position derived from measuring external reference points). The Standard Positioning Service (SPS) can be two- or three-dimensional, or use differential GPS for increased accuracy. The Precise Positioning Service (PPS) is a military signal.

This enumeration value can be encoded in GPS Exchange Format (GPX) with the following strings: `"none"`, `"2d"`, `"3d"`, `"dgps"` and `"pps"`. When reading such data, `Fix` instances can be a property value of the features returned by the GPX reader.

Since:
  0.8

- ## Nested Class Summary

  ### Nested classes/interfaces inherited from class Enum

  `Enum​.EnumDesc<E extends Enum<E>>`

- ## Enum Constant Summary

  Enum Constants
  Enum Constant
  Description
  `DIFFERENTIAL`
  Differential Global Positioning Service (DGPS) used.
  `NONE`
  GPS has no fix.
  `PRECISE`
  Precise Positioning Service (PPS) used.
  `THREE_DIMENSIONAL`
  Three-dimensional fix.
  `TWO_DIMENSIONAL`
  Two-dimensional fix.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `static Fix`
  `fromGPX(String name)`
  Returns the enumeration value from the given GPX name, or `null` if none.
  `String`
  `toGPX()`
  Returns the string representation in GPS Exchange Format (GPX).
  `static Fix`
  `valueOf(String name)`
  Returns the enum constant of this class with the specified name.
  `static Fix[]`
  `values()`
  Returns an array containing the constants of this enum class, in the order they are declared.

  ### Methods inherited from class Enum

  `clone, compareTo, describeConstable, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf`

  ### Methods inherited from class Object

  `getClass, notify, notifyAll, wait, wait, wait`

- ## Enum Constant Details

  - ### NONE

    public static final Fix NONE
    GPS has no fix. Note that this is a different meaning than "the fix information is unknown".

  - ### TWO_DIMENSIONAL

    public static final Fix TWO_DIMENSIONAL
    Two-dimensional fix. This requires the signal of at least 3 satellites.

  - ### THREE_DIMENSIONAL

    public static final Fix THREE_DIMENSIONAL
    Three-dimensional fix. This requires the signal of at least 4 satellites.

  - ### DIFFERENTIAL

    public static final Fix DIFFERENTIAL
    Differential Global Positioning Service (DGPS) used.
    See Also:
      - Differential GPS on Wikipedia

  - ### PRECISE

    public static final Fix PRECISE
    Precise Positioning Service (PPS) used. This is a military signal. (Note: the alternative is Standard Positioning Service – SPS).

- ## Method Details

  - ### values

    public static Fix[] 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 Fix 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

  - ### fromGPX

    public static Fix fromGPX(String name)
    Returns the enumeration value from the given GPX name, or `null` if none. Recognized values are `"none"`, `"2d"`, `"3d"`, `"dgps"` and `"pps"`, ignoring case.
    Parameters:
      `name` - the GPX name (case insensitive) for which to get an enumeration value.
    Returns:
      the enumeration value for the given GPX name, or `null` if the given name was `null` or unrecognized.

  - ### toGPX

    public String toGPX()
    Returns the string representation in GPS Exchange Format (GPX). Returned value can be `"none"`, `"2d"`, `"3d"`, `"dgps"` or `"pps"`,
    Returns:
      the GPX enumeration value.