in reply to Re: Total fault tolerance for perl GPS program
in thread Total fault tolerance for perl GPS program
Result: -123.456789012 12.345678901 123.1234 2024-05-03T12:34:56.000Zperl -MJSON::XS -le '$_=`gpspipe -n 5 -w|grep TPV`;$_=decode_json$_;pr +int"$_->{lon} $_->{lat} $_->{alt} $_->{time}"'
My application requires the automated determination of timezone from GPS:
Result: Your/Timezoneperl -MJSON::XS -e '$_=`gpspipe -n 5 -w|grep TPV`;$_=decode_json$_;pri +nt`timezonefinder $_->{lon} $_->{lat}`'
sudo apt install libopenblas-dev pip3 install timezonefinder export PATH=/home/user/.local/bin:$PATH
Now my computer magically knows the time zone:perl -MJSON::XS -e 'RE:while(){$_=`gpspipe -n 5 -w|grep TPV`;last if$_ +;sleep 1}eval{$_=decode_json$_};if($@){sleep 1;goto RE};print`timezon +efinder $_->{lon} $_->{lat}`'
sudo ln -s /usr/share/zoneinfo/Your/Timezone /etc/localtime
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^3: Total fault tolerance for perl GPS program
by NERDVANA (Priest) on May 04, 2024 at 03:52 UTC | |
by Anonymous Monk on May 04, 2024 at 07:12 UTC |