Download the free trial version
Basic4android Video
Features
Tutorials and manuals
Showcase
Screenshots

Go Back   Android Development Forum - Basic4android > Basic4ppc (Windows Mobile) > Code Samples & Tips > Additional Libraries
Documentation Wiki Register Members List B4P Search Today's Posts Mark Forums Read

Additional Libraries Users contributed libraries.
This sub-forum is only available to licensed users.

GPSDriverNMEA library

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 11-11-2008, 05:14 PM
agraham's Avatar
Basic4ppc Expert
 
Join Date: Jul 2007
Location: Cheshire, UK
Posts: 6,072
Awards Showcase
Innovator medal Beta Tester Forum Contributer 
Total Awards: 3
Default GPSDriverNMEA library

This library works alongside the GPSDriver library, or standalone, and provides access to the NMEA sentences that are being parsed by the GPS Intermediate Driver. Like the GPSDriver library it will only work on devices that implement the GPS Intermediate Driver - generally Windows Mobile 5.0 or later devices fitted with an internal GPS receiver. .NET 2.0 or later needed. This library lets you cross check the results from GPSDriver and was written to help me in the development of the original GPSDriver code.

As usual demo, help and source for merging are included with the library.
Attached Files
File Type: zip GPSDriverNMEA1.0.zip (10.6 KB, 256 views)
Reply With Quote
  #2 (permalink)  
Old 11-12-2008, 03:34 PM
derez's Avatar
Basic4ppc Expert
 
Join Date: May 2007
Posts: 978
Awards Showcase
Beta Tester Competition Winner 
Total Awards: 2
Default NMEA lib

Agraham
Thank you for providing us with this library.
Although with the excelent functionality of the new GPSDriver it seems un-necessary - I still think it is useful for debuging. I find devices which behave in a different way then others and this lib might help.

__________________
David Erez
Ramat Hasharon, Israel
Reply With Quote
  #3 (permalink)  
Old 06-29-2009, 06:17 PM
Merlot2309's Avatar
Basic4ppc Veteran
 
Join Date: Feb 2009
Location: Spain
Posts: 293
Default

Hello,

Yes, yes and
After searching, trying, reading so much finally I found this.
It works perfect on my HTC Touch Diamond 2 with a very fast fix as well.

I do thank you from the bottom of my heart.
Helen.
__________________
IPhone 4 - HTC Legend - HTC Touch Diamond 2
Android 2.2 Tablet 10.2" (Chinese Superpad 3)
Reply With Quote
  #4 (permalink)  
Old 07-07-2009, 10:01 PM
Junior Member
 
Join Date: Jul 2009
Location: Derbyshire, UK
Posts: 36
Default

I downloaded this, but the help file displays an error:
"Navigation to the webpage was canceled"
Is there a list of its functions and properties anywhere else?

Edit: I found a mention of this problem, here: http://www.basic4ppc.com/forum/offic...html#post18334
I 'unblocked' it, and now it works..

It would probably be more useful to be able to read the (complete) NMEA messages from the GPS Driver, particularly if you could select particular ones, e.g. GGA or RMC..

Last edited by nl1007 : 07-07-2009 at 11:18 PM.
Reply With Quote
  #5 (permalink)  
Old 07-08-2009, 08:58 AM
agraham's Avatar
Basic4ppc Expert
 
Join Date: Jul 2007
Location: Cheshire, UK
Posts: 6,072
Awards Showcase
Innovator medal Beta Tester Forum Contributer 
Total Awards: 3
Default

Quote:
Originally Posted by nl1007 View Post
It would probably be more useful to be able to read the (complete) NMEA messages from the GPS Driver, particularly if you could select particular ones, e.g. GGA or RMC..
It would but they aren't available ready parsed as complete sentences from the Windows Intermediate Driver and, without using a serial port emulation which was the whole point of implementing GPSDriver and GPSDriverNMEA, the GPS data is only available as a read on-demand stream.

If you want the complete ready parsed sentences then use GPSSerial. This should work in conjunction with the virtual serial ports provided by the Windows Intermediate Driver, or indeed an actual serial port, except on certain devices (like some HTC and rebadged HTC devices) that are known to have problems with the .NET Serial Port class (which was the main impetus for writing GPSDriver and GPSDriverNMEA).
__________________
Sorry, but I don't answer questions by PM or email.
Please post your queries in the forum.
Reply With Quote
  #6 (permalink)  
Old 07-08-2009, 10:06 PM
Junior Member
 
Join Date: Jul 2009
Location: Derbyshire, UK
Posts: 36
Default

Surely the GPS driver library must assemble NMEA sentences from the stream, in order to extract the appropriate details; I was just thinking that if it (or this) made the 'last decoded' version of each message type (e.g. GGA, GSA or RMC) available, then if somebody wanted details not currently available, they could extract it from an already validated message, rather than duplicating that functionality..
I would like to get the 'Position fix indicator' value from the GGA message, so I can tell if DGPS is being used (i.e. the EGNOS satellite(s) are visible)..
Reply With Quote
  #7 (permalink)  
Old 07-09-2009, 08:35 AM
agraham's Avatar
Basic4ppc Expert
 
Join Date: Jul 2007
Location: Cheshire, UK
Posts: 6,072
Awards Showcase
Innovator medal Beta Tester Forum Contributer 
Total Awards: 3
Default

Quote:
Originally Posted by nl1007 View Post
Surely the GPS driver library must assemble NMEA sentences from the stream, in order to extract the appropriate details.
Nope. The Windows Intermediate Driver (WIM) does that and provides a structure on demand via a system call with the latest individual items of data. The GPSDriver library gets this structure from the WIM and returns the individual data items as properties. If you are interested you can see the source code for the library in GPSDriver.cs in the Libraries folder.

In order to emulate GPSDriver the GPSSerial library does have to parse the NMEA sentences and, as I said, also makes them individually available. They are not validated but do include the checksum if you want to do validation. Again you can see the source code in the library archive. GPSSerial only parses out four sentences but the raw unparsed stream is available from its NMEA port if you want to parse out any other data. Alternatively, if you have VS2005 or later you could build an enhanced library adding the parsing for extra sentences which would be a trivial exercise. If you don't have the capability I would be happy to add any sentences you wanted.
__________________
Sorry, but I don't answer questions by PM or email.
Please post your queries in the forum.
Reply With Quote
  #8 (permalink)  
Old 04-19-2010, 02:18 PM
Junior Member
 
Join Date: Nov 2009
Location: Melbourne, Australia
Posts: 16
Default NMEA parsing request

Quote:
Originally Posted by agraham View Post
Alternatively, if you have VS2005 or later you could build an enhanced library adding the parsing for extra sentences which would be a trivial exercise. If you don't have the capability I would be happy to add any sentences you wanted.
Hello,
I'm attempting to write some tactical yacht racing software for my use that requires NMEA input from not only a GPS but also a wind instrument. From my reading regarding GPSDriver I understand that the NMEA parsing is "closed" due to processing by the intermediate driver. I thought I would have to go back to Serial2 until I came across your newer GPSSerial 1.3 that emulates the methods from GPSDriver and means I can reuse quite a bit of newer sample code. (this is quite a learning curve for me as I last programmed in uP assembler - although I am enjoying learning the basic4ppc environment).

The one stumbling block I have would seem to be the parsing of the MWV NMEA sentence. I would be most grateful if you could extend your offer above to include this sentence in the library. If you are able to do so, I can come back with further details for you on the format of the sentence if necessary.
Many thanks in advance.
Greg
Reply With Quote
Old 04-19-2010, 02:57 PM
agraham
This message has been deleted by agraham.
  #9 (permalink)  
Old 04-19-2010, 03:42 PM
agraham's Avatar
Basic4ppc Expert
 
Join Date: Jul 2007
Location: Cheshire, UK
Posts: 6,072
Awards Showcase
Innovator medal Beta Tester Forum Contributer 
Total Awards: 3
Default

I've deleted the original message here because I thought of a better idea.

Try the attached. There are two new read/write properties, GETUSER1 and GETUSER2. If you write to either of them a case-sensitive prefix such as "$GPMWV" then you should be able to read from that property the last NMEA sentence received with that prefix. There is no restriction on when you can change them, they take effect any time.

Post if it works, or doesn't. There are a couple of very minor bug fixes in as well that weren't worth reposting the library for before so I'll repost it properly when it works.
Attached Files
File Type: zip GPSSerial1.31.zip (9.2 KB, 38 views)
__________________
Sorry, but I don't answer questions by PM or email.
Please post your queries in the forum.
Reply With Quote
  #10 (permalink)  
Old 04-21-2010, 03:37 PM
Junior Member
 
Join Date: Nov 2009
Location: Melbourne, Australia
Posts: 16
Default re: NMEA parsing request

Wow - that was quick. Thanks Andrew. Looks like a good option to get additional sentences read.
I've been studying the example code again and now suspect that the "cleanest" way to be able to access the properties in the MWV sentence will be to write a "GetWindData" "method" that populates various property variables relating to that sentence. This would run after obtaining the MWV NMEA sentence. Clearly basic GPS data is but a subset of the full NMEA library and each sentence has its own format to deal with.
I also assume from the text in your help file that it is OK to have the GPSserial and NMEA ports open at the same time? The NMEA data from GPS and wind instrument is combined in an external device so all comes in on one serial (bluetooth) port. If you have other suggestions on how to approach the task, please forward.
The NMEA device is currently being installed on the boat so I'll let you know how things go when it's all up and running and I can write and test some code.
Greg
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Door library (Beta) - Special library Erel Official Updates 60 01-13-2011 11:23 AM
Merging Outlook library and Phone library Erel Official Updates 11 09-15-2010 09:22 AM
PhoneticAlgorithms Library (ex-StringComparison Library) moster67 Additional Libraries 10 11-11-2008 07:46 PM


All times are GMT. The time now is 06:36 AM.


Powered by vBulletin® Version 3.6.12
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.0