sq6jnx / sr0wx.py Goto Github PK
View Code? Open in Web Editor NEWAutomatic hamradio weather station written in python
License: Apache License 2.0
Automatic hamradio weather station written in python
License: Apache License 2.0
... as github suggests.
it should refer to our mailing list [email protected] (in polish) and maybe an interview with me ( "Radiowe prognozy pogodowe" (wywiad) (w: Świat Radio 8/2012, ss. 44-46; skrót: http://ulubionykiosk.pl/pobierz/18752 ))
To easily install needed pip packages by issuing
pip install -r requirements.txt
Should include
Mark whether its Python2 or Python3.
Langitude, Longitude and Callsign should be global variables.
Currently they are duplicated at least in WWO and OSTOL modules.
Now we have whole-day minimum and maximum temperature read in the 3 hour forecast section.
I suggest separating that, because i have reports like "it have no sense, how could the temperature change from 3 to 20 in 3 hour period?"
Now maxtempC and mintempC is taken from one level above the hourly forecast. If i remember correctly it wasn't always like that, and current broadcast wasn't changed so much.
I will make another broadcast on my own, on my branch and on the production, and suggest it.
... like zips, etc.
WARN: this will rewrite history
It may be a good idea to get rid of pygame in generating tones of any kind, mostly CTCSS.
Examples from http://montessorimuddle.org/2012/04/19/generating-and-saving-tones-with-sox/ :
To play a single note (frequency 173.5 Hz) for 5 seconds, use:
> play -n synth 5 sin 347
To save the note to a mp3 file (called note.mp3) use:
> sox -n note.mp3 synth 5 sin 347
The SoX command to play two notes with frequencies of 347 and 357 Hz is:
> play -n synth 15 sin 347 sin 357
and to make an mp3 file use:
> sox -n beat_10.mp3 synth 15 sin 347 sin 357
I asked for a key for burze.dzis.net SOAP api allowing to get informations about lightning strikes and weather dangers in Europe.
>>> place = client.service.miejscowosc('sofia',klucz)
>>> place
(MyComplexTypeMiejscowosc){
y = 42.41
x = 23.19
}
>>> print(client.service.szukaj_burzy(place.y, place.x, 100, klucz))
(MyComplexTypeBurza){
liczba = 5
odleglosc = 79.07
kierunek = "E"
okres = 15
}
>>> print(client.service.ostrzezenia_pogodowe(place.y, place.x, klucz))
(MyComplexTypeOstrzezenia){
od_dnia = None
do_dnia = None
mroz = 0
upal = 0
wiatr = 0
opad = 0
burza = 0
traba = 0
}
>>>
And i am going to write a module to use it. I had an idea to make it more interactive, and ask for the data separately and issue an storm station broadcast when the storm is coming, not when the cron says so. But for now it will be another module i want to write to look how it's like to write a module for that and get some experience to grasp other modules waiting for rewrite.
When running 'python microsoft_translator_downloader.py' with default dictionary.py you get some duplicates info, like:
metrow_na_sekunde already exists
temperatura_odczuwalna already exists
I wanted to set it on pmr 6 channel and theres an probleem.. becuse im on windows so there is no setup.exe for controling the station like you can turn if off or on But it would be good when adding it
When API service is down modules can wait far too long...
I believe 10 second timeout should be OK.
For now these functions return:
rv = {
'data': 'list of sample file_names',
"needCTCSS": False,
"source": "worldweatheronline",
}
because sr0wx.py
doesn't use {}.get()
method.
Plan:
.get()
in sr0wx.py
getData()
fucntions (even empty dict is OK)WARN: will rewrite history
Connected with #22.
pl_google
considered deprecated and should be removed from source
Currently world_weather_online translates weather condition code to description.
It should translate description to description in another language to make #14 possible.
All non-working and old style modules should be removed from:
.py
files)dictionary.py
fileThe only two modules which should stay is worldweatheronline
and activity_map
.
pl_google/pl_google.py
contains lots of code copied and pasted form dowgird's pyliczba. It should be replaced with:
import pyliczba
, but pyliczba is not pip-compatible... for sending log entries > logging.INFO
or logging.ERROR
.
First of all Check if python3 has it in batteries:
Idea: play different playlists of samples on left and right channel.
oldnumeric is no longer available in newer numpy distributions.
$ python sr0wx.py
Traceback (most recent call last):
File "sr0wx.py", line 63, in <module>
import lib.cw as cw
File "/home/sq7lrx/Devel/sr0wx.py/lib/cw.py", line 19, in <module>
import numpy.oldnumeric as Numeric
ImportError: No module named oldnumeric
__init__
?pl_google
should be a classget_data()
:# What a mess!
# TODO: lang.read_temperature_celsius
# TODO: lang.`read datetime function` (no idea for name and
# functionality now)
# TODO: lang.read_pressure
# TODO: read_wind_direction (see def __wind_direction() above)
# TODO: read_wind_direction_degrees
# TODO: read_speed_kmph
# TODO: and so on to clear this mess below.
HINT: first add methods to "prototype" / parent class, each of which will raise NotImplementedError
.
Currently when running module
2014-11-25 19:04:41,459 root INFO: starting <activity_map.ActivityMap object at 0xb4cdb1ac>...
is logged, which is OK, but doesn't answer the question where to look at if something fails where there will be more than one module (instance) of the same class.
We need some way to find config
-side variable in run time. Possible solutions:
(Pdb) [v for v in dir(config) if id(eval('config.%s' % v)) == id(module)]
['activitymap']
saving id(self)
on __init__()
(not tested, especially in inheritance) and then comparing module.get_id()
with element of modules
list.
Zmiana api worldweatheronline usuwa takie rzeczy jak dane na temat wiatru i kod pogody z podsumowania prognozowanego dnia i przenosi je do prognoz na każdą godzinę.
W mojej poprawce do modułu sr0wx pobiera te dane z pierwszego pomiaru, ale to chyba nie rozwiązanie. Pasowałoby rozstrzygnąć czy należy zmienić strukture prognozy (i podawać każdy pomiar z osobna) czy podawać rzeczywiście pierwszy (lub któryś inny pomiar)
Steps:
file://path/to/file
just it.
WWO module doesn't work any longer...
http://discuss.worldweatheronline.com/t/free-api-has-now-been-discontinued/54
Extract translations from pl_google
and:
.json
?) file,translate(value)
which should read data from this file(s)A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.