Fix aircraft-relative position validity check.

This commit is contained in:
Oliver Jowett 2016-09-02 18:41:59 +01:00
parent f9419f13d5
commit 2636353e4a

View file

@ -266,7 +266,7 @@ static int doGlobalCPR(struct aircraft *a, struct modesMessage *mm, uint64_t now
// find reference location // find reference location
double reflat, reflon; 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; reflat = a->lat;
reflon = a->lon; reflon = a->lon;
if (a->pos_nuc < *nuc) if (a->pos_nuc < *nuc)