Skip to content

Commit

Permalink
fix active runway calculation
Browse files Browse the repository at this point in the history
  • Loading branch information
rkusa committed Nov 11, 2018
1 parent 867a959 commit 6698ce9
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion datis/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "datis"
version = "0.4.2"
version = "0.4.3"
authors = ["Markus Ast <m@rkusa.st>"]
edition = "2018"

Expand Down
2 changes: 1 addition & 1 deletion datis/src/station.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
6 changes: 1 addition & 5 deletions datis/src/weather.rs
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ impl DynamicWeather {

Ok(WeatherInfo {
wind_speed,
wind_dir,
wind_dir: wind_dir.abs(),
temperature,
pressure,
})
Expand Down Expand Up @@ -173,10 +173,6 @@ mod test {
visibility: u32,
) -> String {
StaticWeather {
wind: Wind {
dir: 0.0,
speed: 0.0,
},
clouds: Clouds {
base,
density,
Expand Down

0 comments on commit 6698ce9

Please sign in to comment.