Page 1 of 1

Cape Town sunrise/sunset incorrect

Posted: Wed May 04, 2011 2:11 pm
by Meerkat
Hi Pasha,
It seems that the sunrise and sunset for Cape Town is incorrect.
Cape Town: http://www.kwathabeng.co.za/weather/cap ... ather.html

It should be more or less the same as for Hout Bay as they are close together.
Hout Bay: http://www.kwathabeng.co.za/weather/hou ... ather.html

Can you check up on your co-ordinates for Cape Town please?

Re: Cape Town sunrise/sunset incorrect

Posted: Wed May 04, 2011 3:24 pm
by par
Hey, Rainer, happy to read you again!

You have selected 1014073 geonames-id for Cape Town on your website, this is the id of Carletonville.
While Cape Town geonames id is 3369157
I think this is the source of the problem.

Cape Town landscape is beautiful! :Bravo:

Re: Cape Town sunrise/sunset incorrect

Posted: Wed May 04, 2011 3:43 pm
by Meerkat
Stupid me. Was PHP a coding problem with a "break;" statement not working properly.
Thanks for the observation.

I just have one small issue with the Cape Town sunrise occurring in the west and setting in the east.
The view of Table Mountain is due South i.e. I'm looking south.
I have set the "view_direction" for Cape Town in the widget to 315° but that does not solve the issue.
Could you add a widget parameter to indicate "looking=south" and "looking=north" so that the sun rises and sets in the proper position.
I get a lot of people telling me that the sun is rising on the wrong side of the pictures.

Re: Cape Town sunrise/sunset incorrect

Posted: Wed May 04, 2011 4:21 pm
by par
:))))
I did not expect the people would be so attentive to YoWindow orientation.

I was thinking that view_direction parameter is enough...

Why have you set it to 315 degrees?
If you look at South it must be 180.

Re: Cape Town sunrise/sunset incorrect

Posted: Wed May 04, 2011 4:30 pm
by Meerkat
The Cape Town picture is actually looking SW, i.e. 225°, but with the previous confusion in the documentation where West was 0° I added 90° to give me 315° (225+90).
I'll fix that as well now.

How about when the "view_direction" is between 90° and 270° then we're looking south and therefore the sun must rise on the left hand side (like in the Northern Hemisphere)?

Re: Cape Town sunrise/sunset incorrect

Posted: Thu May 05, 2011 6:59 am
by par
Meerkat wrote:How about when the "view_direction" is between 90° and 270° then we're looking south and therefore the sun must rise on the left hand side (like in the Northern Hemisphere)?
Ah... Quite complicated feature. But we will think about it.
I understand this is important for you, I just afraid to make YoWindow too much complicated.