sunrise and sunset values - Printable Version +- Logic Machine Forum (https://forum.logicmachine.net) +-- Forum: LogicMachine eco-system (https://forum.logicmachine.net/forumdisplay.php?fid=1) +--- Forum: General (https://forum.logicmachine.net/forumdisplay.php?fid=2) +--- Thread: sunrise and sunset values (/showthread.php?tid=1010) Pages:
1
2
|
sunrise and sunset values - Thomas - 22.09.2017 Hi Can I see sunrise and sunset times for today (in local time)? In some value, group object or as a result of a function? Thank you RE: sunrise and sunset values - admin - 22.09.2017 You can use rscalc function from common functions to get sunrise and sunset time in minutes. Then you can convert it to text (or use a day/time object instead): Code: latitude = 11.11 RE: sunrise and sunset values - Thomas - 25.09.2017 Hi Thank you for your reply but the first two rows are the problem. I don't want two separated stores for geo coordinates. I set these values in the system date/time dialogue. Can I at least read it from here? The best solution would be if the system took these values from KNX objects provided by my meteo station. RE: sunrise and sunset values - admin - 25.09.2017 See this post: https://forum.logicmachine.net/showthread.php?tid=997 RE: sunrise and sunset values - Thomas - 04.10.2017 Thank you it works. RE: sunrise and sunset values - buuuudzik - 25.02.2018 (22.09.2017, 10:24)admin Wrote: You can use rscalc function from common functions to get sunrise and sunset time in minutes. Then you can convert it to text (or use a day/time object instead): I've checked this script and probably is something wrong. E.g. for Lublin, PL google maps link: https://www.google.pl/maps/place/Lublin/@51.2181956,22.4937308,12z/data=!3m1!4b1!4m5!3m4!1s0x472257141e154061:0x5528ee7af6e8e95f!8m2!3d51.2464536!4d22.5684463?hl=pl Based on this link I've filled the lat and lng: Code: lat = 22.4937308 The result is wrong: Code: * arg: 1 It should be round about 6:23 for sunrise and 17:03 for sunset. RE: sunrise and sunset values - admin - 25.02.2018 Does your LM have correct date, time and timezone set? RE: sunrise and sunset values - buuuudzik - 25.02.2018 (25.02.2018, 10:49)admin Wrote: Does your LM have correct date, time and timezone set? I think yes. Please see into attached screenshot. I've tested this also with minus values. RE: sunrise and sunset values - admin - 26.02.2018 Well, LAT = 22.4937308 LNG = 51.2181956 is somewhere in Saudi Arabia You have them in reverse. RE: sunrise and sunset values - buuuudzik - 26.02.2018 But why google API has such address? See below link: Code: https://www.google.pl/maps/place/Lublin/@51.2181956,22.4937308,12z/data=!3m1!4b1!4m5!3m4!1s0x472257141e154061:0x5528ee7af6e8e95f!8m2!3d51.2464536!4d22.5684463?hl=pl I've checked with also -22 and also not right. See what I've found in User guide for Spacelynk and what I've found on Google Maps for Lublin. And also on page latlong.net RE: sunrise and sunset values - admin - 26.02.2018 In the script you posted you have: Code: lat = 22.4937308 Which in fact should be: Code: lat = 51.2181956 With these values today's sunrise/sunset is at 06:20/17:06 RE: sunrise and sunset values - buuuudzik - 26.02.2018 Right I had no problem in my suncalculation script because I had there appriopriate order. But what about positive and negative values? In above screenshot from google there is no sign but should be. Can you maybe add some info about this into your manual? But if it is about these values I've checked the trend from twilight sensor and 0lux is at 5:50 and 17:50. If it is about sun elevation 0° is at 6:40 and 17:05. What is the goal of this sunset sunrise script? Checking if elevation == 0° or other value? RE: sunrise and sunset values - admin - 27.02.2018 There are several types of sunrise/sunset, rscalc gives values when sun is at 0°. Why do you think there should be a sign in coordinates for a location in Poland? It is above equator and east of Greenwich, so both latitude and longitude are positive numbers. RE: sunrise and sunset values - buuuudzik - 27.02.2018 Because when I've started to deal with this subject I was using this site(Berlin is also on the East side): https://www.esrl.noaa.gov/gmd/grad/solcalc/azel.html and also I remeber that this can be different, so it is good when it is clearly specified in the manual. RE: sunrise and sunset values - admin - 27.02.2018 That's because it a US website. They also have time zone offsets in reverse, Berlin should be UTC +1. Their interpretation of longitude is incorrect and misleading. RE: sunrise and sunset values - buuuudzik - 27.02.2018 I know such situation like A B and + - in RS-485 But google is also US company and NOAA is some governmental departure so sounds very professional Good to know how it is on LM. Thanks Admin RE: sunrise and sunset values - Mrinj - 18.03.2018 Hi, Can someone help me, please! How can I compare (in a if / elseif) the sunrise and sunset results (from Admin's script above) to os.time() to define if it is morning, day ore evening? Best, RE: sunrise and sunset values - admin - 19.03.2018 Code: latitude = 11.11 RE: sunrise and sunset values - Mrinj - 19.03.2018 (19.03.2018, 07:08)admin Wrote: Thanks you, Admin! RE: sunrise and sunset values - FatMax - 14.12.2018 (22.09.2017, 10:24)admin Wrote: You can use rscalc function from common functions to get sunrise and sunset time in minutes. Then you can convert it to text (or use a day/time object instead): Is it possible to get unix time when using rscalc? I'm using the values from the settings (lat, long), but getting 600 as result from sunrise = rascals(latitude). |