Skip to content
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

Merged
merged 9 commits into from
Apr 25, 2016
Merged

Add optional wind direction in currentweather module #243

merged 9 commits into from
Apr 25, 2016

Conversation

wandrewromano
Copy link
Contributor

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.

@CFenner
Copy link
Contributor

CFenner commented Apr 25, 2016

Remove showWindDirection from default cfg in README.

Good idea.

@MichMich
Copy link
Collaborator

Nice one! Before I merge:
@CFenner: what do you mean with you comment?

@wandrewromano
Copy link
Contributor Author

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.
Copy link
Collaborator

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?

@MichMich MichMich merged commit 38796a0 into MagicMirrorOrg:v2-beta Apr 25, 2016
@MichMich
Copy link
Collaborator

Just one question (a stupid one): doesn't the cardinal direction depend on your location?

@wandrewromano
Copy link
Contributor Author

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.

@CFenner
Copy link
Contributor

CFenner commented Apr 25, 2016

Are the openweatherAPI degrees switched on south hemisphere? Never thought about that ;)

@wandrewromano
Copy link
Contributor Author

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.

@wandrewromano
Copy link
Contributor Author

Thanks, I found it. Check PR #308 for the fix.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants