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.

GPSSerial library

Reply
 
LinkBack Thread Tools Display Modes
  #21 (permalink)  
Old 05-14-2009, 12:59 PM
Junior Member
 
Join Date: Mar 2009
Posts: 19
Default

Hi Agraham, I've an HTP Pharos and I'm using GPSDriver and GPSSerial.

With GRPSerial (v. 1.3), even if I don't move my GPS releave that my speed is not 0 while with GPSDriver and my internal GPS my speed is 0.

What's the reason? It'a a problem of my External GPS?

Best regards,

Renato.
Reply With Quote
  #22 (permalink)  
Old 05-14-2009, 01:43 PM
agraham's Avatar
Basic4ppc Expert
 
Join Date: Jul 2007
Location: Cheshire, UK
Posts: 5,953
Awards Showcase
Innovator medal Beta Tester Forum Contributer 
Total Awards: 3
Default

I assume that you are using GPSSerial with an external GPS. The speed is provided by the GPS not by the library. You can see what the GPS thinks the speed is by looking at GPSSerial.GPRMC, speed is item 7.

$GPRMC,hhmmss.ss,A,llll.ll,a,yyyyy.yy,a,x.x,x.x,ddmmyy,x.x,a*hh
1 = UTC of position fix
2 = Data status (V= fix inValid, A = fix Active)
3 = Latitude - ddmm.mm
4 = N or S
5 = Longitude - ddmm.mm
6 = E or W
7 = Speed over ground in knots
8 = Track made good in degrees True
9 = UT date
10 = Magnetic variation degrees (Easterly var. subtracts from true course)
11 = E or W
12 = Checksum
__________________
Sorry, but I don't answer questions by PM or email.
Please post your queries in the forum.
Reply With Quote
  #23 (permalink)  
Old 05-14-2009, 05:49 PM
Junior Member
 
Join Date: Mar 2009
Posts: 19
Default

Thanks a lot.

Just a doubt: if I take a look at the NMEA sentence with serial2.dll, Time is a string while with your function it returns me a Double.

I've already tried to manage that value with Date.FromOADate function but I didn't manage to obtain good result.

Can you tell me how you manage time value obtained by NMEA Sentence?

Thanks,

Renato.
Reply With Quote
  #24 (permalink)  
Old 05-14-2009, 06:07 PM
agraham's Avatar
Basic4ppc Expert
 
Join Date: Jul 2007
Location: Cheshire, UK
Posts: 5,953
Awards Showcase
Innovator medal Beta Tester Forum Contributer 
Total Awards: 3
Default

I'm afraid that I don't understand the problem! Date.FromOADate looks like a C# or VB.NET statement. What are you trying to do? Why are you using Serial2? If you need NMEA data surely it is easier to use the ready parsed NMEA sentences available from GPSSerial.
__________________
Sorry, but I don't answer questions by PM or email.
Please post your queries in the forum.
Reply With Quote
  #25 (permalink)  
Old 05-14-2009, 06:14 PM
Junior Member
 
Join Date: Mar 2009
Posts: 19
Default

U're right, I've been not precise.
Thanks, I'll try with parsed NMEA Sentence as you told.
Reply With Quote
  #26 (permalink)  
Old 07-17-2009, 12:42 PM
Junior Member
 
Join Date: Jul 2009
Location: Derbyshire, UK
Posts: 36
Default

I've been looking at the help, demo and source for this and would like to make this comment:

Help:
Quote:
"NMEAOpen: Opens the NMEA data port. The GPSSerial port does not have to be open to use this port."
This suggested to me that the NMEA was in some way seperate to the GPS Serial COM port, but then I couldn't see where the NMEA data would come from; I looked at the source, and the GPS 'Open' doesn't open the serial port if 'nmeaopen' is True, and the nmeabuffer is only filled from the serial port during 'datareceived' event. This suggests that the GPS Serial port should be opened first, then the NMEA 'port' opened - and the NMEA 'port' has to be closed before using the Close method (or else it doesn't close the serial port)..
Reply With Quote
  #27 (permalink)  
Old 07-17-2009, 02:09 PM
agraham's Avatar
Basic4ppc Expert
 
Join Date: Jul 2007
Location: Cheshire, UK
Posts: 5,953
Awards Showcase
Innovator medal Beta Tester Forum Contributer 
Total Awards: 3
Default

Quote:
Originally Posted by nl1007 View Post
NMEA was in some way seperate to the GPS Serial COM port
Your analysis is correct. In the early pre-release versions, if I remember correctly, they were logically separate. I think I did a simplification of the physical Serial Port handling at some time so only GSPSerial touched it and didn't get it quite right If there is ever a reason for new release I'll fix the code, and the Help!
__________________
Sorry, but I don't answer questions by PM or email.
Please post your queries in the forum.
Reply With Quote
  #28 (permalink)  
Old 02-06-2010, 05:15 PM
Basic4ppc Expert
 
Join Date: May 2008
Location: Berkshire, UK
Posts: 762
Awards Showcase
Beta Tester 
Total Awards: 1
Default

I've just downloaded this library and demo and tried the latter.

Got attached error message (running under desktop IDE). What means?

The display shows data from my external GPS via COM1.

Mike.
Attached Images
File Type: jpg GPSSerial-runtime.JPG (17.4 KB, 12 views)
Reply With Quote
  #29 (permalink)  
Old 02-06-2010, 05:32 PM
agraham's Avatar
Basic4ppc Expert
 
Join Date: Jul 2007
Location: Cheshire, UK
Posts: 5,953
Awards Showcase
Innovator medal Beta Tester Forum Contributer 
Total Awards: 3
Default

It looks like your GPS is sending the time or date in an unexpected format.

Use the NMEA option to look at the GPRMC sentence

$GPRMC,hhmmss.ss,A,llll.ll,a,yyyyy.yy,a,x.x,x.x,dd mmyy,x.x,a*hh
............^ time ^......................................^date^..... ........

GPSSerial expects the time and date in the above format. If it isn't that would account for the error. Note the spaces after "dd" and in the dots is a forum artifact and are not really present.
__________________
Sorry, but I don't answer questions by PM or email.
Please post your queries in the forum.

Last edited by agraham : 02-06-2010 at 05:36 PM.
Reply With Quote
  #30 (permalink)  
Old 05-28-2010, 11:30 PM
Basic4ppc Expert
 
Join Date: May 2008
Location: Berkshire, UK
Posts: 762
Awards Showcase
Beta Tester 
Total Awards: 1
Default

Quote:
Originally Posted by agraham View Post
So here is a compatible solution, the GPSSerial library. It looks like GPSDriver to the code but hiding underneath is a SerialPort like in the Serial2 library. Porting code between the two should be a matter of changing your objects to use the correct library and altering the Open method which is the only one that differs between the two libraries.
I have been happily testing my version of GPS4PPC under the desktop IDE using GPSSerial and an external GPS.

I have also changed the Gpsdriver object to derive from Gpsdriver.dll, and removed the Open parameters, as per Help, and it runs compiled for my device with built-in GPS.

But if I go back to the desktop IDE (still running under the IDE OK) and try to compile for desktop, I get the attached compile error. The referenced line number and content seems entirely irrelevant. If I remove the module that is referred to, the same error shows up against an equally irrelevant line in a different module.

What does it mean? I'm happy to post the code if needed.

Mike.
Attached Images
File Type: jpg compile-error (name-space).JPG (16.7 KB, 6 views)
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 12:23 PM
Merging Outlook library and Phone library Erel Official Updates 11 09-15-2010 10:22 AM
PhoneticAlgorithms Library (ex-StringComparison Library) moster67 Additional Libraries 10 11-11-2008 08:46 PM


All times are GMT. The time now is 01:49 AM.


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