You are on page 1of 5

twilight table

Twilights and sunrise and set


Station
Birmingham
Latitude
52.5
Longitude
-1.9167
Time zone
0
Day
Year
Month
Day

1998
10
25

Output
Rising
Astronomical
Nautical
Civil
Sun

###
###
###
###

days to J2000

###

Setting
Altitude
###
-18
###
-12
###
-6
###
-0.833

Notes
The VBA function Sunrise(day, glat, glong, index, altitude) does all the work, and is
based on a simple iterative scheme explained in the Explanatory Supplement to the
Astronomical Ephemeris, sections 9.311 and 9.33.
This routine may not give sensible values above 60N or below -60N, and is only accurate
to a few minutes either way. Sun rise/set times are heavily dependent on local
horizons anyway.

Page 1

Unrolled

Sunrise unrolled
Spreadsheet version of iterative sunrise calculation
Year
Month
Day
days
centuries

Variables
L
G
lambda
E
obliquity
GHA
delta
cost
t
new ut
new ut hrs
new days
centuries

1998
10
25
#MACRO?
#MACRO?

Latitude
Longitude
time zone
Required alt
Rise or set

52.5
-1.9167
0
-0.833
1

iterations
1st
2nd
3rd
4th
5th
#MACRO? #MACRO? #MACRO? #MACRO? #MACRO?
#MACRO? #MACRO? #MACRO? #MACRO? #MACRO?
#MACRO? #MACRO? #MACRO? #MACRO? #MACRO?
#MACRO? #MACRO? #MACRO? #MACRO? #MACRO?
#MACRO? #MACRO? #MACRO? #MACRO? #MACRO?
#MACRO? #MACRO? #MACRO? #MACRO? #MACRO?
#MACRO? #MACRO? #MACRO? #MACRO? #MACRO?
#MACRO? #MACRO? #MACRO? #MACRO? #MACRO?
#MACRO? #MACRO? #MACRO? #MACRO? #MACRO?
#MACRO? #MACRO? #MACRO? #MACRO? #MACRO?
#MACRO? #MACRO? #MACRO? #MACRO? #MACRO?
#MACRO? #MACRO? #MACRO? #MACRO? #MACRO?
#MACRO? #MACRO? #MACRO? #MACRO? #MACRO?
#MACRO? #MACRO? #MACRO? #MACRO? #MACRO?

Page 2

UT
Zone time

###
###

Unrolled

###

###

Page 3

sunrise no vba

Sunrise native spreadsheet version


uses formulas in radians form, days to J2000.0 only good for 100 years either side of J2000.0
Input
Year
Month
Day
Latitude
Longitude
time zone
Required alt
Rise or set

1998
10
25
52.5
-1.9167
0
-0.833
1

Output
Event UT
6.843
Event zone time
6.843
Days since J2000
-433.5
Centuries
-0.01187
Notes
Set B11 to -18 for astronomical twilight,
and -12 for nautical twilight, -6 for civil twilight
Set B12 to -1 for setting events, or 1 for rising events

Calculation tables (formulas in radians)


L 3.720725 3.725625
G 5.066172 5.071071
ec -0.031580 -0.031525
lambda 3.689146 3.694099
E 0.069088 0.069238
obl 0.409096 0.409096
delta -0.208593 -0.210311
GHA 0.069088 -1.283020
cosc 0.251446 0.253776
correction 1.316622 1.314214
utnew 1.789335 1.791594
new centuries -0.011861 -0.011861

3.725631
5.071077
-0.031525
3.694105
0.069238
0.409096
-0.210313
-1.280761
0.253779
1.314211
1.791597
-0.011861

Page 4

3.725631
5.071077
-0.031525
3.694105
0.069238
0.409096
-0.210313
-1.280758
0.253779
1.314211
1.791597
-0.011861

note - conversion to radians


must be kept to full 16 digits for L
otherwise serious errors

sunrise no vba

ersion to radians
pt to full 16 digits for L
erious errors

Page 5

You might also like