jaron.gps
Class Trackpoint

java.lang.Object
  extended by jaron.gps.Trackpoint

public class Trackpoint
extends java.lang.Object

The Trackpoint class represents a GPS track point.
A list or array of track points represent a GPS track.

Since:
1.1
Version:
1.2
Author:
jarontec gmail com

Constructor Summary
Trackpoint()
           
 
Method Summary
 double getAltitude()
          Returns the current altitude at this track point.
 double getCourse()
          Returns the course on which this trackpoint was reached.
 double getDistance()
          Returns the distance of the track until this track point.
 java.lang.String getDuration()
          Returns the duration of the track until this track point.
 double getGroundSpeed()
          Returns the ground speed reached at this track point.
 Latitude getLatitude()
          Returns a Latitude object containig a latitude coordinate of a geographical location.
 Longitude getLongitude()
          Returns a Longitude object containig a longitude coordinate of a geographical location.
 int getSatellites()
          Returns the number of satellites that where reachable at this track point.
 java.util.Date getTimestamp()
          Returns the current time when of this track point.
 void setAltitude(double altitude)
          Sets the current altitude of this track point.
 void setCourse(double course)
          Sets the current course.
 void setDistance(double distance)
          Sets the distance of the track until this track point.
 void setDuration(java.lang.String duration)
          Sets the duration of the track until this track point.
 void setGroundSpeed(double speed)
          Sets the ground speed reached at this track point.
 void setGroundSpeedKnots(double speed)
          Sets the ground speed reached at this track point.
 void setLatitude(Latitude latitude)
          Sets the geographical latitude coordinate of this track point.
 void setLongitude(Longitude longitude)
          Sets the geographical longitude coordinate of this track point.
 void setSatellites(int satellites)
          Sets the number of satellites that where reachable at this track point.
 void setTimestamp(java.util.Date time)
          Sets the current time of this track point.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Trackpoint

public Trackpoint()
Method Detail

setDuration

public void setDuration(java.lang.String duration)
Sets the duration of the track until this track point.
This value is normally calculated and set by a Trackpath object.

Parameters:
duration - the track duration

getDuration

public java.lang.String getDuration()
Returns the duration of the track until this track point.

Returns:
the track duration so far

setDistance

public void setDistance(double distance)
Sets the distance of the track until this track point.
This value is normally calculated and set by a Trackpath object.

Parameters:
distance - the track distance in kilometers

getDistance

public double getDistance()
Returns the distance of the track until this track point.

Returns:
the track distance in kilometers

getLatitude

public Latitude getLatitude()
Returns a Latitude object containig a latitude coordinate of a geographical location.

Returns:
a latitude coordinate

setLatitude

public void setLatitude(Latitude latitude)
Sets the geographical latitude coordinate of this track point.

Parameters:
latitude - the latitude coordinate

getLongitude

public Longitude getLongitude()
Returns a Longitude object containig a longitude coordinate of a geographical location.

Returns:
a longitude coordinate

setLongitude

public void setLongitude(Longitude longitude)
Sets the geographical longitude coordinate of this track point.

Parameters:
longitude - the longitude coordinate

getAltitude

public double getAltitude()
Returns the current altitude at this track point.

Returns:
current altitude in meters

setAltitude

public void setAltitude(double altitude)
Sets the current altitude of this track point.

Parameters:
altitude - the new altitude in meters

getTimestamp

public java.util.Date getTimestamp()
Returns the current time when of this track point.

Returns:
the current time

setTimestamp

public void setTimestamp(java.util.Date time)
Sets the current time of this track point.

Parameters:
time - the new time

getGroundSpeed

public double getGroundSpeed()
Returns the ground speed reached at this track point.

Returns:
ground speed in kilometer per hour

setGroundSpeed

public void setGroundSpeed(double speed)
Sets the ground speed reached at this track point.

Parameters:
speed - ground speed in kilometers per hour

setGroundSpeedKnots

public void setGroundSpeedKnots(double speed)
Sets the ground speed reached at this track point.

Parameters:
speed - ground speed in knots

getSatellites

public int getSatellites()
Returns the number of satellites that where reachable at this track point.

Returns:
number of satellites

setSatellites

public void setSatellites(int satellites)
Sets the number of satellites that where reachable at this track point.

Parameters:
satellites - new number of satellites

getCourse

public double getCourse()
Returns the course on which this trackpoint was reached.

Returns:
course in degrees

setCourse

public void setCourse(double course)
Sets the current course.

Parameters:
course - in degrees