Gps
From Pointui
AVAILABLE SINCE: 2.0.30b
* NOT AVAILABLE IN FREE VERSION OF HOME
Provides access to the GPS. Please note that the GPS unit is switched on after a call to Start() and remains on until a call to Stop() is made. GPS units within a device generally consume a large amount of power, and so you should always be careful to switch off the GPS unit when you do not require it.
Contents |
Events
void OnChanged()
This event is raised each time the GPS has new data available, and may indicate that a new position is available or that a position is no longer available, or other things such as what satellites being used has changed.
Methods
void Start(int minimumUpdateInterval = 1000)
Starts the GPS unit and begins listening for change notifications. The GPS unit can send through a heap of notifications as it's data constantly changes, so you can use minimumUpdateInterval (in milliseconds) to specify the minimum time you want to accept between each update. This prevents the OnChanged event from being raised many times within a short space of time.
void Stop()
Stops the GPS unit and no longer listens for change notifications.
String GetLatitude()
Returns the current latitude as a String. NOTE: the scripting engine currently doesn't support double data type, so the value instead of being returned as a double is returned as a String so as not to lose any precision.
String GetLongitude()
Returns the current longitude as a String. NOTE: the scripting engine currently doesn't support double data type, so the value instead of being returned as a double is returned as a String so as not to lose any precision.
float GetSpeedInKnots()
Returns the current speed in knots.
float GetHeading()
Returns the current heading in degrees.
float GetAltitude()
Returns the altitude in meters with respect to sea level.
String GetSatelliteCount()
Returns the current number of satellites visible.
