Class GPSDecimalDegrees

    • Constructor Detail

      • GPSDecimalDegrees

        public GPSDecimalDegrees()
        Default constructor.
      • GPSDecimalDegrees

        public GPSDecimalDegrees​(String s)
        Initialize GPS with latitude and longitude in string representation.
        Parameters:
        s - the string representation to parse
      • GPSDecimalDegrees

        public GPSDecimalDegrees​(String s,
                                 boolean swapped)
        Initialize GPS with latitude and longitude in string representation.
        Parameters:
        s - the string representation to parse
        swapped - whether format is 'long lat' instead of 'lat long'
      • GPSDecimalDegrees

        public GPSDecimalDegrees​(AbstractGPS gps)
        Initialize GPS with latitude and longitude from the specified object.
        Parameters:
        gps - the GPS object to use the lat/lon from
      • GPSDecimalDegrees

        public GPSDecimalDegrees​(double lat,
                                 double lon)
        Initialize GPS with latitude and longitude (in decimal notation).
        Parameters:
        lat - latitude
        lon - longitude
      • GPSDecimalDegrees

        public GPSDecimalDegrees​(Coordinate lat,
                                 Coordinate lon)
        Initialize GPS with latitude and longitude.
        Parameters:
        lat - latitude
        lon - longitude
    • Method Detail

      • parse

        protected Coordinate[] parse​(String s,
                                     boolean swapped)
        Parses the string.
        Specified by:
        parse in class AbstractGPS
        Parameters:
        s - the string to parse
        swapped - "long lat" instead of "lat long"
        Returns:
        the coordinates (lat/long), null if failed to parse
      • toString

        public String toString()
        Turns the GPS object back into its string representation.
        Specified by:
        toString in class AbstractGPS
        Returns:
        the string representation