Windows CE Networking Team WebLog

Windows CE Networking - from NDIS to TCP to SOAP to VOIP and everything in between.

GPSGetPosition as glorified memcpy()

I've spoken with a number of OEMs & ISVs regarding GPSID and many people assume that a call to GPSGetPosition() will cause the GPS device to be queried for the latest + greatest position.  That's actually not the way that it works (today).  GPSID is designed to work with GPS devices that generate NMEA only.  NMEA GPS devices will always be giving GPSID updates as to position in the background, they do not have any mechanism for an app or driver to call "GiveMePositionNow()".

For the record GPSGetPosition() is a glorified memcpy() of the position fields that GPSID has cached from the most recent position that the GPS driver.  Anyone who's stared at NMEA would probably assume the API worked this way, but the point of GPSID was so that people don't need to stare at NMEA :).  I have asked the documentation team to update the GPSGetPosition() docs to clear up any ambiguity on how it works.  Sorry for the pain this may have caused.

In the future, I'm looking at having GPSID work better with non-NMEA devices that would be smart enough to do an on-demand position determination so that's why I have (today) in comments above about how GPSGetPosition() works.

[Author: John Spaith]

Published Friday, August 18, 2006 4:03 PM by cenet
Filed under:

Comment Notification

If you would like to receive an email when updates are made to this post, please register here

Subscribe to this post's comments using RSS

Comments

 

Nino.Mobile said:

Software / Hardware SOTI Pocket Controller Professional v5.07 is out Pocket PC Thoughts is reporting
September 4, 2006 9:17 PM
 

Hagai Ohel said:

Do you know how it works if the GSPID has not cached any NMEA information yet  (i.e., the first time that you do an open of the GPS device followed by a GPS Get Position operation)?

If possible, could you reply to Hagai.Ohel@motorola.com?

January 29, 2008 2:00 PM
 

cenet said:

If GPSID doesn't have any data available, when you call GPSGetPosition it returns success (assuming other stuff like handle, param len, GPS device being available is setup right).  But it sets the validFields flag to be 0 to indicate it doesn't have any data.

John

February 7, 2008 2:23 PM

Leave a Comment

(required) 
(optional)
(required) 
Submit

© 2008 Microsoft Corporation. All rights reserved. Terms of Use  |  Trademarks  |  Privacy Statement
Microsoft
Page view tracker