![]() |
|
|||||||
| Home | Register | FAQ | Members List | Search | Today's Posts | Mark Forums Read |
| Code Samples & Tips Share your recent discoveries and ideas with other users. |
![]() |
|
|
LinkBack | Thread Tools | Display Modes |
|
|||
|
I have made a small application to measure the distance on moving. By now I`ve only tested it at 6 to 10 km/h. And so far it worked not bad, but there are still some bugs that I didn`t get rid of yet.
I think one problem is that the timers should work syncronised, but I don`t know how to manage that. Or maybe I did a big mistake and don`t see/know it. I am not so sure if the calculation with those utm-data is correct. The tests weren`t much precise so far. If some of you can need this then you are welcome to help me a little bit. At first you need to add the .dll for serial and GPS of course and you must replace the port and baud-rate to those your GPS-reciever uses. edit: I forgot to say that its only possible to start measuring when standing still (speed < 1). This can be changed in the code. Last edited by Agrartec : 06-24-2007 at 07:29 PM. |
|
|||
|
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
BerndB |
|
||||
|
A note about cGray!!
VB supports both cGrey and cGray althought the correct English form is Grey....So sometimes developers wich code in bth platforms get mixed up... Basic4PPC is a "English correct" enviroment!!!
__________________
Paulo Gomes Porto, Portugal PC: Dual-Core 1,8Ghz, 2GB RAM, 80GB HD PPC: Qtek9000, 1GB SD DLL Version Listing |
|
||||
|
I think that Colour is not a English word but more of an Americanized form of the word...
A derivated word like colored is not written "coloured".... Anyway this is ![]()
__________________
Paulo Gomes Porto, Portugal PC: Dual-Core 1,8Ghz, 2GB RAM, 80GB HD PPC: Qtek9000, 1GB SD DLL Version Listing |
|
||||
|
You started it!
![]() Regards, RandomCoder
__________________
Desktop: Pentium D 920 (2.8GHz, 4MB L2 Cache, 800MHz FSB), 1024MB, 256MB Radeon X600, 250GB HD. Device : Axim X51v XScale 624MHz, 3.7" VGA, 64MB SDRAM, 256MB Flash ROM + 1Gb SD. "Defeat never comes to any man until he admits it."Josephus Daniels |
|
|||
|
Ok, it seems that there are small differences in English and American spelling. But I had the problem that only "cgray" was accepted by B4ppc. When I use the code as BerndB wrote it, then I get error "cgrey is not a variable" or so.
Does the code work at other people here with "cgrey"? Greets John. |
![]() |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| move to the last row at a table | Georg | Questions & Help Needed | 2 | 05-20-2008 09:43 PM |
| Calculating distance | abastien | Code Samples & Tips | 4 | 05-15-2008 07:11 PM |
| GPS Distance Problem | Georg | Questions & Help Needed | 6 | 04-25-2008 05:10 AM |
| Distance-test on UTM and LAT-LON | Put Claude | Questions & Help Needed | 1 | 10-16-2007 02:06 PM |
| Distance Calculator | PatrikL | Share Your Creations | 7 | 04-30-2007 06:15 PM |