Ephemerids calculation

Use as Ephemerids [Latitude] where Latitude is a float between -90 and 90.
If no Latitude is specified, the default of 50 degrees North will be used.

Concise output

Ephemerids.c - to be compiled with the math library.
Runtime can be up to 10 minutes.

The output looks like this:

Earliest sunrise on day 175  at  03h53
   Latest sunset on day 189  at  20h06

  Latest sunrise on day   7  at  08h06
 Earliest sunset on day 358  at  15h53



Verbose output

A full table of ephemerids for all 365 days can be obtained by activating
a printf statement near the bottom of this program.
Line 120:
/*     printf("On day %3i: Sunrise %02ih%02i Sunset %02ih%02i\n",
               Day, RiseHour,
              (CorrRise-RiseHour*cGranules/24)*24*60/cGranules, SetHour,
              (CorrSet -SetHour *cGranules/24)*24*60/cGranules);         */


Sunrise and sunset will then be reported for each day of the year.
The interesting range is around June 20, the longest day of the year:

On day 167:   Sunrise 03h55   Sunset 19h53
On day 168:   Sunrise 03h55   Sunset 19h54
On day 169:   Sunrise 03h54   Sunset 19h55
On day 170:   Sunrise 03h54   Sunset 19h56
On day 171:   Sunrise 03h54   Sunset 19h57
On day 172:   Sunrise 03h54   Sunset 19h58
On day 173:   Sunrise 03h54   Sunset 19h59
On day 174:   Sunrise 03h53   Sunset 20h00
On day 175:   Sunrise 03h53   Sunset 20h00
        <--     earliest sunrise of the year
On day 176:   Sunrise 03h53   Sunset 20h01
On day 177:   Sunrise 03h53   Sunset 20h02
On day 178:   Sunrise 03h54   Sunset 20h02
On day 179:   Sunrise 03h54   Sunset 20h03
On day 180:   Sunrise 03h54   Sunset 20h03
On day 181:   Sunrise 03h54   Sunset 20h04
On day 182:   Sunrise 03h55   Sunset 20h04
        <--     summer solstice
On day 183:   Sunrise 03h55   Sunset 20h05
On day 184:   Sunrise 03h55   Sunset 20h05
On day 185:   Sunrise 03h56   Sunset 20h05
On day 186:   Sunrise 03h56   Sunset 20h05
On day 187:   Sunrise 03h57   Sunset 20h05
On day 188:   Sunrise 03h57   Sunset 20h06
On day 189:   Sunrise 03h58   Sunset 20h06
        <--     latest sunset of the year
On day 190:   Sunrise 03h59   Sunset 20h06
On day 191:   Sunrise 03h59   Sunset 20h06
On day 192:   Sunrise 04h00   Sunset 20h06
On day 193:   Sunrise 04h01   Sunset 20h05
On day 194:   Sunrise 04h02   Sunset 20h05
On day 195:   Sunrise 04h03   Sunset 20h05
On day 196:   Sunrise 04h04   Sunset 20h05
On day 197:   Sunrise 04h05   Sunset 20h04
On day 198:   Sunrise 04h06   Sunset 20h04
On day 199:   Sunrise 04h07   Sunset 20h03
On day 200:   Sunrise 04h08   Sunset 20h03

Animations

Basic system

This is a top view of the Earth-Sun system. The North Pole can be seen tilted
over 23.5 degrees to the right. Because of this, the northern hemisphere gets
more light in summer (at the left side of the orbit) than in winter (to the right).
Animation (500 Kb)

Mapping an earth image

From http://www.nsf.gov/od/lpa/forum/colwell/rc02_asm_keynote/sld039.htm, comes this image:



With the help of EphAnimEarth.c, 240 successive screenshots were generated in PGM format.
These were then batch-converted to GIF with PaintShopPro5, and then run through gifsicle
to come to this animation (2 Mb). Compare it to the professional display
at http://www.geog.ouc.bc.ca/physgeog/contents/6h.html.
They also have an animation there.

With a drawing

Editing a simple text string in PaintShopPro5 gave this result.
Keep in mind that because of the top view of the "earth",
only the upper half of this image will be seen.
There's no point in putting much in the lower half.



The original ephemerids animation program was slightly modified to map this drawing onto a sphere.
For readability, the rotation of the "earth" was also inverted to sweep from left-to-right (clockwise),
instead of right-to-left (counterclockwise) as the real Earth actually does.
The resulting 240 screenshots in PGM format were once again batch-converted to GIF with PaintShopPro5,
and then run through gifsicle which composed this animation (1 Mb)