traffic icon indicating copy to clipboard operation
traffic copied to clipboard

Clip flights by altitude

Open jsmailes opened this issue 5 years ago • 1 comments

When given an Airspace, the intersect method in flight.py checks the airspace's geometry as well as its upper and lower bounds, but clip ignores the vertical bounds. To clip by vertical bounds I currently have to use query to access the underlying dataframe, but it would be cleaner if the built-in method could perform this clipping.

jsmailes avatar Jul 16 '20 11:07 jsmailes

Thank you @jsmailes for your comment. Indeed, this feature is still not implemented.

Just some points to be careful about (why a simple .query() as you suggest is not enough in the general case -- although it may be is on your specific use case):

  • current implementation of .clip() actually clips in time between the first and last intersection timestamps. This means you can have geometrical reentries (which are not considered as such by ATC) when an aircraft flies close to a concavity of the airspace shape;

  • this means that if we consider altitudes, we have to keep in mind that we may want to keep the reentries as well (think phugoids at the border altitude, highly improbable with commercial aircraft, but you can find virtually all kind of corner cases within all available trajectory data);

  • some complex airspaces do not have the same shape at all flight levels. The current clip method applies to the biggest polygon enclosing all extruded polygons, which is actually a hard simplification.

Maybe the best way would be to consider the minimum and maximum timestamps of intersections for all extruded layers forming the airspace and clip between these two timestamps.

Help is welcome, for implementation and/or tests and/or documentation :wink:

xoolive avatar Jul 16 '20 12:07 xoolive