I'm facing just a minor issue: in the skin.conf is defined 'earthquake_maxradiuskm = 2000'. Therefore I'm expecting a distance in km's, but the actual distance as well as the units are still in miles (mijl in Dutch). How to resolve this? (http://oentsjerk.eu/)
Hi Arend,
nice update to change miles to km.
In your patch you have ...
eqmag = locale.format("%g", float(eqmag) )
--
You received this message because you are subscribed to the Google Groups "weewx-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to weewx-user+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/weewx-user/6742394c-d258-4784-b5be-5cfbeb0584c2n%40googlegroups.com.
Hi Arend,
OK, cool :)
thanks for the update
cheers
Tim
To view this discussion on the web visit https://groups.google.com/d/msgid/weewx-user/de297e94-86cf-4531-8619-9080d2d03070n%40googlegroups.com.
--
You received this message because you are subscribed to the Google Groups "weewx-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to weewx-user+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/weewx-user/a4225415-7a3f-4842-9056-c85738b47d0an%40googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/weewx-user/ff274b89-295d-4de5-b899-8c1551c40e94n%40googlegroups.com.
Hi
Having been struggling with the Belchertown earthquake distance issue and so I have been following this thread with great interest.
But a warning first ....I have crashed and burned by forcing locale in the past ......make sure you can recover.
I have weewx on a VM running Belchertown and using a mysql US database but all displays are in metric.
None of the suggestions in the thread sofar would get earthquake distance to show kms only miles.
I have also been getting a lot of guidance from another weewx user.
The edits from #422
did not make any difference and a quick check of weewx.conf and
skin.conf shows group_distance = km
14:18:03 pied@weewx:/etc/weewx$ grep -r group_distance*
weewx.conf.alarm.ver: group_distance = km
weewx.conf.alarm.ver: group_distance = km # Options are 'mile' or 'km'
weewx.conf.20201222111610: group_distance = km # Options are 'mile' or 'km'
weewx.conf.bak1: group_distance = km # Options are 'mile' or 'km'
weewx.conf: group_distance = km
weewx.conf: group_distance = km # Options are 'mile' or 'km'
weewx.conf.dist: group_distance = mile # Options are 'mile' or 'km'
weewx.conf.21-12-20: group_distance = km # Options are 'mile' or 'km'
skins/Belchertown/skin.conf: group_distance = km # Options are 'mile' or 'km'
skins/Belchertown/skin.conf:# group_distance = mile # Options are 'mile' or 'km'
14:18:35 pied@weewx:/etc/weewx$
What eventually solved my problem was this suggestion from my mentor...…
force belchertown to use en_AU.UTF-8
belchertown skin.conf is now
# General Site Defaults
belchertown_debug = 0
# belchertown_locale = "auto"
belchertown_locale = "en_AU.UTF-8"
Where it all fell
over was during the ubuntu server install.
I paid particular attention to locale stuff during the install.
Highlighting
Australia then tab to OK .......then highlighting Brisbane then tab
to the OK ....and so on .......
that is why when this bit popped up during the ubuntu server install output I copy/pasted it into a text.file for later.
Change locale to Australia
Generating locales (this might take a while)...
en_AU.UTF-8... done
en_US.UTF-8... done
Generation complete.
the local is set to
LANG=en_US.UTF-8
LANGUAGE=
LC_CTYPE="en_US.UTF-8"
LC_NUMERIC="en_US.UTF-8"
LC_TIME="en_US.UTF-8"
LC_COLLATE="en_US.UTF-8"
LC_MONETARY="en_US.UTF-8"
LC_MESSAGES="en_US.UTF-8"
LC_PAPER="en_US.UTF-8"
LC_NAME="en_US.UTF-8"
LC_ADDRESS="en_US.UTF-8"
LC_TELEPHONE="en_US.UTF-8"
LC_MEASUREMENT="en_US.UTF-8"
LC_IDENTIFICATION="en_US.UTF-8"
LC_ALL=
Reading package lists... Done
Building dependency tree
I thought that was
strange. Why US when I selected AU ???????
but after the server install finished a check of the VM revealed this
13:16:59 pied@weewx:~$ locale
LANG=en_AU.UTF-8
LANGUAGE=
LC_CTYPE="en_AU.UTF-8"
LC_NUMERIC="en_AU.UTF-8"
LC_TIME="en_AU.UTF-8"
LC_COLLATE="en_AU.UTF-8"
LC_MONETARY="en_AU.UTF-8"
LC_MESSAGES="en_AU.UTF-8"
LC_PAPER="en_AU.UTF-8"
LC_NAME="en_AU.UTF-8"
LC_ADDRESS="en_AU.UTF-8"
LC_TELEPHONE="en_AU.UTF-8"
LC_MEASUREMENT="en_AU.UTF-8"
LC_IDENTIFICATION="en_AU.UTF-8"
LC_ALL=
14:04:09 pied@weewx:~$
I thought all was going to be good ......but no earthquake distance was in miles?????
So when the
belchertown skin.conf edit fixed the distance by forcing it to
use en_AU.UTF-8, and got earthquake distance in kms,
the next step was to make sure that the default locale was definitely forced to en_AU.UTF-8.
It should have been........that is what I selected .........but the server install output said otherwise ........yet a locale query said AU ??????
By forcing locale en_AU.UTF-8 it should ensure
that LC_MEASUREMENT="en_US.UTF-8" would
be over written. The source of "miles"
I edited skin.conf back to AUTO, then used the command locale-gen, then followed by a reboot of the server.........and distance is (still) in KMs
pied@weewx:~$ sudo locale-gen en_AU.UTF-8
[sudo] password for pied:
Generating locales (this might take a while)...
en_AU.UTF-8... done
Generation complete.
pied@weewx:~$ locale
LANG=en_AU.UTF-8
LANGUAGE=
LC_CTYPE="en_AU.UTF-8"
LC_NUMERIC="en_AU.UTF-8"
LC_TIME="en_AU.UTF-8"
LC_COLLATE="en_AU.UTF-8"
LC_MONETARY="en_AU.UTF-8"
LC_MESSAGES="en_AU.UTF-8"
LC_PAPER="en_AU.UTF-8"
LC_NAME="en_AU.UTF-8"
LC_ADDRESS="en_AU.UTF-8"
LC_TELEPHONE="en_AU.UTF-8"
LC_MEASUREMENT="en_AU.UTF-8"
LC_IDENTIFICATION="en_AU.UTF-8"
LC_ALL=
pied@weewx:~$ Connection to weewx closed by remote host.
Connection to weewx closed.
pied@XPS:~$ ssh pied@weewx
The suspicion is that the edits in #422 are probably not required in this instance.
How or why my locale could get en_US.UTF-8 when I went out of my way to select en_AU.UTF-8 during the install ......and told me it was en_AU.UTF-8 when queried after the install ......is in the lap of the gods.
Hope this may help others
To view this discussion on the web visit https://groups.google.com/d/msgid/weewx-user/CACjxfUvsM_7_KvVYeaDW2os6erw6AJREGDMKj4SYDeheeCLcEQ%40mail.gmail.com.