/// Gets the sunset time (equation 1.6.10)
/// n should be in solar time, but since it does not change
/// much on a daily basis, we treat it as an Float
Gets the sunset time (equation 1.6.10)
n should be in solar time, but since it does not change
much on a daily basis, we treat it as an Float
Gets the sunset time ( equation 1 . 6 . 10 ) n should be in solar time but since it does not change much on a daily basis we treat it as an Float
pub fn sunrise_sunset(&self, n: Float) -> (Time, Time) {
        let delta = self.declination(n);
        let cos_w = -self.latitude.tan() * delta.tan();
        let w = (cos_w.acos()).to_degrees();
        let half_n = w / 15.;
        // return
        let midday = n.floor() + 0.5;
        (
            Time::Solar(midday - half_n / 24.),
            Time::Solar(midday + half_n / 24.),
        )
    }
pub fn sunrise_sunset ( & self , n : Float ) -> ( Time , Time ) { let delta = self . declination ( n ) ; let cos_w = - self . latitude . tan ( ) * delta . tan ( ) ; let w = ( cos_w . acos ( ) ) . to_degrees ( ) ; let half_n = w / 15. ; // return let midday = n . floor ( ) + 0.5 ; ( Time :: Solar ( midday - half_n / 24. ) , Time :: Solar ( midday + half_n / 24. ) , ) }
Gets the sunset time (equation 1.6.10)
n should be in solar time, but since it does not change
much on a daily basis, we treat it as an Float
Gets the sunset time ( equation 1 . 6 . 10 ) n should be in solar time but since it does not change much on a daily basis we treat it as an Float
&self
n
Float