Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bugfix/1395 - Fix aircraft's wind correction angle math #1413

Merged
merged 8 commits into from
Aug 16, 2019
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

### Bugfixes
- [#1418](https://github.com/openscope/openscope/issues/1418) - Fix error from EDDF spawn pattern
- [#1395](https://github.com/openscope/openscope/issues/1395) - Fix aircraft's wind correction angle math (which was causing go-arounds)


### Enhancements & Refactors
Expand Down
4 changes: 2 additions & 2 deletions src/assets/scripts/client/aircraft/AircraftCommander.js
Original file line number Diff line number Diff line change
Expand Up @@ -383,7 +383,7 @@ export default class AircraftCommander {
* @param aircraft {AircraftModel}
*/
runFlyPresentHeading(aircraft) {
return aircraft.pilot.maintainPresentHeading(aircraft.heading);
return aircraft.pilot.maintainPresentHeading(aircraft);
}

/**
Expand Down Expand Up @@ -635,7 +635,7 @@ export default class AircraftCommander {
const spotInQueue = runway.getAircraftQueuePosition(aircraft.id);
const isInQueue = spotInQueue > -1;
const aircraftAhead = this._aircraftController.findAircraftById(runway.queue[spotInQueue - 1]);
const wind = airport.getWind();
const wind = airport.getWindAtAltitude();
const roundedWindAngleInDegrees = round(radiansToDegrees(wind.angle) / 10) * 10;
const roundedWindSpeed = round(wind.speed);
const readback = {};
Expand Down
Loading