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/ATC-237 #238

Merged
merged 2 commits into from
Dec 30, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,10 @@


### Bugfixes
- Resets current indicies when issuing a new star to an arriving aircraft [#104](https://github.com/n8rzz/atc/issues/104) & [#237](https://github.com/n8rzz/atc/issues/237)
- Originally reported under [zlsa#730](https://github.com/zlsa/atc/issues/730) & [zlsa#768](https://github.com/zlsa/atc/issues/768)





Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2167,7 +2167,7 @@ export default class Aircraft {
this.target.altitude = this.fms.altitudeForCurrentWaypoint();
this.target.expedite = this.fms.currentWaypoint.expedite;
this.target.altitude = Math.max(1000, this.target.altitude);
this.target.speed = this.fms.currentWaypoint.speed;
this.target.speed = _get(this, 'fms.currentWaypoint.speed', this.speed);
this.target.speed = clamp(this.model.speed.min, this.target.speed, this.model.speed.max);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -547,8 +547,13 @@ export default class AircraftFlightManagementSystem {
}
}

// this may not be the correct spot for this
this.current = [0, 0];
// Add the new STAR Leg
this.appendLeg({ type: FP_LEG_TYPE.STAR, route: route });
this.appendLeg({
route,
type: FP_LEG_TYPE.STAR
});
}

// TODO: move this logic to the `RouteModel`
Expand Down Expand Up @@ -597,7 +602,7 @@ export default class AircraftFlightManagementSystem {
// TODO: this should be abstracted to another class method.
const pieces = data[i].split('.');
// FIXME: what does 'a' mean? better naming
a = [pieces[0] + '.' + pieces[1] + '.' + pieces[2]];
a = [`${pieces[0]}.${pieces[1]}.${pieces[2]}`];

// chop up the multilink
for (let j = 3; j < data[i].split('.').length; j + 2) {
Expand Down