lejos.gps
Class Satellite

java.lang.Object
  extended by lejos.gps.Satellite

public class Satellite
extends Object

This class models data extracted from NMEA GSV Sentence $GPGSV,1,1,13,02,02,213,,03,-3,000,,11,00,121,,14,13,172,05*67 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) You can find out more about a satellite by looking up the PRN number here: http://en.wikipedia.org/wiki/List_of_GPS_satellite_launches

Author:
Juan Antonio Brenha Moral

Constructor Summary
Satellite()
           
Satellite(int p, int e, int a, int s)
          Constructor which indicate information about: PRN, Elevation, Azimuth and SNR
 
Method Summary
 int getAzimuth()
          Direction to the satellite in degrees.
 int getElevation()
          How many degrees over the horizon the satellite is.
 int getPRN()
          Return PRN number from a Satellite.
 int getSignalNoiseRatio()
          * Signal to Noise Ratio (SNR) for the signal from a satellite.
 boolean isTracked()
          Indicates if the GPS receiver is actively tracking this satellite and using it to fix the GPS location.
 void setAzimuth(int a)
          Set Azimuth
 void setElevation(int e)
          Set Elevation
 void setPRN(int p)
          Set PRN
 void setSignalNoiseRatio(int s)
          Set SNR
 void setTracked(boolean tracked)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Satellite

public Satellite()

Satellite

public Satellite(int p,
                 int e,
                 int a,
                 int s)
Constructor which indicate information about: PRN, Elevation, Azimuth and SNR

Parameters:
p -
e -
a -
s -
Method Detail

getPRN

public int getPRN()
Return PRN number from a Satellite. PRN stands for Pseudo-Random Noise. The PRN is the index to the assigned pseudorandom number sequence used to encode the satellite transmissions. PRN is a binary signal with random noise-like properties. It is generated by mathematical algorithm or "code", and consists of repeated pattern of 1's and 0's. This binary code can be modulated on the GPS carrier waves using Binary Shift-Key (BSK) modulation. The C/A-Code and the P-Code are examples of PRN codes. Each satellite transmits a unique C/A-Code and P-Code sequence (on the same L1 and L2 frequencies), and hence a satellite may be identified according to its "PRN number", e.g. PRN2 or PRN14 are particular GPS satellites.


setPRN

public void setPRN(int p)
Set PRN

Parameters:
p -

getElevation

public int getElevation()
How many degrees over the horizon the satellite is. This is a value between 0 and 90. 0 means it is by the horizon and 90 straight up.

Returns:
Elevation in degrees (0 to 90)

isTracked

public boolean isTracked()
Indicates if the GPS receiver is actively tracking this satellite and using it to fix the GPS location.

Returns:
true means this satellite is part of the GPS solution. false means it is probably obscured/unable to receive the signal.

setTracked

public void setTracked(boolean tracked)

setElevation

public void setElevation(int e)
Set Elevation

Parameters:
e -

getAzimuth

public int getAzimuth()
Direction to the satellite in degrees. This is a value between 0 and 360. 0 is straight north, 90 is east, 180 is south and 270 is west. Any value in between is of course also valid.

Returns:
Azimuth in degrees, 0 to 360.

setAzimuth

public void setAzimuth(int a)
Set Azimuth

Parameters:
a -

getSignalNoiseRatio

public int getSignalNoiseRatio()
* Signal to Noise Ratio (SNR) for the signal from a satellite. This is a number between 0 and 99. Where 99 is perfect and 0 means the satellite is not available. A typical good value is 40. And a GPS typically starts using a satellite when its SNR value is higher than 25.

Returns:
SNR value between 0 and 99.

setSignalNoiseRatio

public void setSignalNoiseRatio(int s)
Set SNR

Parameters:
s -