diff --git a/CHANGELOG.md b/CHANGELOG.md index b527205..857d576 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,10 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html). +## [0.4.3] - 2018-11-11 +### Fixed +- Fixed active runway calculation + ## [0.4.2] - 2018-11-07 ### Fixed - Pressure and temperature readings should now also work when the server does not hit the "Briefing" button diff --git a/datis/Cargo.toml b/datis/Cargo.toml index f6b1c50..4b4e79b 100644 --- a/datis/Cargo.toml +++ b/datis/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "datis" -version = "0.4.2" +version = "0.4.3" authors = ["Markus Ast "] edition = "2018" diff --git a/datis/src/station.rs b/datis/src/station.rs index 1b65091..488d9b0 100644 --- a/datis/src/station.rs +++ b/datis/src/station.rs @@ -46,7 +46,7 @@ impl Station { self.name, information_letter, BREAK ); - if let Some(rwy) = self.get_active_runway(weather.wind_dir) { + if let Some(rwy) = self.get_active_runway(weather.wind_dir.to_degrees()) { let rwy = pronounce_number(rwy); report += &format!("Runway in use is {}. {}", rwy, BREAK); } else { diff --git a/datis/src/weather.rs b/datis/src/weather.rs index 9e2a5c8..e0f1c19 100644 --- a/datis/src/weather.rs +++ b/datis/src/weather.rs @@ -133,7 +133,7 @@ impl DynamicWeather { Ok(WeatherInfo { wind_speed, - wind_dir, + wind_dir: wind_dir.abs(), temperature, pressure, }) @@ -173,10 +173,6 @@ mod test { visibility: u32, ) -> String { StaticWeather { - wind: Wind { - dir: 0.0, - speed: 0.0, - }, clouds: Clouds { base, density,