public interface

Gps

implements Instrument

 com.parrot.drone.groundsdk.device.instrument.Gps

Overview

Instrument that informs about the drone current position.

This instrument can be obtained from a drone using:

 drone.getInstrument(Gps.class)

Summary

Methods
public intgetSatelliteCount()

Gets the amount of satellites currently used to obtain the location.

public OptionalDoublegetVerticalAccuracy()

Gets the current vertical accuracy, in meters.

public booleanisFixed()

Tells whether the drone GPS is currently fixed.

public LocationlastKnownLocation()

Gets the last known GPS location.

Methods

public boolean isFixed()

Tells whether the drone GPS is currently fixed.

Returns:

true if a GPS fix has been obtained, false otherwise

public Location lastKnownLocation()

Gets the last known GPS location.

Returns:

last known GPS location if available, otherwise null

public OptionalDouble getVerticalAccuracy()

Gets the current vertical accuracy, in meters.

Vertical accuracy may be unsupported depending on the drone model and/or firmware versions.
Hence, clients of this API should call isAvailable method on the returned value to check whether it can be considered valid before use.

Returns:

current vertical accuracy

See also: OptionalDouble

public int getSatelliteCount()

Gets the amount of satellites currently used to obtain the location.

Returns:

the amount of satellites currently used if a GPS fix has been obtained, otherwise 0