Simple Calculation of Sunset Time required

There's no way to know. Anything would be just a guess. In a home situation, reaching daylight is probably fairly easy. In a commercial environment, it could be very difficult (the controller could easily be installed in a control room, and there could be many restrictions on running wires).

Another possibility is that the OP already has a controller, and it doesn't have any kind of input supporting a light sensor. Many controllers can't accept that sort of input.

In the end, my interpretation of parsimony is that the OP asked for a particular solution to the problem (and got some good answers). _________________________________________________

Chris L Peterson Cloudbait Observatory

formatting link

Reply to
Chris L Peterson
Loading thread data ...

Thanks for your long and illuminating post!

However:

This isn't the WWW, it's Usenet! Usenet predated the WWW by several decades....

Reply to
Paul Schlyter

I thought it obvious from the way two solutions developed (the photocell posited by Mr. Stockton and the realization that DST is irrelevant by Mr. Peterson) that it's often very easy to start out with an approach to a problem that eventually turns out to be unsuitable. The OP may have suggested a calendar/computational based approach but his real requirements were stated within the discussion, and those were simply to turn the lights on at dusk and off at dawn.

Based on how slowly the photocell and UT approaches emerged from a rather large group of people, many with profound home automation experience, I believe it's very likely the OP picked the solution he was most familiar with and ran with it. Client-directed solutions are almost never as good as problem-based solutions. To that end, a photocell is a better light sensor than a calendar and lots simpler, too. It doesn't seem good science to lock oneself into a single approach and then ride it out to the bitter end simply because that was where you chose to start.

Ah, but Usenet hardly ever gets that far, and worse, still, the requirements are often added to by follow-on posters in ways that the OP never intended until people are offering suggestions totally unrelated to the OP's initial post. For example, someone in this thread began talking about the OP turning on lights via his PC when no such requirement had appeared before. I think the best we can hope for is that even with the wrong starting vector, the discussion eventually gets around to the range of solutions available and an analysis of the pros and cons of each.

As for this discussion, I was responding to the contention that we didn't have enough facts to solve the problem, which I believed to be incorrect. The constraints that have been raised (i.e. inability to run a sensor to daylight or that the OP *only* wants a computational solution) are not terribly likely. Why? Well, because anyone who wants to control lights around his home is not likely living in a bunker or a mine shaft. Based on experience, most home automators want the simplest, most reliable light control method available.

Certainly there could be reasons the OP does not want to solve the problem effectively, reliably or simply. Perhaps he enjoys tinkering with his processor and writing code for it and that's the major reason for this undertaking. But if the real problem is what he's described: "lights on when dark, off at dawn" a photocell out-performs a calendar solution in nearly every dimension. It's a solution used commercially because it's so simple and reliable. It's immune to:

1) synchronization problems 2) relocation problems (moving north or south changes the problem parameters) 3) errors working in UT as opposed to civil time 4) programming errors

and more importantly, it's able to turn the lights on early when weather conditions substantially reduce daylight.

These "pluses" make the universe of people who absolutely *must* use a calendar or lookup table very small indeed. The reasons suggested why the OP must stick with his original computational approach begin to look very much like the zebras I've been yammering about. (-"

Why compute it if you can sense it? I think you've already fallen into the "first solution looked at" trap if you believe that there's truly a computational requirement to turning on the lights when its dark out. I can imagine *some* applications where the computation of exact values for sunrise and sunset might be required, but the "specs" the OP gave us clearly say he wants to turn on the lights at dusk and off at sunrise. The only computational requirement for such a task is a single logical variable that can tell the controller: "is it day or night out?"

We agree on that, and that's another area where a photocell excels. A single logical variable of Day or Night has to be several orders of magnitude more reliable and memory efficient than 100 lines of program code and dozens of variables for a microcontroller.

Then I think you'd be short-changing your client in the mode of "when the only tool a carpenter owns is a hammer, everything looks like a nail" instead of getting the best fit for the job. I can only go by my own experiences but many more times than I can count I came to Usenet with one solution in mind only to find out after my initial post I was way off base. More experienced people were able to convince me to abandon a solution I had a lot of psyche invested in and implement the correct one.

So far, no one has presented a case for calendars much stronger than "it's what the OP wants" or the even more unpersuasive "he may be unable to reach daylight." I contend it's just as likely the calculation solution was simply the first one he thought of. I don't see how that imparts a great sanctity to that approach, particularly considering how badly a calendar light control compares to a sensor that can read actual light levels.

If someone presented some strong and probable reasons why a clock/calendar based solution is superior to one that measures the actual light levels, I might change my opinion. So far, I remain pretty unmoved by the suggestions that someone who's programming their own home automation system is unable to string two wires to a place that "sees" natural light.

I'm even less impressed by claims that since this is the approach the OP chose to open discussion of the issue, it has to be respected above the far simpler, more reliable and more functional photocell solution. It almost seems as if you're saying that if the OP starts with a bad choice, he's somehow constrained to stay with it, even after learning of solutions that are superior in many respects.

"Mistaken" is a pejorative sort of word and implies that the client made an error by simply choosing to start somewhere. I've prefer to think that he was merely unaware of the much simpler photocell solution, as were many people here for many days (myself included) until Mr. Stockton suggested it. The additional "AHA!" experience that Chris provided of the controller only needing to work with UT and not DST was another example of how good solutions often evolve away from the original specifications.

-- Bobby G.

Reply to
Robert Green

Sorry Bobby, Your post makes so many assumptions as to 'what the user wants' that it makes me wince.

Look at the cases where the OP responded

- once to my post which asked about precision required

- once when discussing the lookup table to give the time using just 366 bytes.

Don't you think that the OP's lack of response to the AHA! 'experience' to the UT/DST issue might be significant? Don't you think that the OP's lack of response to the 'photocell ' solutions might be significant?

I think it's just about possible that the OP want's a solution for 'Sunset Time' just like the OP stated in the OP.

Reply to
OG

bloody professionals -

It would be interesting to know from where you derived these "may be" factors, they weren't in the OP's posts, nor in his responses. Maybe the 'maybe's' were in other people's posts.

There's a whole continent where this is a bloody stupid chestnut - but US and Europoean med school students tend to be 'conventionally clever' rather than truly intelligent thinkers.

What on earth makes you think the OP wants anything other than the Time of Sunset? It's what he asked for.

As for the rest of your post - forgive me, I started scanning it, but it kinda assumed that what you wrote at such length was actually worth reading. If you want to write a synopsis, I'll have a go at that.

Reply to
OG

So what DOES the OP want?

Does the OP still read this discussion? If so, OP, what do you want, and why? Please tell us....

If the OP no longer follows the discussion, why do we even still discuss this ?????

Reply to
Paul Schlyter

I would think a diffused dome reflector like those used on photographic light meters pointed straight up would work in your situation, but your solution is still a lot simpler than calculating dates. It also provides light whenever the streetlamp controller decides to provide light, so it's probably going to compensate for extremely overcast and rainy days.

I've been examining the nightly log of controller events and its very clear that a photocell is no slave to absolute sunrise and sunset times. Rainy, cloudy skies affect the total ambient illumination quite noticeably.

The X-10 Hawkeyes may not be good for much, but they do a very reliable job of sensing sunrise and sunset. Better still, I didn't have to run any wires because it's RF. I just have to remember to change batteries every two years. Pretty good deal considering most of my Hawkeyes came free during the great "X-10 Voucher" days.

-- Bobby G.

Reply to
Robert Green

Precisely. If a client came to you worried about burglars breaking in through the windows and wanted to apply window foil to all of them, how much weight should you give his particular approach to the problem as opposed to the correct solution: glass break dectors?

Of course, he might very possibly have have good reasons to want to foil every window in his house. He might like the appearance, or believe visible foil to be a deterren. He might have cases of foil on hand or he may want a glass break sensor that consumes very little standby power. But most likely it was the first solution that came to mind.

The reasons I've suggested for needing foil would be those mythical zebras because they are not very likely be the reason for his spec'ing foil. A good consultant would immediately see the client's taken a bad initial approach and remind him of all the problems that come with window foil technology while explaining the many benefits of the newer technology.

-- Bobby G.

Reply to
Robert Green

Funny,funny,funny !.

52000 years ago,my astronomical timekeeping ancestors were building monuments representing knowledge of the 365 day 5 hour 49 minute annual; cycle

formatting link
Today,5200 years later, I watch all the participants here dither around with the calendrical cycle of 3 years of 365 days and 1 year of 366 days and not know the difference between the core system based on the difference between the axial daily cycle and the aorbital annual cycle.

The great men of antiquity could reason out the components needed to light up the internal chamber based on fixing the annual cycle to Dec

21st and developing a monument to reflect it,Later civilisations created the core structure which creates the 24 hour cycle out of variations in the natural noon cycles but today,my fellow human beings refuse to recognise the core structure which keeps cl;ocks in sync with the daily cycle at 24 hours/360 degrees -

formatting link
What have you done to yourselves when the proposed value is shifted to an unbelievable value of 23 hours 56 minutes 04 seconds insofar as nobody bother to check Flamsteed's proof for the assertion .I am absolutely bewidered that this technologically advanced race cannot grasp the most basic tenets of timekeeping and structural astronomy making this generation,which extends from the late 17th century to the present,as the most uncivilised group ever to set foot on the planet,the bulk of the errors can be expressed in a single and awful graphic -

formatting link

The fact is that none of you could build a monument like Newgrange owing to your adherence to a calendrically based perspective and as Newgrange is one of the oldest known building on the planet,it tell everyone here just how far we have descended as a race.

Reply to
oriel36

If reliability is an essential requirement, simpler solutions almost always trump the more complex. In your application, as in the OP's, precise on and off times are not required so the calculated value method doesn't provide enough benefit to outweigh the potential problems you've described.

I had been scratching my head trying to think of lighting applications that demanded a calculated approach and your example brought to mind one of the few cases where a photocell won't do. If you had been asked to mimic the lighting requirements of an animal from near the North or South Poles, the calculated method would really be your only option.

When it's simply a matter of "lights on when it's dark, off at sunrise" I believe as you do: a photocell will likely prove to be exceptionally more reliable than a calculated solution. That's in addition to its ability to provide light when it's unusually dark out because of heavy cloud cover.

-- Bobby G.

Reply to
Robert Green

I like exposing squirming pretension.

The answer to this 'problem' is found in Huygens by reworking the sunrise/sunset observation which centralises natural noon in order for the Equation of Time correction to be applied or indeed,as Huygens notes, can be used to determine central natural midnight (as opposed to the convenience of civil midnight).

formatting link
The thread was specifically an astronomical solution,albeit a geocentric sunsrise/sunset one and it shows just how limited astronomical timekeeping knowledge is among this present generation,almost astrological in its flavor.Go ahead and vanish,a technologically advanced race is hardly the be all and end all considering what it chooses to believe where matters of intutive intelligence or 'wisdom' is required.You can get away with pretension in a forum which displays more of the same but ultimately this thread has exposed exactly what we have become as a species.

Astronomy is still there for people who are genuine and sincere despite the pretension which now surrounds it from all sides,it is there for those who have outgrown the gadgets of modern society and wish to venture into the arena where astronomers once travelled in timekeeping and structural astronomy based on the Earth's motions or even further back to the great timekeeping astronomers.

Good thread this one,it shows the standard between intutive and inventive intelligence is probably at its widest point ,the former in a wretched state while the latter fairly advanced.

Reply to
oriel36

This isn't a lighting application, but I use the calculated times of civil twilight to determine when to automatically start and stop my meteor cameras. The conditions that would cause differences in actual light levels for a given time aren't important in my case: if it gets dark earlier because of clouds, there's generally no advantage to starting an allsky camera earlier! _________________________________________________

Chris L Peterson Cloudbait Observatory

formatting link

Reply to
Chris L Peterson

HUH?

Non breakable windows maybe?

Reply to
Mxsmanic

Do you think any of that really matters to the person who asked for help with his home automation system?

Reply to
Robert L Bass

as long as they are not too cold and as long as they don't have a data collision and as long as they do not experience a microwave or other noise and as long as they actually sense something (half mine (6) were garbage on arrival)

Reply to
John J. Bengii

Of course you are not sure what my point is because you have an illness,a genuine disability to grasp basic astronomical principles such as the unequal natural noon cycle.You get the point of the following graphic which affirms your illness -

formatting link
Alter any component is that graphical fiction and it disintegrates including your belief that the noon cycles are 24 hours exactly.

but the OP doesn't care about the

The calculations of sunrise/sunset are based on the Ra/Dec calendrical offshoot which means you are using the sidereal day framework anyway.The system which creates the average 24 hour cycle and keeps these cycles elapsing seamlessly into the next cycle is based on a 365 day 5 hours 49 minute system while you creatures work off a 3years of

365 days and 1 year oif 366 days.

You do not know what my point is,indeed !,a bunch of cretins who cannot turn on a porchlight using an easy to understand Equation of Time system ebvven with the whole treatise by Huygens in front of you

-

"Here take notice, that the Sun or the Earth passeth the 12. Signes, or makes an entire revolution in the Ecliptick in 365 days, 5 hours 49 min. or there about, and that those days, reckon'd from noon to noon, are of different lenghts; as is known to all that are vers'd in Astronomy. Now between the longest and the shortest of those days, a day may be taken of such a length, as 365 such days, 5. hours &c. (the same numbers as before) make up, or are equall to that revolution: And this is call'd the Equal or Mean day, according to which the Watches are to be set; and therefore the Hour or Minute shew'd by the Watches, though they be perfectly Iust and equal, must needs differ almost continually from those that are shew'd by the Sun, or are reckon'd according to its Motion."

formatting link
I have to suffer a cretinous viewpoint ,even in its geocentric form,where the Sun has an actual motion corresponding to 24 hours exactly in order to justify axial rotation in 23 hours 56 minutes 04 seconds,a perspective that is so chronically bad that only a person with an illness could not get the point.

Do you get this point?, the most stupid,the most ridiculous group of people ever to set foot on the planet in astronomical matters can justify axial rotation through 360 degrees in 23 hours 56 minutes 04 seconds,not even the creationists reach that level of stupidity.I would prefer to believe that you have a severe inte;llectual disability because the other option is unthinkable.

Reply to
oriel36

Oh, that one is easy. You're a troll.

[plonk]
Reply to
Robert L Bass

Being roughly 3 minutes and 56 seconds off for the value of axial rotation through 360 degrees is no joke and the fact that there is an organisation (IERS) in existence to maintain that terrible error makes it even worse.This is what happens when a technologically advanced society loses touch with the intutive intelligence needed to appreciate timekeeping and structural astronomical principles.

How difficult is it to acknowledge that the 24 hour cycle is a product of the natural noon cycle via a correction known as the Equation of Time which keeps the 24 hour day fixed to natural noon and subsequently is the reason why the 24 hours of Monday elapse into the

24 hours of Tuesday.This is basic stuff that nobody should dispute unless they suffer from a severe intellectual disability.

The next part is even easier to grasp.When Copernicus discovered that axial rotation is the cause of the daily cycle,they adapted the Equation of Time creation of the 24 hour day and transfered it to axial rotation as a 'constant' thereby allowing 4 minutes of clock time to represent 1 degree of longitudinal/geographical seperation making 24 hours/360 degrees.They never needed an external reference for keeping clocks in sync with terrestrial longitudes and the daily cycle at 24 hours/360 degrees ,it was just assumed that axial rotation is constant as a convenient principle rather than a direct observation.

Then Flamsteed came along and adopted a strange position of tying axial rotation directly to the return of a star in 23 hours 56 minutes

04 seconds obligating an explanation for where the missing 3 minutes 56 seconds goes\\.They came up with this monstrosity which has the natural noon cycles at 24 hours exactly -

formatting link

It is though an enormous joke has been played on humanity and it is no longer funny.I could understand it if the actual principles which create the 24 hour cycle out of the natural noon cycle were difficult to understand but they are a joy to behold as seen in the treatise of Huygens.The intricate transfer of the 'average' 24 hour cycle to 'constant' axial rotation is probably the only intricate point where people can get lost but a little familiarity demonstrates the genius of the timekeeping astronomers.

The framework Newton built on is of course the 'sidereal time' one borrowed from Flamsteed which has an astrological core and exists only in the imagination.I don't know how long people intend to keep the proper principles which link clocks to terrestrial longitudes and the daily cycle at 24 hours/360 degrees but being roughly 3 minutes

56 seconds off is perhaps the worse condition a person can find themselves in and really unhealthy.

Easy to rip Newton's agenda asunder but that is not the point,a lot of productive work is going unattended while that monstrosity of a framework prevails.It is as much for the benefit of dynamicists as anyone else but so far all they do so far is cling to the coatails of the late 17th century numbskull who never spotted the error in Flamsteed's reasoning.

=3D=3D=3D=3D=3D=3D>

=3D=3D=3D=3D=3D=3D>

Reply to
oriel36

Note that the analog installation I settled on was not ON-OFF, because that would not have met the requirements. The light incident on the stream table ramps up imperceptibly from OFF in the morning and dims to OFF in the evening. Heavy cloud cover can cause the light to dim during daylight hours. The latter cannot be calculated based on time alone because it depends on weather, not time. In that sense, it is 'better' than a calculated solution, not just an expedient substitute.

Your point about mimicking a non-local environment is well taken. Doing this as well as a with the local analog solution I outlined would a hybrid approach, perhaps substituting local for remote weather effects, or using a statistical/stochastic (not deterministic) component. There are also other approaches for remote simulation with rapidly increasing complexity. (A remote webcam comes to mind.)

... Marc Visit my ongoing Home Automation and Electronics Internet Porch Sale at

formatting link

Marc_F_Hult

formatting link

Reply to
Marc_F_Hult

This squirming pretension and dribbling about hoofbeats has only exposed that you can't even get a geocentric sunrise/sunset solution let alone its equivalent based on the axial and orbital motions of the Earth.

You want to talk like a child then I will treat you like one.I will even reduce it to geocentric terms.

The solution is latitude dependent meaning that the values for sunrise/sunset differ North and South of the Equator and subsequently differ for any given location.There is no one-size-fits-all astronomical solution,it must be adapted for each latitudinal situation.Civil timekeeping does not take this into account.

The next component is the unequal length of the total day using the natural noon cycle as a benchmark,it is a totally different astronomical conception to variations in daylight/darkness yet is linked using the same mechanism based on the relationship between axial rotation and the change in orbital orientation with respect to the Sun.

To turn on a porchlight using calaculated values based on sunrise/ sunset,the opposite procedure of creating the 24 hour cycle is required as Huygens describes -

"In the morning then, when the Sun is just half above the Horizon, note, what hour, min. and sec. the Watch points at, if it be going; if not, set it a going, and put the Indexes, at what hour, min. and sec. you please. Let them goe till Sun-set, and when the Body of the Sun is just half under the Horizon, see, what hour, min. and sec. the Indexes of the Watch point at, and note them too; and reckon, how many houres &c. are Pass'd by the Watch between the one and the other: which is done by adding to the Evening-Observation the hours, &c. that the morning-Observation wanted of 12. or 24. in case the Hour-hand hath in the mean time pass'd that hour once or twice; otherwise the difference only gives the time. Then take the half of that number, and add it to the hours, &c. of the morning-Observation, and you shall have the hours, &c. which the Watch did show, when the Sun was in the South; whereunto add the Aequation in the Table belonging to that day, and note the summe. Then some days being pass'd (the more the better) you are to doe Iust the same: And if the hour of the last day be the same, that was noted before, your Watch is well adjusted; but if it be more or less, the difference divided by the number, elapsed between the two Observations, will give the daily difference."

formatting link
Substitute porchlight for 'clock' in the last sentence and you get what you want even without having to delve into what is occuring to produce the effects via the axial and orbital motions of the Earth using the Sun as a benchmark.

No doubt you will hear hoofbeats running away from the astronomical solution but I am certain that you will be among them.

Reply to
oriel36

Cabling-Design.com Forums website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.