-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add optional wind direction in currentweather module #243
Conversation
Remove showWindDirection from default cfg in README. Good idea. |
Nice one! Before I merge: |
I had added the showWindDirection variable into the default config at the top of the README. Not sure what I was thinking since none of the other config options show there except location and appid. It is fixed now, |
@@ -14,7 +14,7 @@ modules: [ | |||
config: { | |||
// See 'Configuration options' for more information. | |||
location: 'Amsterdam,Netherlands', | |||
appid: 'abcde12345abcde12345abcde12345ab' //openweathermap.org API key. | |||
appid: 'abcde12345abcde12345abcde12345ab', //openweathermap.org API key. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you remove the trailing comma?
Just one question (a stupid one): doesn't the cardinal direction depend on your location? |
Depends on what map you're looking at. The conversion from degrees to the cardinal direction assumes that we're using the north pole in the Arctic as "north" and the south pole in Antarctica as "south". If you use maps with Antarctica on top it would be incorrect though unless openweathermap does any trickery behind the scenes. |
Are the openweatherAPI degrees switched on south hemisphere? Never thought about that ;) |
I don't think so. It appears the degrees provided by the openweatherAPI are Azimuth degrees. Azimuth degrees use True North (North Pole) as North. So I guess the answer is no. It will not switch your direction but I have sent an email to the openweatherAPI team asking them if this is truly the case. |
@roxasvalor could you take a look at https://github.com/MichMich/MagicMirror/blob/v2-beta/modules/default/currentweather/currentweather.js#L313 and https://github.com/MichMich/MagicMirror/blob/v2-beta/modules/default/currentweather/currentweather.js#L315 ? they both say ESE. |
Thanks, I found it. Check PR #308 for the fix. |
Optionally add the wind direction (pulled from Openweather API) next to the wind speed in the current weather module. It is turned off by default but by adding the option "showWindDirection" in config.js it can be turned on.