Explanation of eveningNight and morningNight

Good morning all,

i’m just working on some flags which should give me the option to reacht on various “time”. example: Night ist between atroDawn und astroDust of the Astro binding. So far so easy, but in the astro binding i found two type where i am not able to translate them to german or understand them in english, because i find no explanation. Maybe someone could help me out.

morgingNight and eveningNight

Thomas

Interesting question. Generally speaking, these should reflect the difference between different definitions of day and night as per here:

But when I look at the code I see an asymmetry which bothers me:

public String toString() {
      
      
        
        		return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("sunrise", getRise())
      
      
        
        				.append("noon", getNoon()).append("sunset", getSet()).append("night", night)
      
      
        
        				.append("morningNight", morningNight).append("astroDawn", astroDawn).append("nauticDawn", nauticDawn)
      
      
        
        				.append("civilDawn", civilDawn).append("civilDusk", civilDusk).append("nauticDusk", nauticDusk)
      
      
        
        				.append("astroDusk", astroDusk).append("daylight", getDaylight())
      
      
        
        				.append("eveningNight", getEveningNight()).append("eclipse", eclipse).toString();
      
      
        
        	}

Maybe just me, but there’s an asymmetry between the treatment of morningNight and eveningNight that just seems WRONG.

Bob

Now i created a table for my place with all possible values an found some funny/strange things. Firt here is the table:

MorningNight_Start	00:00
MorningNight_Stop	04:00
Night_Stop              05:02
AstroDawn_Start 	05:00
AstroDawn_Stop  	05:45
NauticDawn_Start	05:45
NauticDawn_Stop 	06:27
CivilDawn_Start 	06:27
CivilDawn_Stop	        07:02
Sunrise_Start	        07:02
Sunrise_Stop	        07:06
Daylight_Start	        07:06
Noon_Start	        13:17
Noon_Stop	        13:18
Daylight_Stop    	19:27
Sunset_Start	        19:27
Sunset_Stop      	19:31
CivilDusk_Start	        19:31
CivilDusk_Stop	        20:06
NauticDusk_Start	20:06
NauticDusk_Stop	        20:48
AstroDusk_Start	        20:48
AstroDusk_Stop	        21:33
Night_Start	        21:33
EveningNight_Start	21:33
EveningNight_Stop	00:00

Firt thing i reconized is that sunrise and sunset have a duaration of 4 minutes. Next is that the night stops two minutes after AstroDown and that there is a difference of about one hourbetween Moning Night Stop and Astro Dawn Start /Night Stop.

Could someone give a statement on this? Bob remarked the asymmetry as well.

Thomas

1 Like

This is from that bastion of accuracy, Wikipedia!

As sunrise and sunset are calculated from the leading and trailing edges of the Sun, respectively, and not the center, the duration of a day time is slightly longer than night time (by about 10 minutes, as seen from temperate latitudes). Further, because the light from the Sun is refracted as it passes through the Earth’s atmosphere, the Sun is still visible after it is geometrically below the horizon.

So I guess the four minutes for the sunset and sunrise events might match the transit of the sun disk across the horizon line?

Thanks for that explanation. After reading it is very clear to me. Now only the other questions are open.

Thomas

Noon looks pretty wrong too!