Location Sensor

Measure GPS latitude and longitude in decimal degrees and altitude in meters.

Description

Measure GPS latitude and longitude in decimal degrees and altitude in meters.

The block outputs the latitude, longitude, and altitude as a 1–by-3 vector of single—precision values.

The GPS measurements are referenced to the most recent revision of the World Geodetic System (WGS84). GPS sensor accuracy is typically measured in meters. When converting latitude and longitude from decimal degrees to meters, the decimal degree values should only be considered to within 6 decimal places. For example, at the equator, 0.000001 degrees is approximately 11.1 centimeters.

Note

GPS must be enabled on the device. If

  • GPS is disabled on the device

  • Device does not contain a GPS sensor

  • Simulating without a device

this block outputs zeros. See Block Produces Zeros or Does Nothing in Simulation (Simulink).

Dialog Box

Sample time

Specify how often the block reads the sensor.

Smaller values require the processor to complete the same number of instructions in less time, which can cause task overruns.

Introduced in R2015a