Help with shadow_info and SunRise
-
Hello,
I'm trying to debug this method but I could not find out why the same day has some seconds of difference in Sunrise.
May be it's not the right form to find out the Sunrise for a given time?
(I'm using Sketchup 8.04811)Please help!
def fsun(year1,month1,day1,hours1, minuts1) model=Sketchup.active_model info=model.shadow_info new_time=Time.local(year1, month1, day1, hours1, minuts1) info["ShadowTime"]=new_time p(info["SunRise"]) end fsun(2011, 12, 21, 11, 59) fsun(2011, 6, 21, 9, 59) fsun(2011, 12, 21, 9, 59) fsun(2011, 6, 21, 9, 59) fsun(2011, 12, 21, 11, 59) #RESULT; # Wed Dec 21 08;24;22 +0100 2011 #SunRise should be equal? # Tue Jun 21 06;37;23 +0200 2011 # Wed Dec 21 08;24;31 +0100 2011 #SunRise should be equal? # Tue Jun 21 06;37;23 +0200 2011 # Wed Dec 21 08;24;22 +0100 2011 # true -
It's probably just a minor tolerance issue.
If you can actually measure the sunrise to the nearest minute you'll be lucky!
The couple of seconds discrepancy are really nothing at all
The site's elevation and the relative height of adjacent landscape/buildings towards the rising sun direction will all affect the 'real' time much worse any, so why not be satisfied to the nearest minute or so ?
PS: 'SunRise_time_t' gives comparable results to 'SunRise' so that's not the issue -
I thought I was doing something wrong.
Then, I don't worry about this discrepancy.Thanks Tig
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better π
Register LoginAdvertisement