# GpsSatellite

Added in[API level 3](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  
Deprecated in[API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  
Summary:[Methods](https://developer.android.com/reference/android/location/GpsSatellite#pubmethods)\|[Inherited Methods](https://developer.android.com/reference/android/location/GpsSatellite#inhmethods)  

# GpsSatellite

*** ** * ** ***

[Kotlin](https://developer.android.com/reference/kotlin/android/location/GpsSatellite "View this page in Kotlin")\|Java

`
public

final

class
GpsSatellite
`  
`

extends `[Object](https://developer.android.com/reference/java/lang/Object)`


``


`

|---|-------------------------------|
| [java.lang.Object](https://developer.android.com/reference/java/lang/Object) ||
| ↳ | android.location.GpsSatellite |

<br />

*** ** * ** ***

<br />

**This class was deprecated in API level 24.**   
use[GnssStatus](https://developer.android.com/reference/android/location/GnssStatus)and[GnssStatus.Callback](https://developer.android.com/reference/android/location/GnssStatus.Callback).

This class represents the current state of a GPS satellite. This class is used in conjunction with the[GpsStatus](https://developer.android.com/reference/android/location/GpsStatus)class.

## Summary

|                                                                                                  ### Public methods                                                                                                   ||
|------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| ` float`   | ` `[getAzimuth](https://developer.android.com/reference/android/location/GpsSatellite#getAzimuth())`() ` Returns the azimuth of the satellite in degrees.                                                 |
| ` float`   | ` `[getElevation](https://developer.android.com/reference/android/location/GpsSatellite#getElevation())`() ` Returns the elevation of the satellite in degrees.                                           |
| ` int`     | ` `[getPrn](https://developer.android.com/reference/android/location/GpsSatellite#getPrn())`() ` Returns the PRN (pseudo-random number) for the satellite.                                                |
| ` float`   | ` `[getSnr](https://developer.android.com/reference/android/location/GpsSatellite#getSnr())`() ` Returns the signal to noise ratio for the satellite.                                                     |
| ` boolean` | ` `[hasAlmanac](https://developer.android.com/reference/android/location/GpsSatellite#hasAlmanac())`() ` Returns true if the GPS engine has almanac data for the satellite.                               |
| ` boolean` | ` `[hasEphemeris](https://developer.android.com/reference/android/location/GpsSatellite#hasEphemeris())`() ` Returns true if the GPS engine has ephemeris data for the satellite.                         |
| ` boolean` | ` `[usedInFix](https://developer.android.com/reference/android/location/GpsSatellite#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](https://developer.android.com/reference/java/lang/Object)` ` |--------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | ` `[Object](https://developer.android.com/reference/java/lang/Object)          | ` `[clone](https://developer.android.com/reference/java/lang/Object#clone())`() ` Creates and returns a copy of this object.                                                                                                                                                      | | ` boolean`                                                                     | ` `[equals](https://developer.android.com/reference/java/lang/Object#equals(java.lang.Object))`(`[Object](https://developer.android.com/reference/java/lang/Object)` obj) ` Indicates whether some other object is "equal to" this one.                                           | | ` void`                                                                        | ` `[finalize](https://developer.android.com/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](https://developer.android.com/reference/java/lang/Class)`<?>` | ` `[getClass](https://developer.android.com/reference/java/lang/Object#getClass())`() ` Returns the runtime class of this`Object`.                                                                                                                                                | | ` int`                                                                         | ` `[hashCode](https://developer.android.com/reference/java/lang/Object#hashCode())`() ` Returns a hash code value for the object.                                                                                                                                                 | | ` final void`                                                                  | ` `[notify](https://developer.android.com/reference/java/lang/Object#notify())`() ` Wakes up a single thread that is waiting on this object's monitor.                                                                                                                            | | ` final void`                                                                  | ` `[notifyAll](https://developer.android.com/reference/java/lang/Object#notifyAll())`() ` Wakes up all threads that are waiting on this object's monitor.                                                                                                                         | | ` `[String](https://developer.android.com/reference/java/lang/String)          | ` `[toString](https://developer.android.com/reference/java/lang/Object#toString())`() ` Returns a string representation of the object.                                                                                                                                            | | ` final void`                                                                  | ` `[wait](https://developer.android.com/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](https://developer.android.com/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](https://developer.android.com/reference/java/lang/Object#wait())`() ` Causes the current thread to wait until it is awakened, typically by being*notified* or*interrupted*.                                                                                             | ||

## Public methods

### getAzimuth

Added in[API level 3](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  

```
public float getAzimuth ()
```

Returns the azimuth of the satellite in degrees. The azimuth can vary between 0 and 360.

<br />

|                Returns                 ||
|---------|-------------------------------|
| `float` | the azimuth in degrees <br /> |

### getElevation

Added in[API level 3](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  

```
public float getElevation ()
```

Returns the elevation of the satellite in degrees. The elevation can vary between 0 and 90.

<br />

|                 Returns                  ||
|---------|---------------------------------|
| `float` | the elevation in degrees <br /> |

### getPrn

Added in[API level 3](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  

```
public int getPrn ()
```

Returns the PRN (pseudo-random number) for the satellite.

<br />

|         Returns          ||
|-------|-------------------|
| `int` | PRN number <br /> |

### getSnr

Added in[API level 3](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  

```
public float getSnr ()
```

Returns the signal to noise ratio for the satellite.

<br />

|                  Returns                  ||
|---------|----------------------------------|
| `float` | the signal to noise ratio <br /> |

### hasAlmanac

Added in[API level 3](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  

```
public boolean hasAlmanac ()
```

Returns true if the GPS engine has almanac data for the satellite.

<br />

|                         Returns                          ||
|-----------|-----------------------------------------------|
| `boolean` | true if the satellite has almanac data <br /> |

### hasEphemeris

Added in[API level 3](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  

```
public boolean hasEphemeris ()
```

Returns true if the GPS engine has ephemeris data for the satellite.

<br />

|                          Returns                           ||
|-----------|-------------------------------------------------|
| `boolean` | true if the satellite has ephemeris data <br /> |

### usedInFix

Added in[API level 3](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  

```
public boolean usedInFix ()
```

Returns true if the satellite was used by the GPS engine when calculating the most recent GPS fix.

<br />

|                                     Returns                                      ||
|-----------|-----------------------------------------------------------------------|
| `boolean` | true if the satellite was used to compute the most recent fix. <br /> |