Calculation of Sunrise & Sunset time

Share your advanced PureBasic knowledge/code with the community.
dige
Addict
Addict
Posts: 1254
Joined: Wed Apr 30, 2003 8:15 am
Location: Germany
Contact:

Calculation of Sunrise & Sunset time

Post by dige »

Code: Select all

Procedure.s SunCalc (lat.f = 51, lon.f = 13, T.i = 0, tz.d = 1)

  Define.d B, D, zeitdiff, zeitglg, AMOZ, UMOZ, sunrise, pi = 3.1415927, h = -0.0145, sunset

  ; http://lexikon.astronomie.info/zeitgleichung

  If T = 0
    T = DayOfYear(Date())
  EndIf
  
  B = Radian(lat)
  D = 0.40954*Sin(0.0172*(T-79.349740))
  zeitdiff=12*ACos((Sin(h)-Sin(B)*Sin(D))/(Cos(B)*Cos(D)))/pi
  zeitglg=-0.1752*Sin(0.033430*T+0.5474)-0.1340*Sin(0.018234*T-0.1939)
  
  ; Sunrise
	AMOZ=12-zeitdiff-zeitglg;
	sunrise=AMOZ-lon/15+tz;
  
  ; Sunset
	UMOZ=12+zeitdiff-zeitglg;
	sunset=UMOZ-lon/15+tz;
  
  ProcedureReturn Str(Int(sunrise)) + ":" + Str(Mod(sunrise, 1) * 60) + "-" + Str(Int(sunset)) + ":" + Str(Mod(sunset, 1) * 60)
EndProcedure

Debug SunCalc(51.1, 13.7, 0, 1)
"Daddy, I'll run faster, then it is not so far..."
IdeasVacuum
Always Here
Always Here
Posts: 6425
Joined: Fri Oct 23, 2009 2:33 am
Location: Wales, UK
Contact:

Re: Calculation of Sunrise & Sunset time

Post by IdeasVacuum »

Nice code, but not required here in Wales - we only need to know how many mm of rain to expect :mrgreen:
IdeasVacuum
If it sounds simple, you have not grasped the complexity.
DK5UR
User
User
Posts: 23
Joined: Mon Jun 23, 2008 9:44 pm
Location: Laubach

Re: Calculation of Sunrise & Sunset time

Post by DK5UR »

Just cosmetics, 16:60 is not very common :wink:

Code: Select all

  ProcedureReturn Str(Int(sunrise)) + ":" + RSet(Str(Round(Mod(sunrise,1) * 60,#PB_Round_Down)),2,"0") + "-" + Str(Int(sunset)) + ":" + RSet(Str(Round(Mod(sunset,1) * 60,#PB_Round_Down)),2,"0")
Golfy
User
User
Posts: 97
Joined: Wed Mar 21, 2012 6:10 pm

Re: Calculation of Sunrise & Sunset time

Post by Golfy »

Adding comment (description of variables) and format hour as XX:XX rather X:XX (07:45 rather 7:45). Thanks Dige :D

Code: Select all

Procedure.s SunCalc (lat.f = 45, lon.f = 13, T.i = 0, tz.d = 1)

	Define.d B, D, zeitdiff, zeitglg, AMOZ, UMOZ, sunrise, pi = 3.1415927, h = -0.0145, sunset
	; lat = latitude (N/S), lon=longitude (E/W), T=fuseau horaire, tz=hiver/été (1:hiver, 2:été)

  ; http://lexikon.astronomie.info/zeitgleichung

  If T = 0
    T = DayOfYear(Date())
  EndIf
 
  B = Radian(lat)
  D = 0.40954*Sin(0.0172*(T-79.349740))
  zeitdiff=12*ACos((Sin(h)-Sin(B)*Sin(D))/(Cos(B)*Cos(D)))/pi
  zeitglg=-0.1752*Sin(0.033430*T+0.5474)-0.1340*Sin(0.018234*T-0.1939)
 
  ; Sunrise
   AMOZ=12-zeitdiff-zeitglg;
   sunrise=AMOZ-lon/15+tz;
 
  ; Sunset
   UMOZ=12+zeitdiff-zeitglg;
   sunset=UMOZ-lon/15+tz;
   GetUp$=RSet(Str(Int(sunrise)),2,"0") + ":" + RSet(Str(Round(Mod(sunrise,1) * 60,#PB_Round_Down)),2,"0")
   GetOf$=RSet(Str(Int(sunset)),2,"0") + ":" + RSet(Str(Round(Mod(sunset,1) * 60,#PB_Round_Down)),2,"0")
  ProcedureReturn GetUp$ + "-" + GetOf$
EndProcedure

Debug SunCalc(45, 13.7, 0, 1)
User avatar
VB6_to_PBx
Enthusiast
Enthusiast
Posts: 625
Joined: Mon May 09, 2011 9:36 am

Re: Calculation of Sunrise & Sunset time

Post by VB6_to_PBx »

Code: Select all


Procedure.s SunCalc (lat.f, lon.f, T.i, tz.d)
    Define.d B, D, zeitdiff, zeitglg, AMOZ, UMOZ, sunrise, pi = 3.1415927, h = -0.0145, sunset
    ; lat = latitude (N/S), lon=longitude (E/W), T=Day of Year Number, tz=Time Zone Offset from GMT    pi = 3.1415927 <-- use PureBasic's #PI
    ;         Latitude : ( Horizontal Map Lines )                                    Longitude : ( Vertical Map Lines )
    ;[Q] = Equator = 0.0000000 degrees Latitude                         [P] = Prime Meridian = 0.0000000 degrees Longitude @ Greenwich, England
    ;[N] = Northern Hemisphere ( Positive value , North of Equator )    [E] = Eastern Hemisphere ( Positive value , East of Prime Meridian )
    ;[S] = Southern Hemisphere ( - Negative value , South of Equator )  [W] = Western Hemisphere ( - Negative value , West of Prime Meridian )
    ; 
    ; http://lexikon.astronomie.info/zeitgleichung

    If T = 0
         T = DayOfYear(Date())
    EndIf
 
    B = Radian(lat)
    D = 0.40954*Sin(0.0172*(T-79.349740))
    zeitdiff=12*ACos((Sin(h)-Sin(B)*Sin(D))/(Cos(B)*Cos(D)))/#PI
    zeitglg=-0.1752*Sin(0.033430*T+0.5474)-0.1340*Sin(0.018234*T-0.1939)
 
    ;~~~~~ Sunrise
    AMOZ=12-zeitdiff-zeitglg;
    sunrise=AMOZ-lon/15+tz;
 
    ;~~~~~ Sunset
    UMOZ=12+zeitdiff-zeitglg;
    sunset=UMOZ-lon/15+tz-12;
    GetUp$=RSet(Str(Int(sunrise)),2,"0") + ":" + RSet(Str(Round(Mod(sunrise,1) * 60,#PB_Round_Down)),2,"0")
    GetOf$=RSet(Str(Int(sunset)),2,"0") + ":" + RSet(Str(Round(Mod(sunset,1) * 60,#PB_Round_Down)),2,"0")

    ProcedureReturn "Sunrise = " + GetUp$ + "AM - Sunset = " + GetOf$ + "PM"
EndProcedure

;~~~~~ Los Angeles , CA  (34.052659,-118.218384,0,-8)
;     SunCalc(Latitude,Longitude, Day of Year Number, Coordinated Universal Time = UTC or Time Zone Offset from GMT = Greenwich Mean Time [in England] )
Debug SunCalc(34.052659,-118.218384, 0, -8)
 
PureBasic .... making tiny electrons do what you want !

"With every mistake we must surely be learning" - George Harrison
dige
Addict
Addict
Posts: 1254
Joined: Wed Apr 30, 2003 8:15 am
Location: Germany
Contact:

Re: Calculation of Sunrise & Sunset time

Post by dige »

Hey guys, thanks for the extensions. :D
"Daddy, I'll run faster, then it is not so far..."
Dude
Addict
Addict
Posts: 1907
Joined: Mon Feb 16, 2015 2:49 pm

Re: Calculation of Sunrise & Sunset time

Post by Dude »

Golfy, your post doesn't work for Brisbane Australia:

Code: Select all

Debug SunCalc(27.4667, 153.0, 0, 1) ; Outputs "-2:-2-08:24" for Brisbane Australia
I didn't test the others.
User avatar
StarBootics
Addict
Addict
Posts: 984
Joined: Sun Jul 07, 2013 11:35 am
Location: Canada

Re: Calculation of Sunrise & Sunset time

Post by StarBootics »

Dude wrote:Golfy, your post doesn't work for Brisbane Australia:

Code: Select all

Debug SunCalc(27.4667, 153.0, 0, 1) ; Outputs "-2:-2-08:24" for Brisbane Australia
I didn't test the others.
Your time zone offset is +10 not +1. With the VB6_to_PBx's code with your latitude, longitude and 10 as time zone offset I got :

Sunrise 06:36 AM
Sunset 05:24 PM

Best regards
StarBootics
The Stone Age did not end due to a shortage of stones !
Balmung
User
User
Posts: 24
Joined: Sat Dec 22, 2018 9:15 pm

Re: Calculation of Sunrise & Sunset time

Post by Balmung »

I have added the 2005er Version from this page that also use the year for calculation for a bit more accuracy and used the code above for it: https://lexikon.astronomie.info/zeitgleichung/neu.html

But I'm not 100% sure if all is correct, don't understand all calculations there. The results seams to be correct, but the example C++ Code on the end of the page have more formulas in it.

For example: the page says for the 01.01.2000 that the noon time is used, so Date(2000,1,1,12,0,0). But should I use for the date for calculation also the noon time? Was not sure so I used noon because sounds more logical for me, but must not be right. :?

Edit: Ok, there is a error in it, if I try for example 30. May 2019, I get 16:54AM and 21:39PM, 12h too much, correct would be 4:54AM and 9:39PM. Don't know where the error is. :?:

Edit2: must add 2 If Lines at the Code, hope this will fix it.
Edit3: forget it, only fixed another error. XD

Code: Select all

EnableExplicit

ImportC ""
  time(*tloc = #Null) ; easiest method to get the wordtime without timezone
EndImport

#PI2 = #PI * 2 ; 2PI

Procedure.s SunCalc(lat.f, lon.f, ti.i, tz.d)
  Define GetUp$, GetOf$
  Define.d T, B, M, L, e, DK, RA, RAm, h = -0.0145, zeitglg, zeitdiff, AMOZ, UMOZ, sunrise, sunset
  ; lat = latitude (N/S), lon=longitude (E/W), T=Unix Timestamp Worldtime, tz=Time Zone Offset from GMT    pi = 3.1415927 <-- use PureBasic's #PI
  ;         Latitude : ( Horizontal Map Lines )                                    Longitude : ( Vertical Map Lines )
  ;[Q] = Equator = 0.0000000 degrees Latitude                         [P] = Prime Meridian = 0.0000000 degrees Longitude @ Greenwich, England
  ;[N] = Northern Hemisphere ( Positive value , North of Equator )    [E] = Eastern Hemisphere ( Positive value , East of Prime Meridian )
  ;[S] = Southern Hemisphere ( - Negative value , South of Equator )  [W] = Western Hemisphere ( - Negative value , West of Prime Meridian )
  ; 
  ; https://lexikon.astronomie.info/zeitgleichung/neu.html
  
  If ti = 0
    ti = time()
  EndIf
  
  T = ((Date(Year(ti),Month(ti),Day(ti),12,0,0)-946728000)/86400)/36525 ; 946728000 = Date(2000,1,1,12,0,0)
  B = Radian(lat)
  M = #PI2 * (0.993133 + 99.997361 *T) ; radians
  L = #PI2 * (0.7859453 + M/#PI2 + (6893*Sin(M)+72*Sin(2*M)+6191.2*T) / 1296000) ; radians
  e = #PI2 * (23.43929111 + (-46.8150*T - 0.00059*T*T + 0.001813*T*T*T)/3600)/360 ; radians
  DK = ASin(Sin(e)*Sin(L)) ; radians
  RA = ATan(Tan(L)*Cos(e)) ; radians
  
  If RA < 0 : RA + #PI : EndIf
  If L > #PI : RA + #PI : EndIf
    
  RAm = 18.71506921 + 2400.0513369*T +(0.25862 - 0.000000172*T)*T*T ; Stunden
  RAm - (Round(RAm/24,#PB_Round_Down)*24)
  
  zeitglg = 1.0027379 * (RAm - (RA*3.81972)) ; Stunden
  zeitdiff = 12*ACos((Sin(h) - Sin(B)*Sin(DK)) / (Cos(B)*Cos(DK)))/#PI ; Stunden
  
  ;~~~~~ Sunrise
  AMOZ=12-zeitdiff-zeitglg;
  sunrise=AMOZ-lon/15.0+tz;

  ;~~~~~ Sunset
  UMOZ=12+zeitdiff-zeitglg;
  sunset=UMOZ-lon/15.0+tz-12;
  
  GetUp$=RSet(Str(Int(sunrise)),2,"0") + ":" + RSet(Str(Round(Mod(sunrise,1) * 60,#PB_Round_Down)),2,"0")
  GetOf$=RSet(Str(Int(sunset)),2,"0") + ":" + RSet(Str(Round(Mod(sunset,1) * 60,#PB_Round_Down)),2,"0")
  
  ProcedureReturn "Sunrise = " + GetUp$ + "AM - Sunset = " + GetOf$ + "PM"  
EndProcedure 

;~~~~~ Los Angeles , CA  (34.052659,-118.218384,0,-8)
;     SunCalc(Latitude,Longitude, Unix Timestamp = Worldtime without timezone in seconds since 01.01.1970, Coordinated Universal Time = UTC or Time Zone Offset from GMT = Greenwich Mean Time [in England] )
Debug SunCalc(54.3, 10.1, 0, 1)
Last edited by Balmung on Mon Dec 24, 2018 6:08 am, edited 4 times in total.
User avatar
idle
Always Here
Always Here
Posts: 5096
Joined: Fri Sep 21, 2007 5:52 am
Location: New Zealand

Re: Calculation of Sunrise & Sunset time

Post by idle »

it's good, for my location, the reference from the met service is probably wellington
sunrise 5.57am sunset 8.37pm vs sunrise 6.00am sunset 8:41pm
Debug SunCalc(-36.813, 175.106, 0, 13)
Windows 11, Manjaro, Raspberry Pi OS
Image
Balmung
User
User
Posts: 24
Joined: Sat Dec 22, 2018 9:15 pm

Re: Calculation of Sunrise & Sunset time

Post by Balmung »

Compare it with this side, this use a much more complex formula and is much more on the real times: https://www.calsky.com/cs.cgi/Sun/2?

You can save your lat/lon on the Setup Page (link on the left top of the side).

But I still have an error in it, why I get on some dates a time that shows 12h too much.
User avatar
idle
Always Here
Always Here
Posts: 5096
Joined: Fri Sep 21, 2007 5:52 am
Location: New Zealand

Re: Calculation of Sunrise & Sunset time

Post by idle »

if I enter the coordinates from that page it's 1 minute out

but if I round up

Code: Select all

GetUp$=RSet(Str(Int(sunrise)),2,"0") + ":" + RSet(Str(Round(Mod(sunrise,1) * 60,#PB_Round_Up)),2,"0")
  GetOf$=RSet(Str(Int(sunset)),2,"0") + ":" + RSet(Str(Round(Mod(sunset,1) * 60,#PB_Round_Up)),2,"0")
it's spot on
Windows 11, Manjaro, Raspberry Pi OS
Image
Balmung
User
User
Posts: 24
Joined: Sat Dec 22, 2018 9:15 pm

Re: Calculation of Sunrise & Sunset time

Post by Balmung »

But only as long you didn't try another dates. There is a bug in that routine that I first need to find.

Can't find that error right now, will give it up for today.
User avatar
jacdelad
Addict
Addict
Posts: 1478
Joined: Wed Feb 03, 2021 12:46 pm
Location: Planet Riesa
Contact:

Re: Calculation of Sunrise & Sunset time

Post by jacdelad »

Erm...so which version does really work? I'm confused, as each of the codes here gives me a different result.
PureBasic 6.04/XProfan X4a/Embarcadero RAD Studio 11/Perl 5.2/Python 3.10
Windows 11/Ryzen 5800X/32GB RAM/Radeon 7770 OC/3TB SSD/11TB HDD
Synology DS1821+/36GB RAM/130TB
Synology DS920+/20GB RAM/54TB
Synology DS916+ii/8GB RAM/12TB
Mesa
Enthusiast
Enthusiast
Posts: 349
Joined: Fri Feb 24, 2012 10:19 am

Re: Calculation of Sunrise & Sunset time

Post by Mesa »

To have a good precision, it is necessary to calculate the position of the planet Earth on its orbit with a sufficient precision.

The proposed calculation is done in universal time.
Add the time zone and or daylight saving time if necessary.

Code: Select all

;+==========================================================+
;|                                                          |
;| Calcul de l'heure TU du lever et du coucher du Soleil    |
;|                                                          |
;| Précision : La minute de temps                           |
;| Plateforme: Multiplateforme                              |
;| ToDo      :                                              |
;| Auteur    : Mesa  30 Janvier 2013                        |
;|                                                          |
;+==========================================================+



;Ville
;Grenoble  +45° 11' 16" N (Nord = positif, Sud = négatif)
;          -05° 43' 37" E (Est = négatif, Ouest = Positif)
;Altitude 	Min. 204 m   Max. 475 m


; Bureau des longitudes : heure de lever du soleil
; http://www.imcce.fr/fr/ephemerides/phenomenes/rts/rts.php

; Soleil le 01/01/2013
; Lieu : 05°43’37" E / 45°11’16" N
;     Date 	             Lever 	    Passage au méridien 	  Coucher
; Temps Universel 	heure 	azimut 	heure 	hauteur 	   heure 	azimut
; 2013-01-01 	      07:18 	302.90 	11:41 	21.85 	     16:04 	57.14
;     Date 	                 Aube 	                 Crépuscule
;   	               astronom. 	nautique 	civil 	civil 	nautique 	astronom.
; Temps Universel 	 heure 	    heure 	  heure 	heure 	heure 	heure
; 2013-01-01 	       05:29 	    06:05 	  06:42 	16:39 	17:17 	17:52


EnableExplicit

Procedure.d Frac(Xfrac.d)   
  ProcedureReturn Xfrac-Int(Xfrac)    
EndProcedure   
Procedure.d dms(Xdms.d)   
  ;conversion decimales en degres minutes secondes  
  ProcedureReturn Int(Xdms)+Frac(Int(Frac(Xdms)*60)/100)+Frac(Frac(Frac(Xdms)*60)*0.006)   
EndProcedure   
Procedure.d dec(xdec.d)   
  ;conversion degres minutes secondes en decimales  
  ProcedureReturn Int(Xdec)+Int(frac(Xdec)*100)/60+(frac(Xdec)*100-Int(frac(Xdec)*100))*100/3600   
EndProcedure   
Procedure.d jd2(Annee, Mois, jour, Heure, Minute, Seconde); Jour Julien à 0h TU (Temps Universel ) 
  ; --Ne fonctionne pas avant le 15 Octobre 15 1582
  Protected j.d 
  Protected m 
  Protected a 
  Protected jj.d 
  
  a=Annee 
  m=Mois 
  j=jour+(Heure + Minute/60 + Seconde/3600)/24 
  
  jj=367*a -Int(1.75*(Int((m+9)/12)+a)) 
  jj-Int(0.75*(1+Int((Int((m-9)/7)+a)*0.01))) 
  jj+Int((275*m)/9)+j+1721028.5 
  
  ProcedureReturn jj 
EndProcedure 
Procedure.d LeverCoucherSoleil(LongitudeT.d, LatitudeT.d, Jour, Mois, An, Lever=#True, Option.f=-0.61)
  
  ; Option
  ; 	  -18<= Option <-12        : Crépuscule astronomique
  ; 	  -12<= Option <-6         : Crépuscule nautique
  ; 	  -6 <= Option <réfraction : Crépuscule civil
  ; 	  
  ; 	  réfraction = -36.6'= -0.61°           : Ephémérides du Bureau des longitudes
  ; 	             = -34'                     : Ephéméride nautique
  ; 	             = centre du Soleil         : Ephémérides astronomiques
  ; 	             = bord inférieur du Soleil : Ephémérides pour navigateurs
  ; 
  
  ; Lever
  ; Lever=#True  : Calcul du lever du Soleil
  ; Lever=#False : Calcul du coucher du Soleil
  

  
  Protected.d FA, H0, FI, LO, JD, T0, S0, TU, TS, T  
  Protected.d LL, M1, C, TL, EX, AL, X, DE, AH, TM 
  Protected IN0, i 
  
  FA=180/#PI
  H0=0
  
  ; Radian
  FI=dec(LatitudeT)/FA
  LO=dec(LongitudeT)/FA
  
  
  ; Jour julien de la date à 00h:00'00" (ne pas changer l'heure)
  JD=jd2(An,Mois,Jour,0,0,0)
  ;Debug JD
  
  
  ;Temps Sideral à Greenwitch
  T0 = (JD - 2415020.0)/36525
  S0= 6.6460656+2400.051262*T0 + 0.00002591*T0*T0
  S0 = S0 - 24*Int(S0/24)
  TU = 12
  TS = S0 + TU *1.002737908
  ;Debug TS
  
  
  ;Position de la Terre sur son orbite (ou soleil)
  T= T0+TU/24/36525
  LL=279.69668+T*36000.76892+T*T*0.0003025
  LL / FA
  M1 = 358.47583+T*35999.04975-T*T*0.000151-T*T*T*0.0000033
  M1 / FA
  C = (1.91946-0.004789*T-T*T*0.000014)*Sin(M1)+(0.020094-T*0.0001)*Sin(2*M1)+0.000293*Sin(3*M1)
  C / FA
  ;Longitue ecliptique
  TL = LL +C
  ;Coordonnées écliptique
  EX = 23.452294-0.0130125*T-0.00000164*T*T+T*T*T*0.000000503
  EX / FA
  AL = ATan(Cos(EX)*Tan(TL))
  If Cos(TL)<0
    AL + #PI
  EndIf
  X = Sin(EX)*Sin(TL)
  DE= ATan(X/Sqr(-X*X+1))
  ;Angle Horaire
  X=(Sin(H0)-Sin(FI)*Sin(DE))/Cos(FI)/Cos(DE)
  If Abs(X)>1 
    MessageRequester("impossible",StrD(H0*FA))
    End
  EndIf
  AH=-ATan(X/Sqr(-X*X+1))+ #PI/2
    
  TM=TS-(LO+AL)*FA/15
  TM=36-TM
  TM=TM-24*Int(TM/24)
  
  ;Lever
  If Lever=#True
    IN0=-1
  Else
    IN0=1
  EndIf
  
  H0=Option/FA
  
  For i= 1 To 3
    ;Position de la Terre sur son orbite (ou soleil)
    T= T0+TU/24/36525
    LL=279.69668+T*36000.76892+T*T*0.0003025
    LL / FA
    M1 = 358.47583+T*35999.04975-T*T*0.000151-T*T*T*0.0000033
    M1 / FA
    C = (1.91946-0.004789*T-T*T*0.000014)*Sin(M1)+(0.020094-T*0.0001)*Sin(2*M1)+0.000293*Sin(3*M1)
    C / FA
    ;Longitue ecliptique
    TL = LL +C
    ;Coordonnées écliptique
    EX = 23.452294-0.0130125*T-0.00000164*T*T+T*T*T*0.000000503
    EX / FA
    AL = ATan(Cos(ex)*Tan(TL))
    If Cos(TL)<0
      AL + #PI
    EndIf
    X = Sin(EX)*Sin(TL)
    DE= ATan(X/Sqr(-X*X+1))
    ;Angle Horaire
    X=(Sin(H0)-Sin(FI)*Sin(DE))/Cos(FI)/Cos(DE)
    If Abs(X)>1 
      MessageRequester("impossible",StrD(H0*FA))
      End
    EndIf
    AH=-ATan(X/Sqr(-X*X+1))+ #PI/2
     
    TS=(IN0*AH+AL+LO)*FA/15
    While TS<S0
      TS=TS+24
    Wend
    TU=(TS-S0)/1.002737908
    TU=TU-24*Int(TU/24)
  Next i
  ProcedureReturn TU
EndProcedure


;Affichage
Debug "Le 01/01/2013 à Grenoble"
Debug ""
Debug "Lever/Coucher Civil: "
Debug dms(LeverCoucherSoleil(-5.4337,45.1116,1,1,2013))          ;07h17'37" ~ 07h 18'
Debug dms(LeverCoucherSoleil(-5.4337,45.1116,1,1,2013,#False))
Debug ""
Debug "Lever/CoucherNautique: "
Debug dms(LeverCoucherSoleil(-5.4337,45.1116,1,1,2013,#True,-12))
Debug dms(LeverCoucherSoleil(-5.4337,45.1116,1,1,2013,#False,-12))
Debug ""
Debug "Lever/CoucherAstronomique (Nuit noire): "
Debug dms(LeverCoucherSoleil(-5.4337,45.1116,1,1,2013,#True,-18))
Debug dms(LeverCoucherSoleil(-5.4337,45.1116,1,1,2013,#False,-18))



Mesa.
Post Reply