Mentions légales du service

Skip to content
Snippets Groups Projects
Commit b0e9d210 authored by Autodistries's avatar Autodistries
Browse files

remove debug statements, fix gps

parent 59a91658
No related branches found
No related tags found
1 merge request!1Refactoring, new features
...@@ -17,8 +17,8 @@ gpsLocations=$(mktemp /tmp/locations-XXXXXX.gps) ...@@ -17,8 +17,8 @@ gpsLocations=$(mktemp /tmp/locations-XXXXXX.gps)
# fi # fi
# this test prevents any further connection # this test prevents any further connection
while [ $(pgrep -a "sniffer.py" >/dev/null; echo $?) == 0 ]; do while [ $(pgrep -f "sniffer.py" >/dev/null; echo $?) == 0 ]; do
# Location °N, °E is expected
data=$(gpspipe -w -n 10 |grep -om1 "[-]\?[[:digit:]]\{1,3\}\.[[:digit:]]\{9\}.*[[:digit:]]\{1,3\}\.[[:digit:]]\{9\}" | sed 's/"lon"://g') data=$(gpspipe -w -n 10 |grep -om1 "[-]\?[[:digit:]]\{1,3\}\.[[:digit:]]\{9\}.*[[:digit:]]\{1,3\}\.[[:digit:]]\{9\}" | sed 's/"lon"://g')
# 48.714318200,2.206028200 # 48.714318200,2.206028200
# │ Latitude: 48.71441340 N │ # │ Latitude: 48.71441340 N │
...@@ -42,5 +42,5 @@ awk -F',' ' ...@@ -42,5 +42,5 @@ awk -F',' '
} }
END { END {
print lat/NR,lon/NR,alt/NR; print lat/NR,lon/NR,alt/NR;
}' $gpsLocations > "$(echo $3"/location-"$4".log")" }' $gpsLocations > "$(echo $3"/"$4"$(date +%Y%m%d_%H%M%S)-location.gps.log")"
# will write eg as ~/mitik-sens/location-MM-DD-HH-MM-wifiX-chan6.log # will write eg as ~/mitik-sens/
...@@ -104,4 +104,4 @@ ...@@ -104,4 +104,4 @@
name: "ansible_sens_gps {{ _hour }} {{ _minute }}" name: "ansible_sens_gps {{ _hour }} {{ _minute }}"
minute: "{{ _minute }}" minute: "{{ _minute }}"
hour: "{{ _hour }}" hour: "{{ _hour }}"
job: "/home/{{ansible_ssh_user}}/positionGetter.sh {{_gps_poll_timeout}} 10 '{{_workdir}}' '{{_location_prefix}}location$(date +%Y%m%d_%H%M%S).gps'" job: "/home/{{ansible_ssh_user}}/positionGetter.sh {{_gps_poll_timeout}} 10 '{{_workdir}}' '{{_location_prefix}}'"
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment