From bbcf68cf117c23af6e6e115afd356d216a57dce9 Mon Sep 17 00:00:00 2001 From: Malcolm Robb Date: Wed, 17 Apr 2013 20:09:49 +0100 Subject: [PATCH] Nunojpg Southern Hemisphere bug fix + 1 1) Incorporate nunojpg southern hemisphere bug fix 2) Initialise Modes.stat_DF_Corrected variable --- dump1090.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/dump1090.c b/dump1090.c index 05100a7..d8eb833 100644 --- a/dump1090.c +++ b/dump1090.c @@ -56,7 +56,7 @@ // MinorVer changes when additional features are added, but not for bug fixes (range 00-99) // DayDate & Year changes for all changes, including for bug fixes. It represent the release date of the update // -#define MODES_DUMP1090_VERSION "1.01.1504.13" +#define MODES_DUMP1090_VERSION "1.01.1704.13" #define MODES_DEFAULT_RATE 2000000 #define MODES_DEFAULT_FREQ 1090000000 @@ -442,6 +442,7 @@ void modesInit(void) { Modes.stat_http_requests = 0; Modes.stat_sbs_connections = 0; Modes.stat_out_of_phase = 0; + Modes.stat_DF_Corrected = 0; Modes.exit = 0; } @@ -1776,6 +1777,7 @@ int cprModFunction(int a, int b) { /* The NL function uses the precomputed table from 1090-WP-9-14 */ int cprNLFunction(double lat) { + if (lat < 0) lat = -lat; /* Table is simmetric about the equator. */ if (lat < 10.47047130) return 59; if (lat < 14.82817437) return 58; if (lat < 18.18626357) return 57;