Measure GPS data
Simulink Support Package for Apple iOS Devices / Sensors
The block reads GPS data of the device and outputs 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.
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.
Port_1 — GPS data
three-element numeric vector
GPS data of the device, returned as a three-element numeric vector of the form [latitude, longitude, altitude]. The vector contains the measured latitude and longitude in decimal degrees and altitude in meters.
Sample time — Time interval of sampling
0.1 (default) | nonnegative scalar
Specify a discrete time interval, in seconds, at which the block reads the GPS data from the device and outputs the data.
Smaller values for Sample time require the processor to complete the same number of instructions in less time, which can cause task overruns.