Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions gps/Android.bp
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
// Copyright (C) 2011 The Android-x86 Open Source Project

cc_library_shared {
name: "gps.default",
relative_install_path: "hw",
proprietary: true,
srcs: ["gps.c"],
include_dirs: [
"hardware/libhardware/include",
"system/core/libsystem/include",
],
shared_libs: [
"libcutils",
"liblog",
],
cflags: [
"-Wno-unused-parameter",
"-Wno-unused-variable",
],
}
29 changes: 29 additions & 0 deletions gps/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
Android Serial GPS Driver

How to use:

To set serial port, add a property "ro.kernel.android.gps" and set it equal to your GPS device file.
ie. ro.kernel.android.gps=ttyO1

Default baud rate is 9600, to adjust add a property "ro.kernel.android.gpsttybaud" and set it equal to the needed rate. (4800-115200)
ie. ro.kernel.android.gpsttybaud=9600

Default GPS fix rate (interval between position updates) depends on the used device but it is often 1 second. This rate is possible
to modify by property "ro.kernel.android.gps.max_rate" if your GPS device is able to process UBX protocol. Acceptable property value
must be from one of two ranges - from 1 to 65 seconds or from 250 to 65000 milliseconds.

Serial GPS driver is able to synchronize system time by the similar way as Internet connection. Property
"ro.kernel.android.gps.time_sync" which is greater than zero is taken as threshold in seconds. If difference between system time
and GPS time will grow over given threshold then system time will be set to GPS time with the respect to the current time zone.
Threshold should be set to some value from 20 to 60. If property is missing or its value is zero then time synchronization
is turned off.

Notes:
* If using a USB device make sure you have the necessary kernel modules loaded or built in to the kernel.
* Make sure the permissions on your device file are correct

Donate:
If you find any of this useful and want to show appreciation see below:

PayPal: keith.conger@gmail.com
Bitcoin: 1Pg54vVnaLxNsziA6cy9CTefoEG5iAm9Uh
Loading