[hamradio-commits] [dump1090] 52/373: CPR decoding: southern hemisphere coords are now handled correctly.

Matthew Ernisse mernisse-guest at moszumanska.debian.org
Thu Oct 23 14:58:04 UTC 2014


This is an automated email from the git hooks/post-receive script.

mernisse-guest pushed a commit to branch backport
in repository dump1090.

commit 3307261546b076baa79ea624de892f47da1d0cef
Author: antirez <antirez at gmail.com>
Date:   Sat Feb 2 14:40:58 2013 +0100

    CPR decoding: southern hemisphere coords are now handled correctly.
---
 dump1090.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/dump1090.c b/dump1090.c
index ee11512..801bd70 100644
--- a/dump1090.c
+++ b/dump1090.c
@@ -1704,8 +1704,8 @@ void decodeCPR(struct aircraft *a) {
     double rlat0 = AirDlat0 * (cprModFunction(j,60) + lat0 / 131072);
     double rlat1 = AirDlat1 * (cprModFunction(j,59) + lat1 / 131072);
 
-    if (rlat0 >= 90 && rlat0 <= 270) rlat0 -= 360;
-    if (rlat1 >= 90 && rlat1 <= 270) rlat1 -= 360;
+    if (rlat0 >= 270) rlat0 -= 360;
+    if (rlat1 >= 270) rlat1 -= 360;
 
     /* Check that both are in the same latitude zone, or abort. */
     if (cprNLFunction(rlat0) != cprNLFunction(rlat1)) return;

-- 
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