Reputation: 36947
Alright.. I guess to start this off I am looking to sometime in the near future start building a web based or browser based application that I want to build a part of the interface to be a gps module. this will be for a self hosted application likely on tablets or laptops where it will use the data for tracking information amongst other things. Any way most of the application is being handled in PHP, mySQL, jQuery. So with that my question is, is there any way to build a gps application with that as the core languages used. If it is possible, whats the best gps unit I can use? remember im not nessisarily looking for a fancy gps unit to do this with.. just a transmitter/reciever is fine so long as I can build software of my own around it, also is it actually possible to do this with something like php/jquery? or is this something I would have to go the route of maybe java to handle the hardware transactions of which I can tie php/jquery into that..
Upvotes: 1
Views: 3670
Reputation: 6420
I have used a bluetooth GSP receiver before..(HOLUX m1200)
When connected, it sets up a serial connection (COM port). You can't communicate with serial ports using only javascript (or jQuery). The easiest way is using a java applet.
You can hide the applet on your page an communicate with the applet using javascript (jQuery). You can find an example here.
Alternatives are using Flash or WPF with XBAP.
The GPS unit outputs series of location messages etc.. More info about that you can find in the GPS protocol (google it) or here
Hope this helps :)
Upvotes: 2
Reputation: 249502
Some tables and laptops have GPS devices integrated. You should consider whether you are targetting iOS (iPad) or other systems.
For iDevices you can use the native stuff, which I won't bother explaining here.
For Linux or BSD systems I suggest gpsd, which is a service you install which abstracts the details of different GPS devices for you and gives you a sort of web service to query for location data. This would be easy to access from PHP or jQuery obviously.
For Windows 7, check out the new Sensor API.
For other systems, you may need to communicate directly with the GPS devices using the standard NMEA protocol (this is what gpsd does under the hood). This will be substantially more work and probably would mean writing a Java program or similar (basically to do what gpsd does).
Upvotes: 1