Reputation: 967
I am developing an app for android 4.4 device. These do not have built in GPS. I am planning to use USB GPS (globalsat BU353-S4).
I was looking for the Android equivalent of the gpsd library available in Linux. Though I could see few apps (You are here etc), I could not find any library API that I could make use of in my app development.
So, I am thinking of using the USB host API with marine-api library to do this. I am afraid about how complex this could get and if I am reinventing the wheel. Anyone have a better suggestion here...
Upvotes: 2
Views: 3653
Reputation: 1243
GPSD is available on android 4.0 and higher.
http://www.catb.org/gpsd/faq.html
Android 4.0 and later versions use gpsd to interpret the data stream from the onboard GPS
gpsd processes the NMEA data from your GPS device.
If for some reason it is not on your device, you could download and install it.
http://www.catb.org/gpsd/installation.html
However, you state that GPS functionality is not present on your device and you will be using globalsat BU353-S4.
Looking at the manual you install the driver and the GPS device presents itself as a com port. Assuming the linux driver works on your android device, you will be able to send commands to the USB GPS device.
From the manual:
Will the USB GPS work with other Street Mapping software?
Globalsat USB GPS receivers provides standard NMEA data for mapping software to use and convert to coordinates and should work well with most any NMEA compliant software on the market today.
The means you can send standard NMEA commands
e.g.
GGA - essential fix data which provide 3D location and accuracy data.
$GPGGA,123519,4807.038,N,01131.000,E,1,08,0.9,545.4,M,46.9,M,,*47
Where:
GGA Global Positioning System Fix Data
123519 Fix taken at 12:35:19 UTC
4807.038,N Latitude 48 deg 07.038' N
01131.000,E Longitude 11 deg 31.000' E
1 Fix quality: 0 = invalid
1 = GPS fix (SPS)
2 = DGPS fix
3 = PPS fix
4 = Real Time Kinematic
5 = Float RTK
6 = estimated (dead reckoning) (2.3 feature)
7 = Manual input mode
8 = Simulation mode
08 Number of satellites being tracked
0.9 Horizontal dilution of position
545.4,M Altitude, Meters, above mean sea level
46.9,M Height of geoid (mean sea level) above WGS84
ellipsoid
(empty field) time in seconds since last DGPS update
(empty field) DGPS station ID number
*47 the checksum data, always begins with *
If starting with NMEA, the following may be of interest:
https://www.sparkfun.com/datasheets/GPS/NMEA%20Reference%20Manual-Rev2.1-Dec07.pdf
Upvotes: 3