-
Notifications
You must be signed in to change notification settings - Fork 0
/
README
57 lines (41 loc) · 2.15 KB
/
README
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
phpGPSReader - reading GPS locations from gpspipe and put them in arrays.
Copyright (C) 2017 Ole-Henrik Jakobsen
Software requirements:
php-cli To run PHP code at command line interface.
`-> gpsd Daemon for the GPS sensor.
`-> gpsd-clients Package containing gpspipe.
or
`-> modemmanager For reading location data from a USB 3G modem.
-----------------------------------------------------------------------------------------------------------
Supported daemons: | Information
-----------------------------------------------------------------------------------------------------------
Dummy | For testing purposes, based upon gpspipe
-----------------------------------------------------------------------------------------------------------
gpsd | Output of "gpspipe -w"
-----------------------------------------------------------------------------------------------------------
mmcli | Output from ModemManager, it's not supported by a lot of
| 3G USB Modem devices.
-----------------------------------------------------------------------------------------------------------
Configuration of phpGPSReader:
Choose daemon to include and also enable and disable the test mode.
Config file: config.ini
Configuration of daemons:
Usually you don't have to configure anything, but you have some possibilities to configure each daemon.
Use phpGPSReader:
CLI:
cd /path/to/gpsreader
php gpsreader.php [daemon] (optional)[display errors {0|1}])
Optional:
1 Show errors/offsets
simple_location Prints only location data: latitude,longitude (10.000,50.000)
PHP:
$path = "/path/to/gpsreader";
chdir($path);
include_once("" . $path . "/gpspreader.php");
Use phpGPSReader function:
function gpsreader(); = array
Check contents of the array with: print_r(gpsreader());
Information/torubleshooting:
The script is slow -> It might take some time until the GPS signals are received by the GPS sensor (at least the first time),
You can adjust the settings for "gpsd" to limit the search time.
By default it will look for signals for a total of 30 minutes every 20 seconds (+10s which is the runtime of the script itself).