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?
Cape Town sunrise/sunset incorrect
- par
- Posts: 8741
- Joined: Mon Sep 21, 2009 11:56 am
- Name: Pasha
- Location: Saint-Petersburg, Russia
- Contact:
Re: Cape Town sunrise/sunset incorrect
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!
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!

- Meerkat
- Posts: 65
- Joined: Thu Jan 21, 2010 4:19 pm
- Name: Rainer
- Location: Pretoria, South Africa
- Contact:
Re: Cape Town sunrise/sunset incorrect
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.
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.
- par
- Posts: 8741
- Joined: Mon Sep 21, 2009 11:56 am
- Name: Pasha
- Location: Saint-Petersburg, Russia
- Contact:
Re: Cape Town sunrise/sunset incorrect

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.
- Meerkat
- Posts: 65
- Joined: Thu Jan 21, 2010 4:19 pm
- Name: Rainer
- Location: Pretoria, South Africa
- Contact:
Re: Cape Town sunrise/sunset incorrect
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)?
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)?
- par
- Posts: 8741
- Joined: Mon Sep 21, 2009 11:56 am
- Name: Pasha
- Location: Saint-Petersburg, Russia
- Contact:
Re: Cape Town sunrise/sunset incorrect
Ah... Quite complicated feature. But we will think about it.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)?
I understand this is important for you, I just afraid to make YoWindow too much complicated.