Andy-H Posted February 9, 2012 Share Posted February 9, 2012 I have a database which receives location data from tracking units, I'm not sure wither I should store lat/long pairs in their own table, or along with the incoming data, I could argue that lat/lng's belong to a location, and therefore belong with a location, but I can also argue that lat/lngs are constants, whereas data that could be attached to them are not, I.e. speed limits, road names. At the same time, bearing, altitude etc are constant for the given location, but if I want to attach a reverse geocode cache result to a location based on radius the only option I can come up with is adding a default NULL (FK) id to the locations table to associate locations to geocode. What's the best way to go? Cheers Quote Link to comment Share on other sites More sharing options...
sunfighter Posted February 9, 2012 Share Posted February 9, 2012 Just want to say that you might want to check this out http://www.gsak.net/ Andy. I use it all the time. Quote Link to comment Share on other sites More sharing options...
Andy-H Posted February 9, 2012 Author Share Posted February 9, 2012 Cheers. bookmarked it, are you in the tracking industry? Quote Link to comment Share on other sites More sharing options...
Andy-H Posted February 9, 2012 Author Share Posted February 9, 2012 I have attached my database design so far, I need to be able to - Control which trackers a user can view/update (users_trackers) - Control which RFID tags belong to users (users_RFID) - Store location data from GPRS/SMS units (trackers.locations) - Filter weather a location was an alert (i.e. high speed alert, alarm) (trackers.locations.alerts [left join]) - Optionally store data from unit inputs (trackers.locations.data (how can I get multiple rows of data??) - Optionally attach an RFID to a journey (trackers.journeys[RFID] = NULL) - Query for custom user defined locations with in a radius of locations, fall-back to reverse geocode (users.locations[lat/lon] - trackers.locations[lat/lon] (reverse geocode table not added yet) Can anyone think of a better way of doing this? Also, is it possible to LEFT JOIN a table (users.locations) then fallback to another LEFT JOIN if that returns null (reverse geocode) Thanks for any help. Quote Link to comment Share on other sites More sharing options...
sunfighter Posted February 10, 2012 Share Posted February 10, 2012 Cheers. bookmarked it, are you in the tracking industry? Hi Andy, No, not in tracking industry. Use Gsak and a UPSr unit to geocache. And at one time, tied it into my Ham Radio for tracking my vehicle and sending weather info. My daughter is a hiker and uses it with her GPSr and with something called spot (i think) to upload her location and print it to a map on the internet, so we can track her. PS. I don't think you attached your database design. Quote Link to comment Share on other sites More sharing options...
Andy-H Posted February 10, 2012 Author Share Posted February 10, 2012 Oh cool, I work for a company called Phantom Ltd, were building a fleet tracking system so users can login and see live updates of where their fleet vehicles are in real time. I don't really know much about tracking, I'm just a programmer Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.