mirror of
https://github.com/thetechprepper/emcomm-tools-os-community.git
synced 2026-09-17 15:41:44 -04:00
GPS - Replaced 3D fix with lat/lon
This commit is contained in:
@@ -66,8 +66,9 @@ case $1 in
|
||||
if [ $? -eq 0 ]; then
|
||||
|
||||
# 3. Obtain the current GPS mode
|
||||
GPS_MODE=$(gpspipe -w -n 10 | grep -m 1 TPV | jq --exit-status -r .mode)
|
||||
GPS_JSON=$(gpspipe -w -n 10 | grep -m 1 TPV)
|
||||
if [ $? -eq 0 ]; then
|
||||
GPS_MODE=$(echo $GPS_JSON | jq --exit-status -r .mode)
|
||||
|
||||
case $GPS_MODE in
|
||||
1)
|
||||
@@ -77,7 +78,9 @@ case $1 in
|
||||
echo "2D fix"
|
||||
;;
|
||||
3)
|
||||
echo "3D fix"
|
||||
LAT=$(echo $GPS_JSON | jq -r .lat)
|
||||
LON=$(echo $GPS_JSON | jq -r .lon)
|
||||
printf "%.5f,%.5f\n" $LAT $LON
|
||||
;;
|
||||
*)
|
||||
echo "Unknown mode"
|
||||
|
||||
Reference in New Issue
Block a user