lejos.gps
Class GSVSentence

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

public class GSVSentence
extends NMEASentence

This class has been designed to manage a GSV Sentence GPS Satellites in View eg. $GPGSV,3,1,11,03,03,111,00,04,15,270,00,06,01,010,00,13,06,292,00*74 $GPGSV,3,2,11,14,25,170,00,16,57,208,39,18,67,296,40,19,40,246,00*74 $GPGSV,3,3,11,22,42,067,42,24,14,311,43,27,05,244,00,,,,*4D $GPGSV,1,1,13,02,02,213,,03,-3,000,,11,00,121,,14,13,172,05*67 1 = Total number of messages of this type in this cycle 2 = Message number 3 = Total number of SVs in view 4 = SV PRN number 5 = Elevation in degrees, 90 maximum 6 = Azimuth, degrees from true north, 000 to 359 7 = SNR, 00-99 dB (null when not tracking) 8-11 = Information about second SV, same as field 4-7 12-15= Information about third SV, same as field 4-7 16-19= Information about fourth SV, same as field 4-7

Author:
recoded by BB

Field Summary
static String HEADER
           
 
Fields inherited from class lejos.gps.NMEASentence
nmeaSentence, st
 
Constructor Summary
GSVSentence()
           
 
Method Summary
protected  void checkRefresh()
          This method is called by all the getter methods.
 String getHeader()
          Returns the NMEA header for this sentence.
 Satellite getSatellite(int index)
          Return a NMEA Satellite object.
 int getSatellitesInView()
          Returns the number of satellites currently in view.
protected  void parse(String sentence)
          Method used to parse a GSV Sentence
 
Methods inherited from class lejos.gps.NMEASentence
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

GSVSentence

public GSVSentence()
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...)

getSatellitesInView

public int getSatellitesInView()
Returns the number of satellites currently in view.

Returns:
Number of satellites e.g. 8

getSatellite

public Satellite getSatellite(int index)
Return a NMEA Satellite object.

Parameters:
index - the index of the satellite
Returns:
theNMEASatellite object for the selected satellite

checkRefresh

protected void checkRefresh()
This method is called by all the getter methods. It checks if a new sentence has been received since the last call. It sets nmeaSentence to null to act as flag for when method called again.

Overrides:
checkRefresh in class NMEASentence

parse

protected void parse(String sentence)
Method used to parse a GSV Sentence

Specified by:
parse in class NMEASentence