lejos.gps
Class VTGSentence

java.lang.Object
  extended by lejos.gps.NMEASentence
      extended by lejos.gps.VTGSentence

public class VTGSentence
extends NMEASentence

VTGSentence is a Class designed to manage VTG Sentences from a NMEA GPS Receiver $GPVTG Track Made Good and Ground Speed. eg1. $GPVTG,360.0,T,348.7,M,000.0,N,000.0,K*43 eg2. $GPVTG,054.7,T,034.4,M,005.5,N,010.2,K*41 054.7,T True course made good over ground, degrees 034.4,M Magnetic course made good over ground, degrees 005.5,N Ground speed, N=Knots 010.2,K Ground speed, K=Kilometers per hour eg3. for NMEA 0183 version 3.00 active the Mode indicator field is added at the end $GPVTG,054.7,T,034.4,M,005.5,N,010.2,K,A*53 A Mode indicator (A=Autonomous, D=Differential, E=Estimated, N=Data not valid)

Author:
Juan Antonio Brenha Moral (major recoding by BB)

Field Summary
static String HEADER
           
 
Fields inherited from class lejos.gps.NMEASentence
nmeaSentence, st
 
Constructor Summary
VTGSentence()
           
 
Method Summary
 String getHeader()
          Returns the NMEA header for this sentence.
 float getMagneticCourse()
          Get magnetic course, in degrees.
 float getSpeed()
          Get Speed in Kilometers
 float getTrueCourse()
          Get true course, in degrees.
protected  void parse(String sentence)
          Parase a RMC Sentence $GPVTG,054.7,T,034.4,M,005.5,N,010.2,K,A*53
 
Methods inherited from class lejos.gps.NMEASentence
checkRefresh, degreesMinToDegrees, getTimeStamp, isValid, setSentence
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

HEADER

public static final String HEADER
See Also:
Constant Field Values
Constructor Detail

VTGSentence

public VTGSentence()
Method Detail

getHeader

public String getHeader()
Returns the NMEA header for this sentence.

Specified by:
getHeader in class NMEASentence
Returns:
The NMEA header string ($GPGGA, $GPVTG, etc...)

getSpeed

public float getSpeed()
Get Speed in Kilometers

Returns:
the speed in kilometers per ???

getTrueCourse

public float getTrueCourse()
Get true course, in degrees.

Returns:
the true course in degrees 0.0 to 360.0

getMagneticCourse

public float getMagneticCourse()
Get magnetic course, in degrees. Holux-1200 GPS doesn't have a built in magnetic compass so this value is blank.

Returns:
the magnetic course in degrees 0.0 to 360.0

parse

protected void parse(String sentence)
Parase a RMC Sentence $GPVTG,054.7,T,034.4,M,005.5,N,010.2,K,A*53

Specified by:
parse in class NMEASentence