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

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

Questions (Windows Mobile) Post any question regarding Basic4ppc.

GPS serialdevice : 3 sentence in one string

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 06-19-2008, 04:01 PM
Junior Member
 
Join Date: May 2008
Posts: 44
Default GPS serialdevice : 3 sentence in one string

HI,
after making a test program that is decode manualy NMEA sentence, I saw that I received a single string with 3 NMEA sentences :
(program use listbox and strsplit to write NMEA sentence)

$GPZDA Date & Time
$GPGGA Global Positioning System Fix Data
$GPRMC Recommended minimum specific GPS/Transit data

These 3 sentences are separated by 2 specials Characters, but I don't know witch one (represented by square)

Is someone already had this problem?

How can I decoded this 2 specials characters?

How can I change this (serial parameters?)?

How can I securize data reading to avoid crash with not numeric data in latitude and longitude (single/double....)
Reply With Quote
  #2 (permalink)  
Old 06-19-2008, 04:20 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

Quote:
Originally Posted by alea46 View Post
How can I decoded this 2 specials characters?
You could try getting their numeric value with "val = Asc(StrAt(...))" and then use "Chr(val)" in StrIndexOf(...) to find them.
Reply With Quote
  #3 (permalink)  
Old 06-19-2008, 05:44 PM
Erel's Avatar
Administrator
 
Join Date: Apr 2007
Posts: 15,733
Awards Showcase
Basic4ppc Founder 
Total Awards: 1
Default

Why don't you let the GPS library to parse the sentences?

The ending character is probably chr(10) which is linefeed.
Reply With Quote
  #4 (permalink)  
Old 06-19-2008, 08:06 PM
Junior Member
 
Join Date: May 2008
Posts: 44
Default Problem solve

Hi,
thanks for your Help.

I unsderstand the mistake I do using GPS.dll.
My GPS object is call "GPS1" and I do a sub call GPS_GPSdecoded in place of GPS1_GPSdecoded.

So it's work fine now.
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
put byte value into a string cotralis Questions (Windows Mobile) 5 09-13-2008 03:30 AM
Long String Georg Questions (Windows Mobile) 2 08-06-2008 08:20 AM
String and Shell questions HARRY Questions (Windows Mobile) 4 12-18-2007 05:56 PM
SerialDevice - wrong version Erel Announcements 0 11-05-2007 04:53 AM
OK, next string question Stellaferox Questions (Windows Mobile) 9 06-07-2007 01:12 PM


All times are GMT. The time now is 09:53 AM.


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