kopia lustrzana https://github.com/cyoung/stratux
pull/610/head
rodzic
83f0c6843f
commit
0d146d1747
|
@ -259,6 +259,10 @@ func registerTrafficUpdate(ti TrafficInfo) {
|
|||
func isTrafficAlertable(ti TrafficInfo) bool {
|
||||
// Set alert bit if possible and traffic is within some threshold
|
||||
// TODO: Could be more intelligent, taking into account headings etc.
|
||||
if !ti.BearingDist_valid {
|
||||
// If not able to calculate the distance to the target, let the alert bit be set always.
|
||||
return true
|
||||
}
|
||||
if ti.BearingDist_valid &&
|
||||
ti.Distance < 3704 { // 3704 meters, 2 nm.
|
||||
return true
|
||||
|
|
Ładowanie…
Reference in New Issue