Use jq for processing JSON when figuring out latitude/longitude
Signed-off-by: Hugh Brown (Saint Aardvark the Carpeted) <aardvark@saintaardvarkthecarpeted.com>
This commit is contained in:
parent
cc3817eda1
commit
085466b35c
@@ -19,8 +19,8 @@ install_config() {
|
||||
## TO BE CHANGED TO STATIC VALUES
|
||||
## Please only go to 4 decimal places. Example:43.3984
|
||||
|
||||
LATITUDE=$(curl -s4 ifconfig.co/json | awk '/latitude/ {print $2}' | tr -d ',')
|
||||
LONGITUDE=$(curl -s4 ifconfig.co/json | awk '/longitude/ {print $2}' | tr -d ',')
|
||||
LATITUDE=$(curl -s4 ifconfig.co/json | jq .latitude)
|
||||
LONGITUDE=$(curl -s4 ifconfig.co/json | jq .longitude)
|
||||
|
||||
#--------------------- BirdWeather Station Information -----------------------#
|
||||
#_____________The variable below can be set to have your BirdNET-Pi____________#
|
||||
|
||||
Reference in New Issue
Block a user