Search This Blog

Saturday, June 16, 2012

2012 Oxfam Trailwalker GPS Tracking

Started this year with a "Spot Tracker".  This unit receives the GPS signals and works out where it is and then it transmits that information up to a satellite.

The problem was that the information did not seem to be getting through.  You can see this by looking at the Friday part of the map.  Long straight pieces of orange line.  It seemed only about 1 message every 2 hours was getting out.

This caused me a degree of disapointment and mild panic.

So I dug up my TK-102.  The TK-102 is similar to the unit we used last year.  It also receives the GPS signals from the GPS satellites and calculates it position.  It then sends the back via the GSM phone network.  Last year we had had a number of poor signal situations with similar outages to the spot issues that we had this year.

In order to use the phone network, the unit contains a SIM card.  Just like a phone.  The unit still had a sim card in it.  But what was the number?.  I tried putting the SIM in my phone but my handset is locked to Vodafone and this was a Telstra SIM. No go.

I put the SIM card back in the TK-102 and switched it on.  A green LED was flashing and that seemed like a good thing.  So I put the unit out side where it could see the sky and hopefully get a fix.  Then hmm much though I wonder if it is still connected to GPSGate and what was my password.  Finally after some thought I managed to log into GPS gate and there it was happy and Green.  The green indicating that GPS gate had seen it recently.  I clicked on thing and GPS gate showed me a map with a marker at my house.  So far so good.  But how will the public see it as GPS gate do not seem to have publicly accessible web pages.

I could not get hold of Cameron.  The GURU who had written the page http://oxfambulators.javonix.com/ we were using to display their locvation this year.  Panic.

Last year we had used a similar but different tracker on a different GPS gate account.  We displayed it on a web site on my server and that meant I had the code.  Not that I necessarilly understood it as Cameron (A person with more knowledge of such things than me) had written it.  But it was based in part on some code given away by GPS gate as explained on my blog here.

So I followed those instructions once again and got the code.  Then I searched Camerons code for the places it communicated with gpsgate.  And copied across the relevant bit for the new account for this TK102.  Woo hoo it worked.  I could see the new tracker on last years page.  There is a God!

But only one point and an error flashed up about the user having disabled history paths.  So it was back to the gpsgate web site to work out how to enable paths which I did eventually.  Then did I get a path.  Including a trip to the snowy mountains a year or so ago.  In fact everything since the start of last years walk.

So I searched the code and found this
// the timestamp of the first relevant tracking event
var startTime = new Date(1308267073000);
What tha' is that number.
Luckilly I found a web site that offerred to convert any date into a unix time stamp  
So I tried that and got a number sort of similar but it did not have enough digits.   It was short the three zeros on the end.  I added them and uploaded the newly modified code and wow it works.

It still had last years photo.  Searching through the code showed that it was hosted on Cameron's server.  I went out to the car and got the camera and downlaoded a picture taken at the start.  Up loaded that to my server and modified the code to point to the new photo.  There it was in all its glory.  A gazillion times to big.  Totally obscuring the map.  Downloaded and installed the GIMP (a free photo editing program).  Loaded the photo and fiddled around trying to work out how to make it smaller.  Tried a couple of different sizes and seem to hit the mark.

Here is that page complete at the moment with real data
http://syndetic.com.au/ftest10.html

So a little sigh of releif.  But still could not contact Cameron.

Anyway, Raced home where Derek was waiting almost an hour late.

Drove out to Lake Manchester.

Managed to eventually contact Cameron who quickly whipped up a new web page that shows both trackers.  http://oxfambulators.javonix.com/













No comments:

Post a Comment