Location Sensor
Measure global positioning system data
Add-On Required: This feature requires the Simulink Support Package for Android Devices add-on.
Libraries:
Simulink Support Package for Android Devices /
Sensors
Description
Use the Location Sensor block to read GPS data of the device and output its latitude, longitude, and altitude.
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 are considered to within 6 decimal places only. For example, at the equator, 0.000001 degrees is approximately 11.1 centimeters.
Note
GPS must be enabled on the device. If any of these conditions occur, this block outputs zeros.
GPS is disabled on the device.
The device does not contain a GPS sensor.
Simulating without a device
For more information, see Block Produces Zeros or Does Nothing in Simulation.
Ports
Output
Parameters
Version History
Introduced in R2014a