Qt Simulator Manual 1.2.0

Simulating Location

Applications can use the Location API to access basic geographical information obtained from satellite or other sources about the user, including latitude and longitude, bearing, speed and altitude. This allows you to develop a range of geographical applications, for example, maps.

The Location API provides a library for location positioning, landmark management, and mapping and navigation. You can simulate position and speed.

Note: You can also use Qt Simulator to test applications that use landmark management, mapping, and navigation in Qt Simulator, but there are no specific controls for simulating these features.

Global positioning system (GPS) connections can consume the battery power rapidly, so you should take this into account when designing applications that access this functionality.

Location Positioning

Location-based services (LBS) use coordinates from the world geodetic system (WGS 84), which is also used as a reference system by the GPS. The coordinates are based on values for latitude, longitude, and altitude (elevation above sea level).

The North Pole is 90 degrees North (+90 degrees) and the South Pole is 90 degrees South (-90 degrees). The Equator is defined as 0 degrees; locations above it have positive latitudes (0 to +90 degrees); those below (0 to -90 degrees) negative ones.

There are two definitions of North Pole; Magnetic North Pole and True (Geographical) North Pole. Any application with a compass must check how the API defines North Pole.

The Magnetic North Pole is the point to which compasses point. The True North Pole defines latitude as +90 degrees.

Meridians are constant longitudinal (north-south) values. The Prime (Greenwich) Meridian's value is 0 degrees. WGS84, which LBS use, defines its zero meridian some 100 meters east of the Prime one. Locations east of the Prime Meridian have positive longitudinal values (0 to +180 degrees), those west (0 to -180 degrees) have negative ones.

Latitude lines are smaller near the poles. At the equator, one degree of longitude is roughly 111.3 km, whereas at 60 degrees of latitude one degree of longitude is only 55.8 km.

To test an application that uses LBS, specify the following values in the Location view:


  • In the Latitude and Longitude fields, specify the reported position (in decimal degrees). To adjust the position, you can specify the accuracy of the provided latitude-longitude value (in meters) in the Horizontal Accuracy field.
  • In the Altitude field, specify the elevation from sea level of the reported position (in meters). To adjust the altitude, you can specify the accuracy of the reported value (in meters) in the Vertical Accuracy field.
  • in the Direction field, specify the bearing of the device (in degrees), relative to true north.
  • In the Ground speed or Vertical speed field, specify the velocity of the device (in meters per second) that reported the position.
  • In the Magnetic variation field, specify the angle between the horizontal component of the magnetic field and true north (in degrees). A positive value indicates a clockwise direction from true north and a negative value indicates a counter-clockwise direction.
  • In the Timestamp field, specify the date and time at which the position was reported.

Simulating GPS Satellites

To test satellite-monitoring applications, you can simulate GPS satellites. Open advanced settings to change satellite properties in the Satellites view:


  • In the PRN field, select the pseudo-random noise (PRN) code that identifies the satellite. To use other than the pre-defined values, click Change PRN and specify the PRN of a satellite.
  • In the Azimuth field, specify the direction of the satellite from the current position (in degrees), as an offset to true north.
  • In the Elevation field, specify the angle (in degrees) to see the satellite from the current position.
  • In the Signal strength field, specify the satellite signal strength in decibels.
  • Select the In use check box to specify that the satellite is used to determine the current position.

Thank you for giving your feedback.

Make sure it is related to this specific page. For more general bugs and requests, please use the Qt Bug Tracker.

[0]; s.parentNode.insertBefore(ga, s); })();