Class GPSDecimalSeconds

    • Constructor Detail

      • GPSDecimalSeconds

        public GPSDecimalSeconds()
        Default constructor.
      • GPSDecimalSeconds

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

        public GPSDecimalSeconds​(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'
      • GPSDecimalSeconds

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

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

        public GPSDecimalSeconds​(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