Editing Documentation/Maemo 5 Developer Guide/Using Connectivity Components/Using Location API

Warning: You are not logged in. Your IP address will be recorded in this page's edit history.
The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then save the changes below to finish undoing the edit.
Latest revision Your text
Line 46: Line 46:
Here is table that summarizes differences between the methods. Accuracy refers to horizontal accuracy of the fix.
Here is table that summarizes differences between the methods. Accuracy refers to horizontal accuracy of the fix.
-
{| class="wikitable"
+
{| class="wikitable" style="margin: 1em auto 1em auto"
-
|+
+
-
Available location methods
+
-
|-
+
! Method !! Typical Accuracy !! Requires SIM !! Requires Network !! Drains Battery
! Method !! Typical Accuracy !! Requires SIM !! Requires Network !! Drains Battery
|-
|-
-
| CWP || 1-1000 km || Yes || No || No
+
| CWP || 1km-1000km || Yes || No || No
|-
|-
-
| ACWP || 1-10 km || Yes || Yes || No
+
| ACWP || 1km-10km || Yes || Yes || No
|-
|-
-
| GNSS || 5-100m || No || No || Yes
+
| GNSS || 5m-100m || No || No || Yes
|-
|-
-
| AGNSS || 5-100m || Yes || Yes || Yes
+
| AGNSS || 5m-100m || Yes || Yes || Yes
|}
|}
Line 74: Line 71:
<code>LocationGPSDevice</code> object has the following public fields:
<code>LocationGPSDevice</code> object has the following public fields:
-
* <code>gboolean online</code>: Whether there is a connection to the hardware
+
* gboolean online: Whether there is a connection to the hardware
* <code>LocationGPSDeviceStatus status</code>: Status of the device
* <code>LocationGPSDeviceStatus status</code>: Status of the device
* <code>LocationGPSDeviceFix *fix</code>: The actual fix (latitude, longitude, etc)
* <code>LocationGPSDeviceFix *fix</code>: The actual fix (latitude, longitude, etc)
Line 82: Line 79:
* <code>LocationCellInfo *cell_info</code>: Information about cell the device is connected to
* <code>LocationCellInfo *cell_info</code>: Information about cell the device is connected to
-
The most useful field is naturally "fix" which contains position and movement of the device and accuracies for them. "<code>LocationGPSDeviceFix</code>" fields are listed in the table below. In "Fields Flag" column there is a identifier which can be bitwisely anded with "fields" field, to see whether corresponding field is set.
+
The most useful field is naturally "fix" which contains position and movement of the device and accuracies for them. ''LocationGPSDeviceFix'' fields are listed in table below. In "Fields Flag" column there is a identifier which can be bitwisely anded with "fields" field, to see whether corresponding field is set.
-
{| class="wikitable"
+
{| class="wikitable" style="margin: 1em auto 1em auto"
|+LocationGPSDeviceFix
|+LocationGPSDeviceFix
! Variable !! colspan="3" | Description
! Variable !! colspan="3" | Description
|-
|-
-
| <code>mode</code> || colspan="3" | Mode of the fix (2D, 3D, not seen or no fix)
+
| mode || colspan="3" | Mode of the fix (2D, 3D, not seen or no fix)
|-
|-
-
| <code>fields</code> || colspan="3" | Bitfield representing what fields contain valid data
+
| fields || colspan="3" | Bitfield representing what fields contain valid data
|-
|-
! Variable !! Unit !! Description !! Fields Flag
! Variable !! Unit !! Description !! Fields Flag
|-
|-
-
| <code>time</code> || s || Timestamp of the update || <code>LOCATION_GPS_DEVICE_TIME_SET</code>
+
| time || s || Timestamp of the update || <code>LOCATION_GPS_DEVICE_TIME_SET</code>
|-
|-
-
| <code>ept</code> || s || Time accuracy ||
+
| ept || s || Time accuracy
|-
|-
-
| <code>latitude</code> || degrees || Fix latitude || <code>LOCATION_GPS_DEVICE_LATLONG_SET</code>
+
| latitude || degrees || Fix latitude || <code>LOCATION_GPS_DEVICE_LATLONG_SET</code>
|-
|-
-
| <code>longitude</code> || degrees || Fix longitude || <code>LOCATION_GPS_DEVICE_LATLONG_SET</code>
+
| longitude || degrees || Fix longitude || <code>LOCATION_GPS_DEVICE_LATLONG_SET</code>
|-
|-
-
| <code>eph</code> || cm || Horizontal position accuracy ||
+
| eph || cm || Horizontal position accuracy
|-
|-
-
| <code>altitude</code> || m || Fix altitude || <code>LOCATION_GPS_DEVICE_ALTITUDE_SET</code>
+
| altitude || m || Fix altitude || <code>LOCATION_GPS_DEVICE_ALTITUDE_SET</code>
|-
|-
-
| <code>epv</code> || m ||  Altitude accuracy ||
+
| epv || m ||  Altitude accuracy
|-
|-
-
| <code>track</code> || degrees || Direction of motion || <code>LOCATION_GPS_DEVICE_TRACK_SET</code>
+
| track || degrees || Direction of motion || <code>LOCATION_GPS_DEVICE_TRACK_SET</code>
|-
|-
-
| <code>epd</code> || degrees || Track accuracy ||
+
| epd || degrees || Track accuracy
|-
|-
-
| <code>speed</code> || km/h || Current speed || <code>LOCATION_GPS_DEVICE_SPEED_SET</code>
+
| speed || km/h || Current speed || <code>LOCATION_GPS_DEVICE_SPEED_SET</code>
|-
|-
-
| <code>eps</code> || km/h || Speed accuracy ||
+
| eps || km/h || Speed accuracy
|-
|-
-
| <code>climb</code> || m/s || Current rate of climb || <code>LOCATION_GPS_DEVICE_CLIMB_SET</code>
+
| climb || m/s || Current rate of climb || <code>LOCATION_GPS_DEVICE_CLIMB_SET</code>
|-
|-
-
| <code>epc || m/s || Climb accuracy ||
+
| epc || m/s || Climb accuracy
|}
|}

Learn more about Contributing to the wiki.


Please note that all contributions to maemo.org wiki may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see maemo.org wiki:Copyrights for details). Do not submit copyrighted work without permission!


Cancel | Editing help (opens in new window)