Stay organized with collections
Save and categorize content based on your preferences.
GpsSatellite
public
final
class
GpsSatellite
extends Object
This class was deprecated
in API level 24.
use GnssStatus
and GnssStatus.Callback
.
This class represents the current state of a GPS satellite.
This class is used in conjunction with the GpsStatus
class.
Summary
Public methods |
float
|
getAzimuth()
Returns the azimuth of the satellite in degrees.
|
float
|
getElevation()
Returns the elevation of the satellite in degrees.
|
int
|
getPrn()
Returns the PRN (pseudo-random number) for the satellite.
|
float
|
getSnr()
Returns the signal to noise ratio for the satellite.
|
boolean
|
hasAlmanac()
Returns true if the GPS engine has almanac data for the satellite.
|
boolean
|
hasEphemeris()
Returns true if the GPS engine has ephemeris data for the satellite.
|
boolean
|
usedInFix()
Returns true if the satellite was used by the GPS engine when
calculating the most recent GPS fix.
|
Inherited methods |
From class
java.lang.Object
Object
|
clone()
Creates and returns a copy of this object.
|
boolean
|
equals(Object obj)
Indicates whether some other object is "equal to" this one.
|
void
|
finalize()
Called by the garbage collector on an object when garbage collection
determines that there are no more references to the object.
|
final
Class<?>
|
getClass()
Returns the runtime class of this Object .
|
int
|
hashCode()
Returns a hash code value for the object.
|
final
void
|
notify()
Wakes up a single thread that is waiting on this object's
monitor.
|
final
void
|
notifyAll()
Wakes up all threads that are waiting on this object's monitor.
|
String
|
toString()
Returns a string representation of the object.
|
final
void
|
wait(long timeoutMillis, int nanos)
Causes the current thread to wait until it is awakened, typically
by being notified or interrupted, or until a
certain amount of real time has elapsed.
|
final
void
|
wait(long timeoutMillis)
Causes the current thread to wait until it is awakened, typically
by being notified or interrupted, or until a
certain amount of real time has elapsed.
|
final
void
|
wait()
Causes the current thread to wait until it is awakened, typically
by being notified or interrupted.
|
|
Public methods
getAzimuth
public float getAzimuth ()
Returns the azimuth of the satellite in degrees.
The azimuth can vary between 0 and 360.
Returns |
float |
the azimuth in degrees |
getElevation
public float getElevation ()
Returns the elevation of the satellite in degrees.
The elevation can vary between 0 and 90.
Returns |
float |
the elevation in degrees |
getPrn
public int getPrn ()
Returns the PRN (pseudo-random number) for the satellite.
getSnr
public float getSnr ()
Returns the signal to noise ratio for the satellite.
Returns |
float |
the signal to noise ratio |
hasAlmanac
public boolean hasAlmanac ()
Returns true if the GPS engine has almanac data for the satellite.
Returns |
boolean |
true if the satellite has almanac data |
hasEphemeris
public boolean hasEphemeris ()
Returns true if the GPS engine has ephemeris data for the satellite.
Returns |
boolean |
true if the satellite has ephemeris data |
usedInFix
public boolean usedInFix ()
Returns true if the satellite was used by the GPS engine when
calculating the most recent GPS fix.
Returns |
boolean |
true if the satellite was used to compute the most recent fix. |
Content and code samples on this page are subject to the licenses described in the Content License. Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
Last updated 2025-02-10 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-02-10 UTC."],[],[],null,["# GpsSatellite\n\nAdded in [API level 3](/guide/topics/manifest/uses-sdk-element#ApiLevels) \nDeprecated in [API level\n24](/guide/topics/manifest/uses-sdk-element#ApiLevels) \nSummary: [Methods](#pubmethods) \\| [Inherited Methods](#inhmethods) \n\nGpsSatellite\n============\n\n*** ** * ** ***\n\n[Kotlin](/reference/kotlin/android/location/GpsSatellite \"View this page in Kotlin\") \\|Java\n\n\n`\npublic\n\nfinal\n\nclass\nGpsSatellite\n`\n\n\n`\n\nextends `[Object](/reference/java/lang/Object)`\n\n\n`\n\n`\n\n\n`\n\n|---|-------------------------------|\n| [java.lang.Object](/reference/java/lang/Object) ||\n| ↳ | android.location.GpsSatellite |\n\n\u003cbr /\u003e\n\n*** ** * ** ***\n\n\n**This class was deprecated\nin API level 24.** \n\nuse [GnssStatus](/reference/android/location/GnssStatus) and [GnssStatus.Callback](/reference/android/location/GnssStatus.Callback).\n\nThis class represents the current state of a GPS satellite.\n\nThis class is used in conjunction with the [GpsStatus](/reference/android/location/GpsStatus) class.\n\nSummary\n-------\n\n| ### Public methods ||\n|------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| ` float` | ` `[getAzimuth](/reference/android/location/GpsSatellite#getAzimuth())`() ` Returns the azimuth of the satellite in degrees. |\n| ` float` | ` `[getElevation](/reference/android/location/GpsSatellite#getElevation())`() ` Returns the elevation of the satellite in degrees. |\n| ` int` | ` `[getPrn](/reference/android/location/GpsSatellite#getPrn())`() ` Returns the PRN (pseudo-random number) for the satellite. |\n| ` float` | ` `[getSnr](/reference/android/location/GpsSatellite#getSnr())`() ` Returns the signal to noise ratio for the satellite. |\n| ` boolean` | ` `[hasAlmanac](/reference/android/location/GpsSatellite#hasAlmanac())`() ` Returns true if the GPS engine has almanac data for the satellite. |\n| ` boolean` | ` `[hasEphemeris](/reference/android/location/GpsSatellite#hasEphemeris())`() ` Returns true if the GPS engine has ephemeris data for the satellite. |\n| ` boolean` | ` `[usedInFix](/reference/android/location/GpsSatellite#usedInFix())`() ` Returns true if the satellite was used by the GPS engine when calculating the most recent GPS fix. |\n\n| ### Inherited methods |\n|-----------------------|---|\n| From class ` `[java.lang.Object](/reference/java/lang/Object)` ` |---------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | ` `[Object](/reference/java/lang/Object) | ` `[clone](/reference/java/lang/Object#clone())`() ` Creates and returns a copy of this object. | | ` boolean` | ` `[equals](/reference/java/lang/Object#equals(java.lang.Object))`(`[Object](/reference/java/lang/Object)` obj) ` Indicates whether some other object is \"equal to\" this one. | | ` void` | ` `[finalize](/reference/java/lang/Object#finalize())`() ` Called by the garbage collector on an object when garbage collection determines that there are no more references to the object. | | ` final `[Class](/reference/java/lang/Class)`\u003c?\u003e` | ` `[getClass](/reference/java/lang/Object#getClass())`() ` Returns the runtime class of this `Object`. | | ` int` | ` `[hashCode](/reference/java/lang/Object#hashCode())`() ` Returns a hash code value for the object. | | ` final void` | ` `[notify](/reference/java/lang/Object#notify())`() ` Wakes up a single thread that is waiting on this object's monitor. | | ` final void` | ` `[notifyAll](/reference/java/lang/Object#notifyAll())`() ` Wakes up all threads that are waiting on this object's monitor. | | ` `[String](/reference/java/lang/String) | ` `[toString](/reference/java/lang/Object#toString())`() ` Returns a string representation of the object. | | ` final void` | ` `[wait](/reference/java/lang/Object#wait(long,%20int))`(long timeoutMillis, int nanos) ` Causes the current thread to wait until it is awakened, typically by being *notified* or *interrupted*, or until a certain amount of real time has elapsed. | | ` final void` | ` `[wait](/reference/java/lang/Object#wait(long))`(long timeoutMillis) ` Causes the current thread to wait until it is awakened, typically by being *notified* or *interrupted*, or until a certain amount of real time has elapsed. | | ` final void` | ` `[wait](/reference/java/lang/Object#wait())`() ` Causes the current thread to wait until it is awakened, typically by being *notified* or *interrupted*. | ||\n\nPublic methods\n--------------\n\n### getAzimuth\n\nAdded in [API level 3](/guide/topics/manifest/uses-sdk-element#ApiLevels) \n\n```\npublic float getAzimuth ()\n```\n\nReturns the azimuth of the satellite in degrees.\nThe azimuth can vary between 0 and 360.\n\n\u003cbr /\u003e\n\n| Returns ||\n|---------|-------------------------------|\n| `float` | the azimuth in degrees \u003cbr /\u003e |\n\n### getElevation\n\nAdded in [API level 3](/guide/topics/manifest/uses-sdk-element#ApiLevels) \n\n```\npublic float getElevation ()\n```\n\nReturns the elevation of the satellite in degrees.\nThe elevation can vary between 0 and 90.\n\n\u003cbr /\u003e\n\n| Returns ||\n|---------|---------------------------------|\n| `float` | the elevation in degrees \u003cbr /\u003e |\n\n### getPrn\n\nAdded in [API level 3](/guide/topics/manifest/uses-sdk-element#ApiLevels) \n\n```\npublic int getPrn ()\n```\n\nReturns the PRN (pseudo-random number) for the satellite.\n\n\u003cbr /\u003e\n\n| Returns ||\n|-------|-------------------|\n| `int` | PRN number \u003cbr /\u003e |\n\n### getSnr\n\nAdded in [API level 3](/guide/topics/manifest/uses-sdk-element#ApiLevels) \n\n```\npublic float getSnr ()\n```\n\nReturns the signal to noise ratio for the satellite.\n\n\u003cbr /\u003e\n\n| Returns ||\n|---------|----------------------------------|\n| `float` | the signal to noise ratio \u003cbr /\u003e |\n\n### hasAlmanac\n\nAdded in [API level 3](/guide/topics/manifest/uses-sdk-element#ApiLevels) \n\n```\npublic boolean hasAlmanac ()\n```\n\nReturns true if the GPS engine has almanac data for the satellite.\n\n\u003cbr /\u003e\n\n| Returns ||\n|-----------|-----------------------------------------------|\n| `boolean` | true if the satellite has almanac data \u003cbr /\u003e |\n\n### hasEphemeris\n\nAdded in [API level 3](/guide/topics/manifest/uses-sdk-element#ApiLevels) \n\n```\npublic boolean hasEphemeris ()\n```\n\nReturns true if the GPS engine has ephemeris data for the satellite.\n\n\u003cbr /\u003e\n\n| Returns ||\n|-----------|-------------------------------------------------|\n| `boolean` | true if the satellite has ephemeris data \u003cbr /\u003e |\n\n### usedInFix\n\nAdded in [API level 3](/guide/topics/manifest/uses-sdk-element#ApiLevels) \n\n```\npublic boolean usedInFix ()\n```\n\nReturns true if the satellite was used by the GPS engine when\ncalculating the most recent GPS fix.\n\n\u003cbr /\u003e\n\n| Returns ||\n|-----------|-----------------------------------------------------------------------|\n| `boolean` | true if the satellite was used to compute the most recent fix. \u003cbr /\u003e |"]]