Merge branch 'master' of https://www.github.com/MalcolmRobb/dump1090 into socket_hang
This commit is contained in:
commit
8b4d5b3dca
10
dump1090.c
10
dump1090.c
|
@ -581,7 +581,7 @@ int main(int argc, char **argv) {
|
||||||
if (!strcmp(argv[j],"--device-index") && more) {
|
if (!strcmp(argv[j],"--device-index") && more) {
|
||||||
Modes.dev_index = verbose_device_search(argv[++j]);
|
Modes.dev_index = verbose_device_search(argv[++j]);
|
||||||
} else if (!strcmp(argv[j],"--gain") && more) {
|
} else if (!strcmp(argv[j],"--gain") && more) {
|
||||||
Modes.gain = (int) atof(argv[++j])*10; // Gain is in tens of DBs
|
Modes.gain = (int) (atof(argv[++j])*10); // Gain is in tens of DBs
|
||||||
} else if (!strcmp(argv[j],"--enable-agc")) {
|
} else if (!strcmp(argv[j],"--enable-agc")) {
|
||||||
Modes.enable_agc++;
|
Modes.enable_agc++;
|
||||||
} else if (!strcmp(argv[j],"--freq") && more) {
|
} else if (!strcmp(argv[j],"--freq") && more) {
|
||||||
|
@ -710,7 +710,13 @@ int main(int argc, char **argv) {
|
||||||
} else {
|
} else {
|
||||||
if (Modes.filename[0] == '-' && Modes.filename[1] == '\0') {
|
if (Modes.filename[0] == '-' && Modes.filename[1] == '\0') {
|
||||||
Modes.fd = STDIN_FILENO;
|
Modes.fd = STDIN_FILENO;
|
||||||
} else if ((Modes.fd = open(Modes.filename,O_RDONLY)) == -1) {
|
} else if ((Modes.fd = open(Modes.filename,
|
||||||
|
#ifdef _WIN32
|
||||||
|
(O_RDONLY | O_BINARY)
|
||||||
|
#else
|
||||||
|
(O_RDONLY)
|
||||||
|
#endif
|
||||||
|
)) == -1) {
|
||||||
perror("Opening data file");
|
perror("Opening data file");
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
|
|
9
mode_s.c
9
mode_s.c
|
@ -2053,6 +2053,9 @@ void decodeCPR(struct aircraft *a, int fflag, int surface) {
|
||||||
if (rlat1 >= 270) rlat1 -= 360;
|
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.
|
// Check that both are in the same latitude zone, or abort.
|
||||||
if (cprNLFunction(rlat0) != cprNLFunction(rlat1)) return;
|
if (cprNLFunction(rlat0) != cprNLFunction(rlat1)) return;
|
||||||
|
|
||||||
|
@ -2129,6 +2132,12 @@ int decodeCPRrelative(struct aircraft *a, int fflag, int surface) {
|
||||||
rlat = AirDlat * (j + lat/131072);
|
rlat = AirDlat * (j + lat/131072);
|
||||||
if (rlat >= 270) rlat -= 360;
|
if (rlat >= 270) rlat -= 360;
|
||||||
|
|
||||||
|
// Check to see that the latitude is in range: -90 .. +90
|
||||||
|
if (rlat < -90 || rlat > 90) {
|
||||||
|
a->bFlags &= ~MODES_ACFLAGS_LATLON_REL_OK; // This will cause a quick exit next time if no global has been done
|
||||||
|
return (-1); // Time to give up - Latitude error
|
||||||
|
}
|
||||||
|
|
||||||
// Check to see that answer is reasonable - ie no more than 1/2 cell away
|
// Check to see that answer is reasonable - ie no more than 1/2 cell away
|
||||||
if (fabs(rlat - a->lat) > (AirDlat/2)) {
|
if (fabs(rlat - a->lat) > (AirDlat/2)) {
|
||||||
a->bFlags &= ~MODES_ACFLAGS_LATLON_REL_OK; // This will cause a quick exit next time if no global has been done
|
a->bFlags &= ~MODES_ACFLAGS_LATLON_REL_OK; // This will cause a quick exit next time if no global has been done
|
||||||
|
|
4
net_io.c
4
net_io.c
|
@ -347,8 +347,8 @@ void modesSendSBSOutput(struct modesMessage *mm) {
|
||||||
// Fields 1 to 6 : SBS message type and ICAO address of the aircraft and some other stuff
|
// Fields 1 to 6 : SBS message type and ICAO address of the aircraft and some other stuff
|
||||||
p += sprintf(p, "MSG,%d,111,11111,%06X,111111,", msgType, mm->addr);
|
p += sprintf(p, "MSG,%d,111,11111,%06X,111111,", msgType, mm->addr);
|
||||||
|
|
||||||
// Fields 7 & 8 are the current time and date
|
// Fields 7 & 8 are the message reception time and date
|
||||||
if (mm->timestampMsg) { // Make sure the records' timestamp is valid before outputing it
|
if (mm->timestampMsg && !mm->remote) { // Make sure the records' timestamp is valid before outputing it
|
||||||
epocTime = Modes.stSystemTimeBlk; // This is the time of the start of the Block we're processing
|
epocTime = Modes.stSystemTimeBlk; // This is the time of the start of the Block we're processing
|
||||||
offset = (int) (mm->timestampMsg - Modes.timestampBlk); // This is the time (in 12Mhz ticks) into the Block
|
offset = (int) (mm->timestampMsg - Modes.timestampBlk); // This is the time (in 12Mhz ticks) into the Block
|
||||||
offset = offset / 12000; // convert to milliseconds
|
offset = offset / 12000; // convert to milliseconds
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
<link rel="stylesheet" type="text/css" href="style.css" />
|
<link rel="stylesheet" type="text/css" href="style.css" />
|
||||||
<link rel="stylesheet" href="http://code.jquery.com/ui/1.10.3/themes/smoothness/jquery-ui.css" />
|
<link rel="stylesheet" href="http://code.jquery.com/ui/1.10.3/themes/smoothness/jquery-ui.css" />
|
||||||
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script>
|
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script>
|
||||||
<script src="http://code.jquery.com/ui/1.10.3/jquery-ui.js"></script>
|
<script src="//ajax.googleapis.com/ajax/libs/jqueryui/1.10.3/jquery-ui.min.js"></script>
|
||||||
<script type="text/javascript" src="https://maps.googleapis.com/maps/api/js?sensor=false&libraries=geometry"></script>
|
<script type="text/javascript" src="https://maps.googleapis.com/maps/api/js?sensor=false&libraries=geometry"></script>
|
||||||
<script type="text/javascript" src="config.js"></script>
|
<script type="text/javascript" src="config.js"></script>
|
||||||
<script type="text/javascript" src="planeObject.js"></script>
|
<script type="text/javascript" src="planeObject.js"></script>
|
||||||
|
|
|
@ -135,8 +135,12 @@ function initialize() {
|
||||||
center: new google.maps.LatLng(CenterLat, CenterLon),
|
center: new google.maps.LatLng(CenterLat, CenterLon),
|
||||||
zoom: ZoomLvl,
|
zoom: ZoomLvl,
|
||||||
mapTypeId: google.maps.MapTypeId.ROADMAP,
|
mapTypeId: google.maps.MapTypeId.ROADMAP,
|
||||||
|
mapTypeControl: true,
|
||||||
|
streetViewControl: false,
|
||||||
mapTypeControlOptions: {
|
mapTypeControlOptions: {
|
||||||
mapTypeIds: mapTypeIds
|
mapTypeIds: mapTypeIds,
|
||||||
|
position: google.maps.ControlPosition.TOP_LEFT,
|
||||||
|
style: google.maps.MapTypeControlStyle.DROPDOWN_MENU
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -304,7 +308,7 @@ function refreshSelected() {
|
||||||
|
|
||||||
html += '<tr><td>Track: '
|
html += '<tr><td>Track: '
|
||||||
if (selected && selected.vTrack) {
|
if (selected && selected.vTrack) {
|
||||||
html += selected.track + ' (' + normalizeTrack(selected.track, selected.vTrack)[1] +')';
|
html += selected.track + '°' + ' (' + normalizeTrack(selected.track, selected.vTrack)[1] +')';
|
||||||
} else {
|
} else {
|
||||||
html += 'n/a';
|
html += 'n/a';
|
||||||
}
|
}
|
||||||
|
|
|
@ -14,10 +14,9 @@ div#SpecialSquawkWarning { position: absolute; bottom: 25px; right: 430px; borde
|
||||||
table#optionsTabs { width: 100%; font-size: small; font-family: monospace; background-color: #ddd;
|
table#optionsTabs { width: 100%; font-size: small; font-family: monospace; background-color: #ddd;
|
||||||
border: 1px; border-color: #000000;}
|
border: 1px; border-color: #000000;}
|
||||||
|
|
||||||
#tableinfo { font-size: x-small; font-family: monospace; }
|
#tableinfo, #sudo_buttons { font-size: x-small; font-family: monospace; }
|
||||||
#sudo_buttons { font-size: x-small; font-family: monospace; }
|
|
||||||
|
|
||||||
.vPosition { font-weight: bold; background-color: #f5fff5; }
|
.vPosition { font-weight: bold; background-color: #d5ffd5; }
|
||||||
.squawk7500 { font-weight: bold; background-color: #ff5555; }
|
.squawk7500 { font-weight: bold; background-color: #ff5555; }
|
||||||
.squawk7600 { font-weight: bold; background-color: #00ffff; }
|
.squawk7600 { font-weight: bold; background-color: #00ffff; }
|
||||||
.squawk7700 { font-weight: bold; background-color: #ffff00; }
|
.squawk7700 { font-weight: bold; background-color: #ffff00; }
|
||||||
|
|
Loading…
Reference in a new issue