diff options
| author | Amir Saeid <amir@glgdgt.com> | 2020-03-28 21:01:43 +0000 |
|---|---|---|
| committer | Amir Saeid <amir@glgdgt.com> | 2020-03-28 21:01:43 +0000 |
| commit | a29914be1c52ecd1cc59970aa31803dc1b401109 (patch) | |
| tree | d3d96e8ea28b169b70d415a4cae1e3dc1957488c /src/lib.rs | |
| parent | 6f5b53385935fb09e900cfe7c7ad24666c8fff76 (diff) | |
Add proper logging
Diffstat (limited to 'src/lib.rs')
| -rw-r--r-- | src/lib.rs | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -1,3 +1,6 @@ +#[macro_use] +extern crate log; + extern crate spa; use chrono::prelude::*; @@ -67,6 +70,7 @@ pub fn get_temp(utc: DateTime<Utc>, ss: &SunriseAndSet, lat: f64, lon: f64) -> f match *ss { SunriseAndSet::Daylight(_, _) => { let elevation = 90f64 - calc_solar_position(utc, lat, lon).unwrap().zenith_angle; + debug!("elevation: {}", elevation); let progress = get_transition_progress_from_elevation(elevation); LOW_TEMP + (progress * (HIGH_TEMP - LOW_TEMP)) } |
