Author |
|
GSOUZA Groupie
Joined: October 20 2006 Location: Brazil
Online Status: Offline Posts: 75
|
Posted: November 21 2007 at 00:38 | IP Logged
|
|
|
hello, how can I add my own settings in latitude and longitude and if possible, add my country and city? there are only options for USA.
I already tried this at powerhome.ini:
[Sun]
LONGITUDE=-46,8439
LATITUDE=-23,4956
TIMEZONE=-3
DAYLIGHTSAVINGS=YES
but the times are wrong. sunset here cant be at 23:59 :)
thanks in advance,
Gustavo
|
Back to Top |
|
|
krommetje Super User
Joined: December 29 2004 Location: Netherlands
Online Status: Offline Posts: 695
|
Posted: November 21 2007 at 04:06 | IP Logged
|
|
|
GSOUZA wrote:
hello, how can I add my own settings in latitude and longitude and if possible, add my country and city? there are only options for USA. |
|
|
you are going to have to expiriment with these settings, I had to as well... the best thing you can do is contact a weatheramateur or station with the values of your city for sunset and sunrise. Take the values for lat/Long you already have as a starting point and try other Lat/Long-values... note: these can be negative lat/Long-values as well...
everytime you enter another lat/long do a reinit and check the powerhome Status-screen... good luck
Peter
Edited by krommetje - November 21 2007 at 04:08
|
Back to Top |
|
|
GSOUZA Groupie
Joined: October 20 2006 Location: Brazil
Online Status: Offline Posts: 75
|
Posted: November 21 2007 at 22:01 | IP Logged
|
|
|
yes, the correct ones according to my gps are:
LONGITUDE -46,8439
LATITUDE -23,4956
both negatives.
unfortunally, with these information, earlier versions of PH already worked.
I dont know why it stops to work.
at PH interface, you can enter only 2 digits after the coma and every configuration i test with gives me the same results.
thanks,
Gustavo
|
Back to Top |
|
|
GSOUZA Groupie
Joined: October 20 2006 Location: Brazil
Online Status: Offline Posts: 75
|
Posted: November 22 2007 at 23:29 | IP Logged
|
|
|
maybe, the better solution is to know where powerhome get the information about sunset, sunrise from the coordinates i entered. so i can get from the same place the correct ones for my city.
i just manage it to work but in powerhome, the sunrise/sunset times are incorrect. if i enter a weather website and use the coordinates i have, the information about sunrise/sunset is exactly.
so powerhome is geting the wrong information from somewhere or powerhome handles the information in a different form.
cheers,
Gustavo
|
Back to Top |
|
|
dhoward Admin Group
Joined: June 29 2001 Location: United States
Online Status: Offline Posts: 4447
|
Posted: November 23 2007 at 19:33 | IP Logged
|
|
|
Gustavo,
PowerHome calculates the sunrise/sunset times using standard formulas that were available on the web.
As far as I know, the sunrise/sunset calculations have not changed within PowerHome for years (except for the recent changes to Daylight Savings Time which only adjusts the returned value by an hour). If this used to work in previous PowerHome versions (for the same values you've supplied) and it's suddenly stopped working, then it's most likely the changes to the PowerBuilder runtime environment. Since you're using comma's, I can only assume that the recent upgrade to the 9.03 runtimes has somehow broken something with other region settings.
I'll look into the code and see if there is anything I can find.
Peter,
I know you're in the same boat as Gustavo concerning other regions. If you're using .12, have you experienced any problems with sunrise/sunset settings?
Thanks
Dave.
|
Back to Top |
|
|
dhoward Admin Group
Joined: June 29 2001 Location: United States
Online Status: Offline Posts: 4447
|
Posted: November 23 2007 at 20:04 | IP Logged
|
|
|
Gustavo,
Ive played around with your posted specs and may have found at least part of the problem.
In the "Hours Past GMT" field, make sure that you have a positive 3 instead of a negative 3. Also, I originally had problems pasting your settings from your post because I had inadvertantly mixed Latitude and Longitude. In the Top box (Latitude), I placed -23.50 and in the second box (Longitude), I placed -46.84. With these settings, I got sunrise and sunset times of 05:14 and 18:37 respectively. I verified this against a sunrise/sunset calculator on the web and this appears to be correct. If you use these same settings and get different results, then it's most likely a problem with region settings.
Let me know your results,
Dave.
|
Back to Top |
|
|
GSOUZA Groupie
Joined: October 20 2006 Location: Brazil
Online Status: Offline Posts: 75
|
Posted: November 23 2007 at 22:06 | IP Logged
|
|
|
yes Dave but the sunrise at 05:14 is wrong, we are in DST now and 5:14 is really 4:14AM still too dark for sunrise happen :)
and the correct hours would be 6:14 and 19:35 maybe i need to use just 2 in hours past gmt or four because is past gmt, dont know, i will try
Gustavo
|
Back to Top |
|
|
krommetje Super User
Joined: December 29 2004 Location: Netherlands
Online Status: Offline Posts: 695
|
Posted: November 24 2007 at 04:15 | IP Logged
|
|
|
dhoward wrote:
Peter,
I know you're in the same boat as Gustavo concerning other regions. If you're using .12, have you experienced any problems with sunrise/sunset settings?
|
|
|
No I had no problems with the settings... For my city I use(d) the following settings:
Lat: 52,6
Long: -98,0
Hours Past GMT: 6
that is in complete contradiction of the actual numbers but the sunset/rise times are only off for 2 minutes so this works for me...
the largest city close to my Home City is EINDHOVEN
About 98km/58m from Antwerp.
based on Lat/Long I provided, where would I actually be?
Peter
Edited by krommetje - November 24 2007 at 04:17
|
Back to Top |
|
|
dhoward Admin Group
Joined: June 29 2001 Location: United States
Online Status: Offline Posts: 4447
|
Posted: November 24 2007 at 12:35 | IP Logged
|
|
|
Peter,
I checked on the coordinates for EINDHOVEN and came up with 51.45 and 5.48. When I put these values into PowerHome with Hours past GMT of -1, I get sunrise/sunset times compatible with the values you posted.
The formula that PowerHome is using expects latitudes north of the equator to be positive, south of the equator, negative. Longitudes east of the prime meridian are positive, west of the prime meridian are negative. East of the prime meridian will have negative hours past GMT, west of the prime meridian will have positive hours past GMT.
Give it a try and let me know how it works.
Dave.
|
Back to Top |
|
|
krommetje Super User
Joined: December 29 2004 Location: Netherlands
Online Status: Offline Posts: 695
|
Posted: November 24 2007 at 15:15 | IP Logged
|
|
|
dhoward wrote:
I checked on the coordinates for EINDHOVEN and came up with 51.45 and 5.48. When I put these values into PowerHome with Hours past GMT of -1, I get sunrise/sunset times compatible with the values you posted. |
|
|
I have to agree with you that your values are better: Sunset was more of then I was aware of, about 7 minutes. Actually the sunrise was of for about 45 seconds.
dhoward wrote:
The formula that PowerHome is using expects latitudes north of the equator to be positive, south of the equator, negative. Longitudes east of the prime meridian are positive, west of the prime meridian are negative. East of the prime meridian will have negative hours past GMT, west of the prime meridian will have positive hours past GMT.
|
|
|
so someone living in western europe always has positve Long/Lat and negative Hrs-past-GMT...
Our honored topic starter has negative Long/lat BUT positive hrs-past GMT... Do I understand correct
How do you calculate these values for a certain city you (perhaps) never even aware of its existence
Peter
Note: not to be someone who likes to start fires but... where is TonyNo in this discussion?
Edited by krommetje - November 24 2007 at 15:17
|
Back to Top |
|
|
dhoward Admin Group
Joined: June 29 2001 Location: United States
Online Status: Offline Posts: 4447
|
Posted: November 24 2007 at 16:40 | IP Logged
|
|
|
Peter,
Yep...Western Europe should be positive lat and positive long with negative hours past GMT. Since Gustavo states that he is in Brazil, then he should have lat and long both negative, but hours past GMT as positive. All of the U.S. should be positive lats and negative longs. U.S. hours past GMT should be postive. I found a map online here http://www.worldatlas.com/aatlas/imageg.htm that corresponds to the PowerHome sun calculations.
On the page above, there is a link to several sites that will give you latitude and longitude for various places. I used this one http://www.astro.com/cgi/aq.cgi?lang=e to determine the lat and long for EINDHOVEN. It didnt give negative or positive but does state the latitude as N or S (positive and negative respectively) and the longitude as E or W (postive and negative). It also gives the values in minutes rather than decimal format. Since there are 60 minutes in a degree, divide the minutes value by 60 to get the decimal format. So 29n30 would be 29.5. 45s50 would -45.83.
Hope this helps,
Dave.
|
Back to Top |
|
|
GSOUZA Groupie
Joined: October 20 2006 Location: Brazil
Online Status: Offline Posts: 75
|
Posted: November 25 2007 at 01:44 | IP Logged
|
|
|
for me, works perfect with this:
LATITUDE -23,49
LONGITUDE -46,84
and Hours Past GMT set to 2 (DST here now) normally 3
now all the times are correct
Gustavo
|
Back to Top |
|
|
krommetje Super User
Joined: December 29 2004 Location: Netherlands
Online Status: Offline Posts: 695
|
Posted: November 25 2007 at 02:58 | IP Logged
|
|
|
Gsouza,
that is great that it all worked out for you...
Dave:
thank you for the links. It makes me understand PH's Sun
Tab better.
|
Back to Top |
|
|