Basic4ppc - Windows Mobile Development  

Go Back   Basic4ppc - Windows Mobile Development > Main Category > Questions & Help Needed
Home Register FAQ Members List Search Today's Posts Mark Forums Read

Questions & Help Needed Post any question regarding Basic4ppc.


GPS serialdevice : 3 sentence in one string


Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 06-19-2008, 05:01 PM
Junior Member
 
Join Date: May 2008
Posts: 24
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, 05:20 PM
agraham's Avatar
Basic4ppc Expert
 
Join Date: Jul 2007
Location: Cheshire, UK
Posts: 1,758
Awards Showcase
Beta Tester Forum Contributer 
Total Awards: 2
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, 06:44 PM
Erel's Avatar
Administrator
 
Join Date: Apr 2007
Posts: 3,186
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, 09:06 PM
Junior Member
 
Join Date: May 2008
Posts: 24
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 On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
put byte value into a string cotralis Questions & Help Needed 5 09-13-2008 04:30 AM
Long String Georg Questions & Help Needed 2 08-06-2008 09:20 AM
String and Shell questions HARRY Questions & Help Needed 4 12-18-2007 06:56 PM
SerialDevice - wrong version Erel Announcements 0 11-05-2007 05:53 AM
OK, next string question Stellaferox Questions & Help Needed 9 06-07-2007 02:12 PM


All times are GMT. The time now is 03:44 PM.


Powered by vBulletin® Version 3.6.12
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.1.0