While this is correct, it won't help the OP very much, because the script in the linked article starts with $day_since_equinox, which is just where OP would like to end up :-)
| [reply] [d/l] |
Thanks all for responses. They have all been helpful. The above link says You can, of course, spend a lot of time and effort downloading and installing CPAN astronomical modules to calculate the time of sunrise and sunset, and reading manuals and doing a whole lot of stuff. But if you are content with approximate times, you can use some delightful shortcuts. I spent that time having every advantage. It did take north of an hour to happen on my computer, but south of two. Given fewer advantages, I would go with the approximations that would have fall simply be a day, one of 360, good enough for naked-eye, but now that I've got the tools, and I want to use them.
The response that has stuck out in this thread is the one from haukex, and I'm still writing up the results in a way that might befit my future friar status as well as the keystroke equity he put into a response that catered to my exact level of aptitude. Let's however, finish with the original script.
Given right ascension, a naive model has half of it before solar noon, and half after. Finally, we divide by 15 for dimensional analysis. The greeks really did use the sun like a watch.
With the original script, there is no surprises. It doesn't matter where you are on Earth at the onset of autumn, delta will equal zero. So for everyone except 2 simple poles, you will have 12 hour days:
C:\Users\Fred\Desktop>perl fall2.pl
cos tau = - tan phi * tan delta
onset of fall ==> delta equal zero
delta is 0
delta equals zero will zero out rhs for entire globe
phi is latitude: 45 in portland (close enough)
phi is 0.785398163397448
rhs is 0
tau is 1.5707963267949
degrees is 90
estimate is 12
agrees with theory given mathematical objects with primitive assumptio
+ns
C:\Users\Fred\Desktop>type fall2.pl
#!/usr/bin/perl -w
use strict;
use 5.010;
use Math::Trig;
use Math::Trig ':pi';
say "cos tau = - tan phi * tan delta";
say "onset of fall ==> delta equal zero";
my $delta = tan( 0);
say "delta is $delta";
say "delta equals zero will zero out rhs for entire globe";
say "phi is latitude: 45 in portland (close enough)";
my $phi = deg2rad(45);
say "phi is $phi";
my $rhs = - tan ($phi) * tan ($delta);
say "rhs is $rhs";
my $tau = acos($rhs);
say "tau is $tau";
my $degrees = rad2deg($tau);
say "degrees is $degrees";
my $estimate = 2 * $degrees/15;
say "estimate is $estimate";
say "agrees with theory given mathematical
There's *a lot* of reading, but the good news is that we stand on the shoulders of people who make compilers hum for an hour. Much of the work seemed to be the product of a D. Rolsky. I show none of his work in this, so maybe that's a teaser for downthread. Having witnessed the US presidential debate tonight, my ability to use words larger than a 12 year old might be impaired. Das wird ebenfalls passierien.
Schoenen Gruss
| [reply] [d/l] |