[hamradio-commits] [dump1090] 358/389: Merge pull request #42 from mutability/prefer-global-cpr
Matthew Ernisse
mernisse-guest at moszumanska.debian.org
Wed Nov 5 00:20:14 UTC 2014
This is an automated email from the git hooks/post-receive script.
mernisse-guest pushed a commit to branch master
in repository dump1090.
commit 16a900c6678d11756e5957ed438a86fc27001ea5
Merge: bc496fb 661246d
Author: MalcolmRobb <Support at ATTAvionics.com>
Date: Thu Oct 2 21:05:26 2014 +0100
Merge pull request #42 from mutability/prefer-global-cpr
Prefer to use global CPR decoding where possible.
dump1090.h | 2 +-
interactive.c | 31 ++++++++++++++++---------------
mode_s.c | 13 +++++++------
3 files changed, 24 insertions(+), 22 deletions(-)
diff --cc mode_s.c
index 3dc2806,cccf89b..4d470bd
--- a/mode_s.c
+++ b/mode_s.c
@@@ -2053,11 -2051,9 +2051,12 @@@ int decodeCPR(struct aircraft *a, int f
if (rlat1 >= 270) rlat1 -= 360;
}
+ // Check to see that the latitude is in range: -90 .. +90
+ if (rlat0 < -90 || rlat0 > 90 || rlat1 < -90 || rlat1 > 90) return;
+
// Check that both are in the same latitude zone, or abort.
- if (cprNLFunction(rlat0) != cprNLFunction(rlat1)) return;
+ if (cprNLFunction(rlat0) != cprNLFunction(rlat1))
+ return (-1);
// Compute ni and the Longitude Index "m"
if (fflag) { // Use odd packet.
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-hamradio/dump1090.git
More information about the pkg-hamradio-commits
mailing list