-
Notifications
You must be signed in to change notification settings - Fork 236
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
False conflict pairs using statebased CD #345
Comments
The example above with AC1 and AC2 was created using the following scenario file: 00:00:00.00>SWRAD SYM |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Using statebased CD, false detections can occur when the following conditions apply to an aircraft pair:
Theoretically, conditions (1) and (2) imply that the aircraft are vertically not in conflict, they just stay outside the vertical boundaries of each other's protected zone. Nevertheless, a conflict is detected for the aircraft flying on the upper boundary, see the screenshot below. As a result, the list of conflict pairs includes a non-unique conflict: only (AC2, AC1), not (AC1, AC2).
Statebased conflict detection computes vertical crossing of the protected zone as follows (line 68-82):
Printing these steps in the terminal reveals what happens. In the screenshot below, parameters corresponding with aircraft pair (AC1, AC2) are highlighted in green, (AC2, AC1) in red.
dalt
is positive for (AC1, AC2) and negative for (AC2, AC1)dvs
) is set to a very small positive value for both aircraft pairs-dvs
essentially means AC1 is slowly descending away from the lower PZ edge of AC2 (diverging). Using the same reasoning, AC2 is slowly descending into the PZ of AC1 (converging), almost instantly crossing the upper edge (tcrosshi = 1.7e-07
)I tried fixing this issue by setting the sign of
dvs
, where changed from zero to 1e-6, equal to the sign ofdalt
. This way, it is ensured that two aircraft with zero difference in vertical speed are always evaluated using diverging flight paths. Implementing this change appears to solve the problem. Line 74 could be changed to the following:dvs = np.where(np.abs(dvs) < 1e-6, (np.sign(dalt)+(dalt==0)) * 1e-6, dvs) # prevent division by zero
np.sign
returns (float) -1 for negative values, (float) 1 for positive values. If the value is zero,np.sign
also returns zero, hence+(dalt==0)
should be added to prevent division by zero.The text was updated successfully, but these errors were encountered: