Feature #6569 » ublox5-boot.sh
| 1 |
#!/bin/sh
|
|---|---|
| 2 |
#
|
| 3 |
# Initialization script. Good for me. Maybe you too. - bms
|
| 4 |
#
|
| 5 |
_ubloxdev=/dev/cuaU0 |
| 6 |
_gpsctl=gpsctl |
| 7 |
_gpsctl_opts="-f -t u-blox" |
| 8 |
|
| 9 |
### Binary mode config.
|
| 10 |
|
| 11 |
# On USB, accept UBX and NMEA; emit only UBX.
|
| 12 |
${_gpsctl} ${_gpsctl_opts} -x '\x06\x00\x03\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x03\x00\x01\x00\x00\x00\x00\x00' ${_ubloxdev} |
| 13 |
|
| 14 |
# Enable all UBX messages.
|
| 15 |
${_gpsctl} ${_gpsctl_opts} -x '\x06\x02\x00\x00\x00\x00\x00\x00\x00\x1F' ${_ubloxdev} |
| 16 |
|
| 17 |
# Disable all NMEA messages.
|
| 18 |
${_gpsctl} ${_gpsctl_opts} -x '\x06\x02\x01\x00\x00\x00\x00\x00\x00\x00' ${_ubloxdev} |
| 19 |
|
| 20 |
### 1PPS config.
|
| 21 |
|
| 22 |
# Enable 1PPS on +-ve assert, UTC seconds, no antenna/group/user delay factor,
|
| 23 |
# UTC seconds only, 100us pulse length.
|
| 24 |
# (1PPS is NOT supported on USB without using a separate GPIO line.)
|
| 25 |
${_gpsctl} ${_gpsctl_opts} -x '\x06\x07\xE8\x03\x00\x00\x54\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00' ${_ubloxdev} |
| 26 |
|
| 27 |
### Performance tuning.
|
| 28 |
|
| 29 |
# Enable max performance mode.
|
| 30 |
${_gpsctl} ${_gpsctl_opts} -x '\x06\x11\x00\x00' ${_ubloxdev} |
| 31 |
|
| 32 |
# Enable auto 2D/3D fix mode, with 3 sats minimum, 20 sats maximum.
|
| 33 |
${_gpsctl} ${_gpsctl_opts} -x '\x06\x23\x00\x00\x44\x00\x00\x00\x00\x00\x00\x00\x03\x14\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00' ${_ubloxdev} |
| 34 |
|
| 35 |
### Localisation for SBAS extra satellite feeds.
|
| 36 |
|
| 37 |
# Astra-5B only (London, UK -- limited sky view.)
|
| 38 |
${_gpsctl} ${_gpsctl_opts} -x '\x06\x16\x03\x07\x01\x00\x08\x00\x00\x00' ${_ubloxdev} |
| 39 |
|
| 40 |
# Now ready to run gpsd on ${_ubloxdev} itself.
|
| 41 |
exit 0
|
- « Previous
- 1
- …
- 7
- 8
- 9
- Next »