GetGPSValue
Definition:
GetGPSValue(type)
Description:
Take GPS reading.
Platforms:
All
Parameters:
type - required
String indicating type of data you want to be returned. Possible values for this parameter are:
"alt"
Altitude above sea level in meters.
"hdop"
'horizontal dilution of precision' - a guide to accuracy of current reading.
"osgb36xxxyyy"
UK OSGB36 latitude or longitude, where:
xxx can have values:
lat = return the latitude value.
long = return the longitude value.
and
yyy indicates the format you want the data returned in:
leave out for decimal value, e.g. 89.4565 or ""
dm = deg, mins, hem, e.g. 90º60.78' E
dms = deg, mins, secs, hem e.g. 90º60'38.5" E
"quality"
Quality of fix.
"satellites"
Number of satellites currently in use.
"time"
Time of last valid fix.
"ukgrid"
12-digit UK national grid reference.
"ukeasting"
6-digit UK national grid easting (metre grid).
"uknorthing"
6-digit UK national grid northing (metre grid).
"wgs84xxxyyy"
Standard GPS WGS84 latitude or longitude, where:
xxx indicates latitude or longitude required and can be:
lat = return the latitude value.
long = return the longitude value.
and
yyy indicates the format you want the data returned in:
leave out for decimal value, e.g. 89.456 or ""
dm = deg, mins, hem, e.g. 90º60.78' E
dms = deg, mins, secs, hem e.g. 90º60'38.5" E
Returns:
String containing the required information returned from the last valid GPS read – see Notes below.
"" (empty string)
Last value read from the internal GPS device is not valid or no value has been read.
Notes:
On the Windows Desktop Platform, the GPS_HIGH_ACCURACY option in the SetApplicationOption Method allows you to switch between using high and low precision. High precision will give you more precise hdop and co-ordinate readings. By default, the device will use low precision.
The value returned depends upon the value of the type parameter and is device independent:
"alt"
Returns the current altitude above sea level in metres.
"hdop"
Returns the current horizontal dilution of precision:
1 - Ideal. This is the highest possible confidence level to be used for apps demanding the highest possible precision at all times.
2-3 - Excellent. At this confidence level, positional measurements are considered accurate enough to meet all but the most sensitive apps.
4-6 - Good. Represents a level that marks the minimum appropriate for making business decisions. Positional measurements could be used to make reliable in-route navigation suggestions to the user.
7-8 - Moderate. Positional measurements could be used for calculations, but the fix quality could still be improved. A more open view of the sky is recommended.
9-20 - Fair. Represents a low confidence level. Positional measurements should be discarded or used only to indicate a very rough estimate of the current location.
21-50 - Poor. At this level, measurements are inaccurate by as much as half a football field and should be discarded.
"osgb36xxxyyy"
Returns last valid UK OSGB36 latitude or longitude as requested in the type parameter.
The value will be returned in the format requested by the yyy element in the type parameter:
yyy omitted - decimal e.g. 89.4565
yyy = dm - degs, mins, hem e.g. 90º60.78' E
yyy = dms - degs, mins, secs, hem e.g. 90º60'38.5" E
"quality"
Returns current quality of fix:
0 = no fix.
1 = GPS.
2 = DGPS.
"satellites"
Returns current number of satellites in use.
"time"
Returns time of the last valid fix in the format: dd/mm/yyyy hh:mm:ss.
"ukgrid"
Returns last valid 12-digit UK national grid reference in format:
grid easting northing
e.g. "SD 12345 78901" (metre grid)
"ukeasting"
Returns last valid 6-digit UK national grid easting (metre grid).
"uknorthing"
Returns last valid 6-digit UK national grid northing (metre grid).
"wgs84xxxyyy"
Returns last valid standard GPS WGS84 latitude or longitude as requested in the type parameter.
The value will be returned in the format requested by the yyy element in the type parameter:
yyy omitted - decimal e.g. 89.4565
yyy = dm - degs, mins, hem e.g. 90º60.78' E
yyy = dms - degs, mins, secs, hem e.g. 90º60'38.5" E
See also: