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

Go Back   Android Development Forum - Basic4android > Other Products > Basic4ppc (Windows Mobile) > Questions (Windows Mobile)
Documentation Wiki Register Members List Windows Mobile Search Today's Posts Mark Forums Read

Questions (Windows Mobile) Post any question regarding Basic4ppc.

GPS - Decode event not firing

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 09-28-2008, 10:09 AM
Junior Member
 
Join Date: Sep 2008
Posts: 12
Default GPS - Decode event not firing

I've been trying to have a GPS_Decode event fire now for nearly a day...Using the examples listed on the homepage (downloads section/gps example) I've tried connecting a GPS (Delorme Earthmate) to the Serial Port, two freeware GPS simulator devices (from another PC to this PC). And Testing on a pocket PC. All of them connect and receive data but the event doesn't fire. I've been very mindful of the port settings/baud rate/ etc.

I know it is connecting because I receive values for Serial.Inputstring when I'm debugging. GPS.tostring returns Decode_GPS.GPS or something like that...(I've been up for nearly 22 hours now straight and am going to go take a nap). I also made sure the Sub Functions were names appropriately and coincide with the GPS varialbe name.


Thanks in advance for any help!
Reply With Quote
  #2 (permalink)  
Old 09-28-2008, 10:52 AM
agraham's Avatar
Basic4android Veteran
 
Join Date: Jul 2007
Location: Cheshire, UK
Posts: 6,835
Awards Showcase
Innovator medal Beta Tester Forum Contributer 
Total Awards: 3
Default

Quote:
Originally Posted by daveo84 View Post
I've been trying to have a GPS_Decode event fire
The name of the event is actually "GPSDecoded", are you using the correct Sub name? Your event Sub should be called "Sub GPSobjectname_GPSDecoded".
Reply With Quote
  #3 (permalink)  
Old 09-28-2008, 02:27 PM
Junior Member
 
Join Date: Sep 2008
Posts: 12
Default

Exactly as it show in the examples.... I get the same problem running them as is without altering any of the Sub names. I am also making sure all of the objects are created and appropriate libraries have been added.
Reply With Quote
  #4 (permalink)  
Old 09-28-2008, 04:37 PM
agraham's Avatar
Basic4android Veteran
 
Join Date: Jul 2007
Location: Cheshire, UK
Posts: 6,835
Awards Showcase
Innovator medal Beta Tester Forum Contributer 
Total Awards: 3
Default

Build up successive Serial.InputString contents in a multi-line textbox or a string for a MsgBox and have a look at it. The GPS library wants a GPRMC sentence terminated by a Cr and Lf and a GPGGA sentence also terminated by Cr and LF in its buffer before decoding it. Check you are getting both of those.
Reply With Quote
  #5 (permalink)  
Old 09-29-2008, 11:45 PM
Junior Member
 
Join Date: Sep 2008
Posts: 12
Default

Ok, so I made sure the line feeds and the returns were in the nmea data. I also watched the serial.inputstring and the data was exactly the same as the output from the sim we're using (Skylab GPS Simulator). It just sits there taking in the data and never gets beyond that.

How long should it take before this event happens?

Last edited by daveo84 : 09-29-2008 at 11:49 PM.
Reply With Quote
  #6 (permalink)  
Old 09-30-2008, 08:18 AM
agraham's Avatar
Basic4android Veteran
 
Join Date: Jul 2007
Location: Cheshire, UK
Posts: 6,835
Awards Showcase
Innovator medal Beta Tester Forum Contributer 
Total Awards: 3
Default

Quote:
Originally Posted by daveo84 View Post
How long should it take before this event happens?
It is fired by GPS.GPSStream(Serial.InputString). GPSStream fills a buffer appending successive strings passed to it and as soon as the buffer contains both sentences I specified above it parses the data and fires the event then clears the buffer for the next data.

PS. "GPRMC" and "GPGGA" must be uppercase.

Last edited by agraham : 09-30-2008 at 08:20 AM.
Reply With Quote
  #7 (permalink)  
Old 09-30-2008, 08:01 PM
Junior Member
 
Join Date: Sep 2008
Posts: 12
Default

Hmmm,

I'll have a look again, I literally let it run for 10 minutes and still nothing. Both using Delorme Earthmate (actual GPS) and the simulator (figured I'd take out any issues of reception, etc). I've made sure the parity, baud rates, com specs on both ends, and all of the appropriate settings are correct.

Thanks for the help.... I'll report back !
Reply With Quote
  #8 (permalink)  
Old 10-01-2008, 02:23 AM
Junior Member
 
Join Date: Sep 2008
Posts: 12
Default NMEA data

The following is a literal example of the data I get coming through the serial.inputstring:

Except the Lf & Cr show up as □ in the code. (would this make a difference? ex: $GPGGA,021249,0000.0000,N,00000.0000,E,1,5,1.0,200 0.0,M,0,M,,,,0000*66□□)

$GPGGA,021249,0000.0000,N,00000.0000,E,1,5,1.0,200 0.0,M,0,M,,,,0000*66

$GPGSA,A,3,01,02,03,04,05,,,,,,,,8.3,4.2,7.2*3B

$GPRMC,021249,A,0000.0000,N,00000.0000,E,0,0,01100 8,,,A*74


It does take quit a while for the string to append a new line (3 lines took 90 seconds or so).

STILL NO DECODE TRIGGER
Reply With Quote
  #9 (permalink)  
Old 10-01-2008, 05:57 AM
Erel's Avatar
Administrator
 
Join Date: Apr 2007
Posts: 25,792
Awards Showcase
Basic4ppc Founder 
Total Awards: 1
Default

Can you please save the data received to a file and upload the file?
You should save GPS.GPSBuffer to a file after several minutes.
Reply With Quote
  #10 (permalink)  
Old 10-01-2008, 07:08 AM
Junior Member
 
Join Date: Sep 2008
Posts: 12
Default

Will do tommorow. Also I moved the example code to a pocket pc w/ windows mobile 6.1 and ran it there. No data was received from the buffer/inputstring. This was tested in a working environment (The system GPS was working fine and I had altered the code to fit the specific baud rate, port etc.)


Thanks again!
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
Event keyboard question micro Questions (Windows Mobile) 8 10-30-2008 04:39 PM
Table - MouseDown event and more Erel Code Samples & Tips 1 04-07-2008 05:55 PM
unassign event paul j Questions (Windows Mobile) 2 12-15-2007 02:02 PM
TreeView event magi6162 Questions (Windows Mobile) 3 08-29-2007 10:29 AM
Calendar event Rioven Questions (Windows Mobile) 7 08-28-2007 07:00 AM


All times are GMT. The time now is 09:45 PM.


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