Retrieve GPS coordinates...

S

Sam

Hi,
I need to create an Application that uses GPS coordinates.
How can I retrieve coordinates?Does the code depends by the GPS
hardware(NMEA,Bluetooth)?
Ps. I'm using C#, Visual Studio 2005 and windows mobile 5.
Thanks.
 
P

Paul G. Tobey [eMVP]

Any receiver that you should even think about will support NMEA. In the
case of a Bluetooth GPS, it connects via the serial port profile, so it
looks just like it's connected to an ordinary serial port.

Search the archives for information on libraries which are available for
doing serial I/O, if you're not using .NET CF 2.0, and libraries for
interpreting NMEA strings:

http://groups.google.com/group/micr...tframework?hl=en&lr=lang_en&ie=UTF-8&oe=UTF-8

Paul T.
 
S

Sam

Any receiver that you should even think about will support NMEA. In the
case of a Bluetooth GPS, it connects via the serial port profile, so it
looks just like it's connected to an ordinary serial port.

Search the archives for information on libraries which are available for
doing serial I/O, if you're not using .NET CF 2.0, and libraries for
interpreting NMEA strings:

I'm using CF 2.0.
Have you C# example?

Thanks!
 
W

Wolfgang Schwarz

Sam,
I'm using CF 2.0.
Have you C# example?

You could find an C#-Example in the Windows Mobile 5.0 Pocket PC SDK.
Download under
http://www.microsoft.com/downloads/...f2-f524-4ec5-9155-717cbe5d25ed&DisplayLang=en

There it is in folder "..\Programme\Windows CE Tools\wce500\Windows Mobile
5.0 Pocket PC SDK\Samples\Cs\Gps"

Please tell me how it works.
I have the problem that it stop working after serveral minutes. Perhaps it
is a problem of the powermanagement in the GPS receiver, but I don't know
how to solve it.

regards
Wolfgang
 
D

DJMatty

Hi

WM5 supports retrieving GPS positions in API, rather than having to use
serial ports, this allows the device to supply positions to many
applications rather than having the serial port tied up by one app.

Take a look in the WM5 MSDN help (or google) GPSOpenDevice. They call
it the GPS Intermediate Driver.

Cheers

Matt
 
P

Paul G. Tobey [eMVP]

This may or may not be enabled by the device OEM, however. I'd start with
just opening the serial port and getting the strings...

Paul T.
 
D

Dick Grier

Hi,

I have source code for DecodeGPS.dll in my book (the dll is free from my
homepage, along with a VS2003 example -- I can send you a VS2005 example, in
VB). OpenNETCF.org has a GPS class in the SDF (source code is available
from there).

I'm not wildly excited about the GPSIntermediate driver in WM5. Perhaps I
will grow to like it.

Dick

--
Richard Grier, MVP
Hard & Software
Author of Visual Basic Programmer's Guide to Serial Communications, Fourth
Edition,
ISBN 1-890422-28-2 (391 pages, includes CD-ROM). July 2004, Revised March
2006.
See www.hardandsoftware.net for details and contact information.
 
D

DJMatty

Oh right, I guess that makes sense, why include it if you don't have a
built in GPS receiver... so to take advantage of any old GPS bluetooth
receiver on any device it's back to serial ports and all those nice
NMEA strings then :(

Cheers

Matt
 
P

Paul G. Tobey [eMVP]

Even some that *do* have built-in GPS receivers disable it from the factory.
The reasons aren't always clear, of course...

Paul T.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top