donrecardo
Senior Member
Hi
My aim is to take a GPS receiver on my dinghy and once per second
over the course of two 80 minute races data log the.....
UTC
Lat
Lon
Speed
So that on returning home I can overlay the data on to a map to see where
I could have been a little quicker.
I had the GPS receiver hooked to a picaxe 18X but ran out of byte variables
so changed to a 20X2. This now works just as I wanted using the following code
All the b0 variables are just to remove the unwanted stuff and the Sertxd line
is simply so that I could see what is happening whilst experimenting and can
now be removed .
So far so good , everything is working as expected ( well better than as
expected really because I didnt expect it to work )
I also own an AXE110 data logger and extender board , fully populated with
24LC512 chips . I ran a test using the supplied light and temp sensors and
was able to produce a graph in Excel with the logged data
So the plan is now to log the received GPS data into the logger but I haven't
a clue how to go about getting all that data into the logger in a nice orderly
fashion once every second . I looked at " new mission" in the program editors
data logger wizard but that only seems to deal with reading sensors.
Can someone please help me with the code that I will need ?
Lastly will I have enough space on the eight 24LC512 chips to hold the once
per second data from two (80 minute) races ?, Im not sure how to calculate
how much room it will need . I assume as there will be ( 80 * 60 ) +
(80 * 60 ) = 9600 readings with 23 bytes of data per reading thats a total of
220800 bytes, and I assume each data chip holds 512K bits = 64K bytes so 8
chips hold 512000 bytes which is more than twice that which I require .
I dont know if it uses up some memory for other things like like address
pointers and such ?
I was just previewing my post before submitting it when I realised I can
actually reduce the amount of data I need to save . The lake I sail on is
only 27 acres in size and because of where its situated my degrees Lat and
degrees Lon will never change , I will allways be 001 deg west and 52
degrees north , so b1,b2,b7 and b8 are not really needed. Only the minutes
and decimal minutes Lat and long would ever change
Don
My aim is to take a GPS receiver on my dinghy and once per second
over the course of two 80 minute races data log the.....
UTC
Lat
Lon
Speed
So that on returning home I can overlay the data on to a map to see where
I could have been a little quicker.
I had the GPS receiver hooked to a picaxe 18X but ran out of byte variables
so changed to a 20X2. This now works just as I wanted using the following code
Code:
'Using a 20X2 chip because I need more than 14 byte variables
'Input B.7 is fed from the output of a GPS receiver which runs
'at 9600 baud
init:
setfreq m8
let dirsB = %01111111
main:
serin b.7, t9600_8, ("$GPRMC"),b0,b1,b2,b3,b4,b5,b6,b0,b0,b0,b0,b0,b0,b0,b7,b8,b9,b10,b0,b11,b12,b13,b14,b0,b0,b0,b0,b0,b15,b16,b17,b0,b18,b19,b20,b21,b0,b0,b0,b22,b0,b23
sertxd ("UTC ",b1,b2,":",b3,b4,":",b5,b6," Lat. ",b7,b8," : ",b9,b10,".",b11,b12,b13,b14," Lon. ",b15," : ",b16,b17,".",b18,b19,b20,b21," ",b22,".",b23," Kn",cr,lf)
goto main
is simply so that I could see what is happening whilst experimenting and can
now be removed .
So far so good , everything is working as expected ( well better than as
expected really because I didnt expect it to work )
I also own an AXE110 data logger and extender board , fully populated with
24LC512 chips . I ran a test using the supplied light and temp sensors and
was able to produce a graph in Excel with the logged data
So the plan is now to log the received GPS data into the logger but I haven't
a clue how to go about getting all that data into the logger in a nice orderly
fashion once every second . I looked at " new mission" in the program editors
data logger wizard but that only seems to deal with reading sensors.
Can someone please help me with the code that I will need ?
Lastly will I have enough space on the eight 24LC512 chips to hold the once
per second data from two (80 minute) races ?, Im not sure how to calculate
how much room it will need . I assume as there will be ( 80 * 60 ) +
(80 * 60 ) = 9600 readings with 23 bytes of data per reading thats a total of
220800 bytes, and I assume each data chip holds 512K bits = 64K bytes so 8
chips hold 512000 bytes which is more than twice that which I require .
I dont know if it uses up some memory for other things like like address
pointers and such ?
I was just previewing my post before submitting it when I realised I can
actually reduce the amount of data I need to save . The lake I sail on is
only 27 acres in size and because of where its situated my degrees Lat and
degrees Lon will never change , I will allways be 001 deg west and 52
degrees north , so b1,b2,b7 and b8 are not really needed. Only the minutes
and decimal minutes Lat and long would ever change
Don