View Single Post
  #2 (permalink)  
Old 06-28-2007, 12:58 PM
BerndB BerndB is offline
Junior Member
 
Join Date: May 2007
Location: Germany
Posts: 45
Default GPS Distance Meter

Hi agrartec,

this is a version without the 2. timer.

For good precission you should not calculate with rounded UTM-Data.
(If you watch the data, you see that most differences happen behind the comma)

In this version I introduced an additional button to switch the GPS-device.
Then it's possible to restart the GPS connection, after a power off and power on of you PDA, automatically.

Code:
Sub Timer1_Tick
  
if serial.InBufferCount>0 then 
    
GPS.GPSStream(gps.GPSStream(Serial.InputString)) 'Takes the data received from the GPS to GPSStream.
  else      
    
' reactivate GPS after a power off/on automatically when GPS was active before
    sleep(2000)
    
if serial.InBufferCount<=0 then      
      
if BtGPS.color=cGreen then
        
serial.EnableOnComm =false
        
Serial.PortOpen = false 'Closes the seria
        TBsats.text=""
        
serial.EnableOnComm =true
        
Serial.PortOpen = true 
      
end if    
    
end if
  
end if
End Sub
Ciao
BerndB
Attached Files
File Type: zip Distmeter2.zip (1.6 KB, 161 views)
Reply With Quote