--- In [EMAIL PROTECTED], "wksaalfeld" <[EMAIL PROTECTED]> wrote:
Hi, When decoding a NMEA message to find the latitude and longitude I use the SPLIT function to find the required information. The Split method works like this. Sub LatLong dim parts,latitude,longitude parts=split(nmeamsg,",") latitude=parts(1) & parts(2) longitude=parts(3) & parts(4) UTC=parts(5) end sub If my external GPS receiver has not found, or loses, its satellite signals then it transmits null values. Then your method of using the Mid function to extract the information does not work correctly. Note that I use the GPS receiver's $GPGLL message where Parts(1)=latitude Parts(2)=N or S Parts(3)=longtitude Parts(4)=E or W I collect GPS data from an external Nikkai GPS receiver using Bluetooth and an IPAQ 2210. GPS positions are received once every second. Sometimes the data collection pauses for a few seconds. This is not because the GPS receiver stops transmitting (the serial port input buffer continues to fill) but seems to be because Windows CE has to tend to something else. I collected all the different NMEA messages from the GPS receiver for a while and put them in a listbox. Then I counted which message type with the required information occurred most frequently. That is why I chose $GPGLL. Other receivers may be different. My receiver transmits the following message types: $GPGGA,$GPGLL,$GPVTG,$GPGSV,$GPRMC,$GPGSA Barrie > > Hi All, > > I am a Wildlife Officer with the Parks and Wildlife Service NT > Australia. I have a program that I have written for data logging > sightings taken on our annual spotlight surveys of saltwater > crocodile populations in the Northern Territory. > > NSBasic does an excellent job, particularly due to the speed at which > sightings can be entered. The sightings are recorded with spatial > information which I get from the PDA's inbuilt GPS via the GPS > NMEA0183 data stream. > > I have a program that works in terms of reading the NMEA data stream > but the code is not well written, at least it seems so to me, and it > can often be 1 or 2 seconds before the program gets the lat/long > position, rarely more. > > I would very much like to tighten up the subroutine in my program > that gets the GPS data and if someone can supply me with a good > reference, either web site or to a book, on serial comms that has > been written for a non-programmer it would be appreciated. I have > done a number of Google searches and looked at GPS code in the files > link on this forum and the code I have written appears very similar. > > I have posted a copy of the program (it is very simple) in the files > link (CrocSurv_05.nsb). One of the main requirements of the spotlight > surveys is the capacity to enter sightings with as little as 2-3 > seconds between records and with GPS position logged at commencement > of data entry, not end. We do the surveys at night in small boats 4- 5 > m, moving at about 15-20 kph so there is not much time to identify > and record each animal. For each animal we record species (there are > only 2 and mostly it is Crocodyus porosus), position in river, and > size. > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "nsb-ce" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/nsb-ce?hl=en -~----------~----~----~----~------~----~------~--~---
