FileDocCategorySizeDatePackage
GpsSatellite.javaAPI DocAndroid 1.5 API3152Wed May 06 22:42:00 BST 2009android.location

GpsSatellite

public final class GpsSatellite extends Object
This class represents the current state of a GPS satellite. This class is used in conjunction with the {@link GpsStatus} class.

Fields Summary
boolean
mValid
boolean
mHasEphemeris
boolean
mHasAlmanac
boolean
mUsedInFix
int
mPrn
float
mSnr
float
mElevation
float
mAzimuth
Constructors Summary
GpsSatellite(int prn)

        mPrn = prn;
    
Methods Summary
public floatgetAzimuth()
Returns the azimuth of the satellite in degrees. The azimuth can vary between 0 and 360.

return
the azimuth in degrees

        return mAzimuth;
    
public floatgetElevation()
Returns the elevation of the satellite in degrees. The elevation can vary between 0 and 90.

return
the elevation in degrees

        return mElevation;
    
public intgetPrn()
Returns the PRN (pseudo-random number) for the satellite.

return
PRN number

        return mPrn;
    
public floatgetSnr()
Returns the signal to noise ratio for the satellite.

return
the signal to noise ratio

        return mSnr;
    
public booleanhasAlmanac()
Returns true if the GPS engine has almanac data for the satellite.

return
true if the satellite has almanac data

        return mHasAlmanac;
    
public booleanhasEphemeris()
Returns true if the GPS engine has ephemeris data for the satellite.

return
true if the satellite has ephemeris data

        return mHasEphemeris;
    
voidsetStatus(android.location.GpsSatellite satellite)
Used by {@link LocationManager#getGpsStatus} to copy LocationManager's cached GpsStatus instance to the client's copy.

        mValid = satellite.mValid;
        mHasEphemeris = satellite.mHasEphemeris;
        mHasAlmanac = satellite.mHasAlmanac;
        mUsedInFix = satellite.mUsedInFix;
        mSnr = satellite.mSnr;
        mElevation = satellite.mElevation;
        mAzimuth = satellite.mAzimuth;
    
public booleanusedInFix()
Returns true if the satellite was used by the GPS engine when calculating the most recent GPS fix.

return
true if the satellite was used to compute the most recent fix.

        return mUsedInFix;