Add A-GPS trick to GPS documentation
This commit is contained in:
parent
e9ce0f6700
commit
36ae4b7773
|
@ -63,7 +63,10 @@ Setup PPS for chrony
|
|||
``` bash
|
||||
|
||||
cat >> /boot/armbianEnv.txt <<EOF
|
||||
param_pps_pin=PA6
|
||||
# Orange Pi PC 2e PPS Pin
|
||||
# param_pps_pin=PA6
|
||||
# Pine64 PPS Pin
|
||||
# param_pps_pin=PH9
|
||||
|
||||
EOF
|
||||
systemctl reboot
|
||||
|
@ -182,3 +185,69 @@ systemctl enable gpsconvert.timer
|
|||
systemctl start gpsconvert.timer
|
||||
|
||||
```
|
||||
|
||||
## A-GPS
|
||||
|
||||
This sets up a form of A-GPS to speed locks when indoors or having a hard time getting a lock in general.
|
||||
|
||||
*This setup is specific to the Adafruit Ultimate GPS modules. You'll need to adapt this if using a different GPS receiver.*
|
||||
|
||||
### Setup mt3339 utils and get latest sattelite hints
|
||||
|
||||
``` bash
|
||||
|
||||
apt install python-pip python-setuptools python-wheel python3-pip python3-setuptools python3-wheel geoip-bin
|
||||
pip install -U pyserial && pip3 install -U pyserial
|
||||
cd /opt
|
||||
git clone https://github.com/f5eng/mt3339-utils.git
|
||||
cd /opt/mt3339-utils
|
||||
./eporetrieve
|
||||
|
||||
```
|
||||
|
||||
### Get your current ip address
|
||||
|
||||
*Note: this MUST be done from your main internet connection, NOT VPN*
|
||||
|
||||
``` bash
|
||||
|
||||
curl http://ifconfig.co
|
||||
|
||||
```
|
||||
|
||||
### Setup Maxmind GeoIP database
|
||||
|
||||
``` bash
|
||||
|
||||
mkdir GeoLite2
|
||||
cd GeoLite2
|
||||
wget https://geolite.maxmind.com/download/geoip/database/GeoLite2-City.tar.gz
|
||||
tar -xzf GeoLite2-City.tar.gz
|
||||
cd ..
|
||||
|
||||
```
|
||||
|
||||
### Get IP Address Location
|
||||
|
||||
```
|
||||
|
||||
pip3 install -U maxminddb
|
||||
python3
|
||||
import maxminddb
|
||||
reader = maxminddb.open_database('./GeoLite2/GeoLite2-City_20190402/GeoLite2-City.mmdb')
|
||||
rec = reader.get('anipaddress')
|
||||
print('%s,%s,0' %(rec['location']['latitude'], rec['location']['longitude']))
|
||||
exit()
|
||||
|
||||
```
|
||||
|
||||
### Seed GPS Unit With Rough Location and System Time
|
||||
|
||||
``` bash
|
||||
|
||||
systemctl stop gpsd gpsd.socket gpsconvert.timer gpsconvert.service gps-logger
|
||||
./epoloader --speed 9600 --time - --location python_output ./MTK14.EPO /dev/ttyS2
|
||||
systemctl restart gpsd gpsd.socket gpsconvert.timer gpsconvert.service gps-logger
|
||||
|
||||
```
|
||||
|
||||
|
|
Reference in New Issue