Stay organized with collections
Save and categorize content based on your preferences.
GpsSatellite
class GpsSatellite
This class represents the current state of a GPS satellite. This class is used in conjunction with the GpsStatus
class.
Summary
Public methods |
Float |
Returns the azimuth of the satellite in degrees.
|
Float |
Returns the elevation of the satellite in degrees.
|
Int |
Returns the PRN (pseudo-random number) for the satellite.
|
Float |
Returns the signal to noise ratio for the satellite.
|
Boolean |
Returns true if the GPS engine has almanac data for the satellite.
|
Boolean |
Returns true if the GPS engine has ephemeris data for the satellite.
|
Boolean |
Returns true if the satellite was used by the GPS engine when calculating the most recent GPS fix.
|
Public methods
getAzimuth
fun getAzimuth(): Float
Deprecated: Deprecated in Java.
Returns the azimuth of the satellite in degrees. The azimuth can vary between 0 and 360.
Return |
Float |
the azimuth in degrees |
getElevation
fun getElevation(): Float
Deprecated: Deprecated in Java.
Returns the elevation of the satellite in degrees. The elevation can vary between 0 and 90.
Return |
Float |
the elevation in degrees |
getPrn
fun getPrn(): Int
Deprecated: Deprecated in Java.
Returns the PRN (pseudo-random number) for the satellite.
getSnr
fun getSnr(): Float
Deprecated: Deprecated in Java.
Returns the signal to noise ratio for the satellite.
Return |
Float |
the signal to noise ratio |
hasAlmanac
fun hasAlmanac(): Boolean
Deprecated: Deprecated in Java.
Returns true if the GPS engine has almanac data for the satellite.
Return |
Boolean |
true if the satellite has almanac data |
hasEphemeris
fun hasEphemeris(): Boolean
Deprecated: Deprecated in Java.
Returns true if the GPS engine has ephemeris data for the satellite.
Return |
Boolean |
true if the satellite has ephemeris data |
usedInFix
fun usedInFix(): Boolean
Deprecated: Deprecated in Java.
Returns true if the satellite was used by the GPS engine when calculating the most recent GPS fix.
Return |
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](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \nDeprecated in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)\n\nGpsSatellite\n============\n\n*** ** * ** ***\n\nKotlin \\|[Java](/reference/android/location/GpsSatellite \"View this page in Java\") \n\n```\nclass GpsSatellite\n```\n\n|---|------------------------------------|\n| [kotlin.Any](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html) ||\n| ↳ | [android.location.GpsSatellite](#) |\n\n*** ** * ** ***\n\n| **This class was deprecated in API level 24.**\n|\n| use [GnssStatus](/reference/kotlin/android/location/GnssStatus) and [GnssStatus.Callback](/reference/kotlin/android/location/GnssStatus.Callback).\n\nThis class represents the current state of a GPS satellite. This class is used in conjunction with the [GpsStatus](/reference/kotlin/android/location/GpsStatus) class.\n\nSummary\n-------\n\n| Public methods ||\n|------------------------------------------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------|\n| [Float](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-float/index.html) | [getAzimuth](#getAzimuth())`()` Returns the azimuth of the satellite in degrees. |\n| [Float](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-float/index.html) | [getElevation](#getElevation())`()` Returns the elevation of the satellite in degrees. |\n| [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) | [getPrn](#getPrn())`()` Returns the PRN (pseudo-random number) for the satellite. |\n| [Float](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-float/index.html) | [getSnr](#getSnr())`()` Returns the signal to noise ratio for the satellite. |\n| [Boolean](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html) | [hasAlmanac](#hasAlmanac())`()` Returns true if the GPS engine has almanac data for the satellite. |\n| [Boolean](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html) | [hasEphemeris](#hasEphemeris())`()` Returns true if the GPS engine has ephemeris data for the satellite. |\n| [Boolean](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html) | [usedInFix](#usedInFix())`()` Returns true if the satellite was used by the GPS engine when calculating the most recent GPS fix. |\n\nPublic methods\n--------------\n\n### getAzimuth\n\nAdded in [API level 3](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nfun getAzimuth(): Float\n```\n\n**Deprecated:** *Deprecated in Java.*\n\nReturns the azimuth of the satellite in degrees. The azimuth can vary between 0 and 360.\n\n| Return ||\n|--------------------------------------------------------------------------------|------------------------|\n| [Float](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-float/index.html) | the azimuth in degrees |\n\n### getElevation\n\nAdded in [API level 3](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nfun getElevation(): Float\n```\n\n**Deprecated:** *Deprecated in Java.*\n\nReturns the elevation of the satellite in degrees. The elevation can vary between 0 and 90.\n\n| Return ||\n|--------------------------------------------------------------------------------|--------------------------|\n| [Float](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-float/index.html) | the elevation in degrees |\n\n### getPrn\n\nAdded in [API level 3](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nfun getPrn(): Int\n```\n\n**Deprecated:** *Deprecated in Java.*\n\nReturns the PRN (pseudo-random number) for the satellite.\n\n| Return ||\n|----------------------------------------------------------------------------|------------|\n| [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) | PRN number |\n\n### getSnr\n\nAdded in [API level 3](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nfun getSnr(): Float\n```\n\n**Deprecated:** *Deprecated in Java.*\n\nReturns the signal to noise ratio for the satellite.\n\n| Return ||\n|--------------------------------------------------------------------------------|---------------------------|\n| [Float](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-float/index.html) | the signal to noise ratio |\n\n### hasAlmanac\n\nAdded in [API level 3](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nfun hasAlmanac(): Boolean\n```\n\n**Deprecated:** *Deprecated in Java.*\n\nReturns true if the GPS engine has almanac data for the satellite.\n\n| Return ||\n|------------------------------------------------------------------------------------|----------------------------------------|\n| [Boolean](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html) | true if the satellite has almanac data |\n\n### hasEphemeris\n\nAdded in [API level 3](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nfun hasEphemeris(): Boolean\n```\n\n**Deprecated:** *Deprecated in Java.*\n\nReturns true if the GPS engine has ephemeris data for the satellite.\n\n| Return ||\n|------------------------------------------------------------------------------------|------------------------------------------|\n| [Boolean](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html) | true if the satellite has ephemeris data |\n\n### usedInFix\n\nAdded in [API level 3](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nfun usedInFix(): Boolean\n```\n\n**Deprecated:** *Deprecated in Java.*\n\nReturns true if the satellite was used by the GPS engine when calculating the most recent GPS fix.\n\n| Return ||\n|------------------------------------------------------------------------------------|----------------------------------------------------------------|\n| [Boolean](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html) | true if the satellite was used to compute the most recent fix. |"]]