zlsa / atc

https://openscope.co/
342 stars 107 forks source link

Racetrack Hold Pattern Instead of Circling #373

Closed siyuanr closed 8 years ago

siyuanr commented 8 years ago

Planes in real life holds in racetrack patters, not circles. Therefore it would be really nice to rewrite the hold command to enable this pattern. A simple implementation could be:

  1. Player inputs hold x (x is either left or right);
  2. Plane immediately turns x towards (360 minus the plane's current heading);
  3. After the reciprocal heading is established, count one minute (or 10 nautical miles, which is a real life measure);
  4. Plane turns x towards the original heading;
  5. Count one minute or 10 NM.
Maverick283 commented 8 years ago

I do like the idea of a more realistic hold.

If it is decided to implement a more realistic behaviour, I'd like to add the following comments though:

The "plane turns x towards (360 minus heading) is wrong: If the plane is flying e.g. 010°, it would turn two 350°, which I doubt is the desired behavior. I think we should go for (current heading + 180°).

If neither right or left are specified, the plane should do right hand holds, as those are called "standard holds", while left hand holds are called "non-standard".

One last point: The turn rate of a plane... I am not sure how this is handled here, but in IFR flying you use a turn rate of 2min/360°, which means 3°/second, no matter what your speed is. This is especially essential in holds, as it gives you a 1 minute turn for each 180°. Thus each hold takes 4 minutes with wind being 0 knots

siyuanr commented 8 years ago

Thank you! You raised some really good points. I had thought that the truly realistic holding pattern was too complicated to implement, therefore I put forward a simpler version. In hindsight my proposal doesn't really bring that much progress towards realism.

To your comments, I really like the idea of holding only at specified fixes. I would only add that we also have to draw the rough holding patterns on the map to accommodate those who didn't look up the arrival charts.

erikquinn commented 8 years ago

I concur with the above, though I am fairly certain GPS and RNAV equipped aircraft can be told to hold at their present position, and not relative to a fix. Thus, it probably makes sense to continue allowing holds at present position, though that is just about never going to be done in real atc... just as you are all saying, it would be done at a fix, and probably a fix that has a published hold associated with it.

It would probably be nice to be able to control it like this:

PS @Maverick283 that is how it's in there-- as 3 degrees per second (at least that's what I read somewhere, and the per-plane properties are definitely gone now). Used to be a different turn rate for each aircraft, based on aircraft.rate.turn, but that has been replaced and removed, as all aircraft now use standard rate turns.

sixeyeco commented 8 years ago

Would we still be able to combine commands? My hope is to be able to get them to spin and descend. Something like h wammy d 50 to get them to descend to 5k during their 360 spin. It sure would be nice not to have to merge them with traffic that is entering the hold pattern.

hold-descend

siyuanr commented 8 years ago

As was investigated in reports here and here, FAA allows to time either the inbound or the outbound track, while ICAO only times the outbound track. In our case it would be easier to time the outbound track: we only need to have a timer for the outbound track for 1 minute; in contrast, to time the inbound track would mean to have a stopwatch to measure the first journey on inbound track, set the timer of the outbound track to compensate for the inbound track, and have stopwatch for the inbound track again, in case of variable wind. Under the same wind conditions, inbound or outbound timing should produce the same overall time.

The tricky part of implementing the racetrack course is to adjust for the wind. Without correction, any wind whose direction is not parallel to the inbound heading is going to give the inbound and outbound curves different lengths (because of the different speeds), and could be dangerous in real life. For example, a short outbound turn and a long inbound turn would make the aircraft drift into the non-holding side, where there could be traffic.

Therefore we need to calculate the Wind Correction Angle (WCA), whose formula can be seen here. (If I read #289 and #296 correctly, we already have something similar to WCA since the heading mode does compensate for wind.) Rather than flying the outbound heading, we will just fly outbound heading + 3*WCA, as stipulated in many manuals such as here.

Under variable wind conditions, if the wind changes when the plane flies the outbound track, we may need to adjust the WCA and the corrected outbound heading too, but I guess this discussion would better fall under #68. We can, for example, create a new outbound turn heading mode in addition to normal heading and fix modes, which overcompensates 3*WCA in vector form. This way we can adjust the real outbound heading "on-the-fly".

After the inbound heading is established again, we should be flying in close parallel to, if not on the required inbound track. We could now fly in fix mode to the holding fix, and start a new outbound turn afterwards. (We can also fly to the holding fix in fix mode right after the outbound track; this would give us a smoother transition if the fix mode also has the standard rate of turn. But since the fix mode is not positionally impacted by the wind, the actual inbound track flown may deviate a little too much from what's printed on the chart.)

Another implication of the wind, WCA, etc., is that the hold would require a constant nominal speed. Changing the speed during the hold practically defeats the wind correction unless we develop a separate, auto-over-compensating "outbound turn heading" mode. I would suggest that the hold mode automatically locks down the speed, and prompt user error when the speed command is invoked. The ICAO specification is 210 KIAS for below 6,000ft, 220 KIAS between 6,000~14,000ft. The FAA specification is 200 KIAS for below 6,000ft, and 230KIAS between 6,000~14,000ft. (See here.)

The entry methods are relatively simple, can the algorithm can be derived from the graphs in here.

Maverick283 commented 8 years ago

Rather then timing how long the aircraft is flying a certain heading, I'd suggest to precalculate the distance it has to fly depending on the wind. That way, we can fulfill both, ICAO and FAA standards, as it is pretty easy to calculate the distance the aircraft has to fly if it is flying one minute with a certain heading and a certain speed. That would come down to the WCA formula you mentioned up there.

I love the idea of having the plane fly on a radial! And I think we should just ignore stuff like "Hold south of the XYZ VOR, 180 Radial, 10 mile fix, expect further clearance blabla"... This would get too complicated and wouldn't benefit the user experience.

As for the modes... I'm running into some difficulties here: If the heading mode really compensated for the wind then I can only say this is simply wrong. When an aircraft is told to "fly heading 180", it is pointing its nose to 180 noooo matter what the wind is. That is one of the main reasons why airliners fly by fixes, rather then headings. It is more accurate. So the heading mode should not have a wind compensation, or rather have the wind push the aircraft off its heading so that the track is different then its heading. With that being said, maybe there is the need of a track mode. This would compensate for the wind, so an aircraft can actually fly a certain track.

I am not sure if it is necessary to change the track "on-the-fly"... I know a A380 would do so, but the changes should be so little (as the wind should not change from 270/30 to 090/50 all of the sudden) that one calculation each round or leg should be sufficient.

The new mode that I think would be very beneficial is a "track fix on xxx radial" mode. This would give a aircraft the ability (which is needed for a hold on a radial) to fly towards a fix on a certain track. It would work somewhat similar to the ILS... (If the ILS is written so abstract that it can be used as a mode to fly to a fix on a radial as well, then I'm sorry for bringing this up ;) )

As for the speed I completely agree with @siyuanr. Hold should be made with constant speed, which is different for each altitude. But what happens if a plane descents through 14.000ft. during a hold (Good point, @sixeyeco)? Should the speed change? When should it change? If it changes at or before passing 14.000ft then the hold would need to be recalculated half way through, which I think is not necessary. Changing the speed after passing 14.000ft. AND on starting a new round would be sufficient and saves resources.

For the non-pilots amogst us: There are some rules on how to enter a hold. It is important that the non holding side is kept clear at all times (in a standard hold the left side, non-standard -> vice versa). So three methods have been established for entering a hold, which are described in the document mentioned above, but here is a picture for better understanding:

siyuanr commented 8 years ago

Totally agree with @Maverick283 in terms of the track navmode and ILS-like tracking. The ILS algorithm in aircraft.js is not packaged (abstracted), but rather as functions immediately after if navmode == "rwy". I believe that since hold is already a navmode, and other procedures (such as SID) will invoke tracking, we should realize the tracking at a lower-level, not as a navmode.

That said, from the eyes of a pseudo-programmer (me), we could copy the ILS mechanism and strip away the 30-degree angle restriction, strip away the glide scope altitudes, and the speed to make the tracking function.

In real life, ILS can be and was used to guide precision tracking, such as in VHHX, where planes had to be guided along a precise path to a precise point with exact altitude, before breaking out of ILS, turning out, and doing a visual approach:

screen shot 2016-01-31 at 21 41 12

I also found some useful graphs that serve as the basis of the entry pattern algorithms, referenced from here:

screen shot 2016-01-31 at 22 40 37 screen shot 2016-01-31 at 22 40 45 screen shot 2016-01-31 at 22 40 53
tedrek commented 8 years ago

Regarding standard rate turns, aircraft currently do standard rate turns of 3°/second if their airspeed permits. At higher speeds a the required bank angles become excessive and the turns become whatever 25° of bank will give.

Heading mode navigation does not compensate for wind, but fix mode navigation does.

Extracting the radial tracking code from the current ILS portions shouldn't be too hard.

Holds are specified as a location and an inbound track to that location. If a hold is implemented as [Outbound Turn, Outbound Leg, Track Inbound Radial, Overfly location, Repeat] then everything can be calculated once when overflying the location and it will mostly just work. A speed variation will cause some positional errors on the circuit which it first happens as would changing wind, but tracking the inbound radial and overflying the same location every time means the hold overall won't drift and the shape should stay normal enough.