net.sf.marineapi.provider.event
Class PositionEvent

java.lang.Object
  extended by java.util.EventObject
      extended by net.sf.marineapi.provider.event.ProviderEvent
          extended by net.sf.marineapi.provider.event.PositionEvent
All Implemented Interfaces:
Serializable, Cloneable

public class PositionEvent
extends ProviderEvent
implements Cloneable

GPS time/position/velocity report with current position, altitude, speed, course and a time stamp. Notice that altitude may be missing, depending on the source sentence of position (only GGASentence contains altitude).

Author:
Kimmo Tuukkanen
See Also:
PositionProvider, PositionListener, Serialized Form

Field Summary
 
Fields inherited from class java.util.EventObject
source
 
Constructor Summary
PositionEvent(Object source, Position p, double sog, double cog, Date d, Time t, FaaMode m, GpsFixQuality fq)
          Creates a new instance of PositionEvent.
 
Method Summary
 PositionEvent clone()
           
 Double getCourse()
          Returns the current (true) course over ground.
 Date getDate()
          Returns the date.
 GpsFixQuality getFixQuality()
          Returns the current GPS fix quality.
 FaaMode getMode()
          Returns the current FAA operating mode of GPS receiver.
 Position getPosition()
          Returns the current position.
 Double getSpeed()
          Returns the current speed over ground, in km/h.
 Time getTime()
          Returns the time.
 String toString()
           
 
Methods inherited from class java.util.EventObject
getSource
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

PositionEvent

public PositionEvent(Object source,
                     Position p,
                     double sog,
                     double cog,
                     Date d,
                     Time t,
                     FaaMode m,
                     GpsFixQuality fq)
Creates a new instance of PositionEvent.

Parameters:
source - Source object of event
Method Detail

clone

public PositionEvent clone()
Overrides:
clone in class Object

getCourse

public Double getCourse()
Returns the current (true) course over ground.

Returns:
the course

getDate

public Date getDate()
Returns the date.

Returns:
Date

getFixQuality

public GpsFixQuality getFixQuality()
Returns the current GPS fix quality.

Returns:
GpsFixQuality

getMode

public FaaMode getMode()
Returns the current FAA operating mode of GPS receiver.

Returns:
FaaMode

getPosition

public Position getPosition()
Returns the current position.

Returns:
Position

getSpeed

public Double getSpeed()
Returns the current speed over ground, in km/h.

Returns:
the speed

getTime

public Time getTime()
Returns the time.

Returns:
Time

toString

public String toString()
Overrides:
toString in class EventObject


Copyright (C) 2010-2014 Java Marine API authors. All Rights Reserved.