de.fhg.igd.gps
Class GPSData

java.lang.Object
  extended byde.fhg.igd.gps.GPSData

public class GPSData
extends Object

This class represents a valid gps data record in terms of latitude, longitude, altitude, course and speed coupled with a timestamp. For each valid entry, a valid bit is set.

Version:
"$Id: GPSData.java 1913 2007-08-08 02:41:53Z jpeters $"
Author:
Jan Peters

Field Summary
static int ALTITUDE
          Valid bit for altitude.
private  double altitude_
          Altitude in meters.
static int COURSE
          Valid bit for course.
private  double course_
          Course in .
static int DATE
          Valid bit for date (day/month/year).
static double KMH_PER_KNOT
          Conversion factor: 1 knot = 1.852 km/h
static int LATITUDE
          Valid bit for latitude.
private  Latitude latitude_
          Latitude in decimal degrees.
static int LONGITUDE
          Valid bit for longitude.
private  Longitude longitude_
          Longitude in decimal degrees.
static int SPEED
          Valid bit for speed.
private  double speed_
          Speed in kilometers per hour.
static int TIME
          Valid bit for time (hour:minute:second).
private  Date timestamp_
          Timestamp (time and/or date).
private  int validFields_
          Bit mask contains one set bit for every valid entry (see valid bits).
 
Constructor Summary
GPSData()
           
GPSData(NMEA183Sentence nmea)
           
 
Method Summary
 GPSData deepClone()
           
 double getAltitude()
           
 double getCourse()
           
 Latitude getLatitude()
           
 Longitude getLongitude()
           
 double getSpeed()
           
 Date getTimestamp()
           
 int getValidFields()
           
 WGS84Coordinate getWGS84Coordinate()
           
 void setAltitude(double altitude)
           
 void setCourse(double course)
           
 void setDate(Date date)
           
 void setLatitude(Latitude latitude)
           
 void setLongitude(Longitude longitude)
           
 void setSpeed(double speed)
           
 void setTime(Date time)
           
 void setWGS84Coordinate(WGS84Coordinate wgs)
           
 String toString()
           
 boolean update(GPSData data)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

KMH_PER_KNOT

public static final double KMH_PER_KNOT
Conversion factor: 1 knot = 1.852 km/h

See Also:
Constant Field Values

LATITUDE

public static final int LATITUDE
Valid bit for latitude.

See Also:
Constant Field Values

LONGITUDE

public static final int LONGITUDE
Valid bit for longitude.

See Also:
Constant Field Values

ALTITUDE

public static final int ALTITUDE
Valid bit for altitude.

See Also:
Constant Field Values

COURSE

public static final int COURSE
Valid bit for course.

See Also:
Constant Field Values

SPEED

public static final int SPEED
Valid bit for speed.

See Also:
Constant Field Values

TIME

public static final int TIME
Valid bit for time (hour:minute:second).

See Also:
Constant Field Values

DATE

public static final int DATE
Valid bit for date (day/month/year).

See Also:
Constant Field Values

latitude_

private Latitude latitude_
Latitude in decimal degrees.


longitude_

private Longitude longitude_
Longitude in decimal degrees.


altitude_

private double altitude_
Altitude in meters.


course_

private double course_
Course in .


speed_

private double speed_
Speed in kilometers per hour.


timestamp_

private Date timestamp_
Timestamp (time and/or date).


validFields_

private int validFields_
Bit mask contains one set bit for every valid entry (see valid bits).

Constructor Detail

GPSData

public GPSData()

GPSData

public GPSData(NMEA183Sentence nmea)
Method Detail

getValidFields

public int getValidFields()

update

public boolean update(GPSData data)

setWGS84Coordinate

public void setWGS84Coordinate(WGS84Coordinate wgs)

getWGS84Coordinate

public WGS84Coordinate getWGS84Coordinate()

setLatitude

public void setLatitude(Latitude latitude)

getLatitude

public Latitude getLatitude()

setLongitude

public void setLongitude(Longitude longitude)

getLongitude

public Longitude getLongitude()

setAltitude

public void setAltitude(double altitude)

getAltitude

public double getAltitude()

setCourse

public void setCourse(double course)

getCourse

public double getCourse()

setSpeed

public void setSpeed(double speed)

getSpeed

public double getSpeed()

setDate

public void setDate(Date date)

setTime

public void setTime(Date time)

getTimestamp

public Date getTimestamp()

toString

public String toString()

deepClone

public GPSData deepClone()


Copyright © Fraunhofer Gesellschaft. All Rights Reserved.