Mercurial > hg > egg-tcls
diff config.weather.example @ 430:8efbb045d44d
weather: Implement searching for nearest of measurement stations based on given lat/long coordinates.
The distance calculation is naive pythagoraean one, should be changed to "Great circle distance"
https://en.wikipedia.org/wiki/Great-circle_distance. (C implementation already done, just needs TCL-ization.)
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Sun, 08 Jan 2017 05:08:38 +0200 |
parents | db6e1d39db11 |
children | d4f4a9dfb34f |
line wrap: on
line diff
--- a/config.weather.example Sun Jan 08 04:56:54 2017 +0200 +++ b/config.weather.example Sun Jan 08 05:08:38 2017 +0200 @@ -35,7 +35,7 @@ ### ### Messages ### -set weather_msg_list_station [list "\002@station@\002 ( http://www.google.fi/maps/@@c_lat@,@c_lng@,15z )"] +set weather_msg_list_station [list "\002@station@\002 ( http://www.google.fi/maps/@@c_lat@,@c_lng@,18z )"] set weather_msg_result [list "\002@station@\002, mitattu klo @ctime@: \002@temp@°C\002"] @@ -51,6 +51,12 @@ set weather_msg_usage_prefix_1 "Käyttö: !sää " set weather_msg_usage_prefix_2 " !sää " +set weather_msg_list_nearest $weather_msg_list_station +set weather_msg_usage_nearest "lähin <lat>\[, \]<long> -- näyttää annettuja koordinaatteja lähimpänä olevat mittausasemat" +set weather_msg_usage_nearest_invalid "lähin <lat>\[, \]<long> -- näyttää annettuja koordinaatteja lähimpänä olevat mittausasemat" +set weather_msg_nearest_stations "Lähimmät mittausasemat (%1, %2): %3" + + set weather_msg_usage_def_set "vakio <paikka>\[;<paikka2>\] -- asettaa vakiohavaintoaseman\nvakio -- näyttää nykyisen" set weather_msg_usage_alias "alias <alias> = <nimi> (Lisää alias-nimen, esim. alias perse = turku)" set weather_msg_usage_unalias "unalias <alias> (Poistaa aliaksen)"