Skip to content

Commit

Permalink
fix wind speed unit
Browse files Browse the repository at this point in the history
  • Loading branch information
rkusa committed Jan 10, 2019
1 parent 509a5e9 commit 567a809
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.

### Fixed
- Fix parsing of airfield names that contain a space in their name
- Fix wind speed unit

## [0.6.0] - 2018-12-04
### Changed
Expand Down
2 changes: 1 addition & 1 deletion datis/src/station.rs
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ impl Station {
report += &format!(
"Wind {} at {} knots. {}",
pronounce_number(wind_dir),
pronounce_number((weather.wind_speed * 1.94384).round()), // to knots
pronounce_number(weather.wind_speed.round()),
BREAK,
);

Expand Down
2 changes: 1 addition & 1 deletion datis/src/weather.rs
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ impl DynamicWeather {

let mut weather: LuaTable<_> = get_weather.call_with_args((x, y, alt))?;
let wind_speed: f64 = get!(weather, "windSpeed")?;
let mut wind_dir: f64 = get!(weather, "windDir")?;
let mut wind_dir: f64 = get!(weather, "windDir")?; // in knots
let temperature: f64 = get!(weather, "temp")?;
let pressure_qfe: f64 = get!(weather, "pressure")?;

Expand Down

0 comments on commit 567a809

Please sign in to comment.