From 2636353e4ad25106a6c913566297bc90900feaaa Mon Sep 17 00:00:00 2001 From: Oliver Jowett Date: Fri, 2 Sep 2016 18:41:59 +0100 Subject: [PATCH] Fix aircraft-relative position validity check. --- track.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/track.c b/track.c index 02fd026..7fc8734 100644 --- a/track.c +++ b/track.c @@ -266,7 +266,7 @@ static int doGlobalCPR(struct aircraft *a, struct modesMessage *mm, uint64_t now // find reference location double reflat, reflon; - if (trackDataValidEx(&a->position_valid, now, 50000, SOURCE_INVALID) <= 50000) { // Ok to try aircraft relative first + if (trackDataValidEx(&a->position_valid, now, 50000, SOURCE_INVALID)) { // Ok to try aircraft relative first reflat = a->lat; reflon = a->lon; if (a->pos_nuc < *nuc)