Limit aircraft-relative CPR to 50km.

This commit is contained in:
Oliver Jowett 2016-08-26 11:30:46 +01:00
parent 568e843b9f
commit 43906f994b

View file

@ -293,6 +293,8 @@ static int doLocalCPR(struct aircraft *a, struct modesMessage *mm, uint64_t now,
if (a->pos_nuc < *nuc) if (a->pos_nuc < *nuc)
*nuc = a->pos_nuc; *nuc = a->pos_nuc;
range_limit = 50e3;
} else if (!surface && (Modes.bUserFlags & MODES_USER_LATLON_VALID)) { } else if (!surface && (Modes.bUserFlags & MODES_USER_LATLON_VALID)) {
reflat = Modes.fUserLat; reflat = Modes.fUserLat;
reflon = Modes.fUserLon; reflon = Modes.fUserLon;