heliwatch: don't track aircrafts without altitude
This commit is contained in:
parent
71b534fe6e
commit
c9e3581fe2
|
@ -133,6 +133,10 @@ pub fn run(host: &'static str, port: u16, locations: Locations) -> Receiver<Even
|
|||
let hex = format!("{}", icao_address);
|
||||
let entry = entry.read().unwrap();
|
||||
|
||||
if entry.altitude.is_none() {
|
||||
continue;
|
||||
}
|
||||
|
||||
if entry.altitude.map(|altitude| altitude > MAX_ALTITUDE).unwrap_or(false) ||
|
||||
entry.emitter_category.as_ref().map(|category| IGNORED_CATEGORIES.contains(category)).unwrap_or(false)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue