Merge branch 'upstream'

This commit is contained in:
Oliver Jowett 2016-04-11 12:11:05 +01:00
commit 50d67ff722
10 changed files with 192 additions and 167 deletions

View file

@ -31,10 +31,15 @@ LIBS+=-lrt
endif endif
ifeq ($(UNAME), Darwin) ifeq ($(UNAME), Darwin)
# TODO: Putting GCC in C11 mode breaks things. # TODO: Putting GCC in C11 mode breaks things.
CFLAGS+=-std=c11 CFLAGS+=-std=c11 -DMISSING_GETTIME -DMISSING_NANOSLEEP
COMPAT+=compat/clock_gettime/clock_gettime.o compat/clock_nanosleep/clock_nanosleep.o COMPAT+=compat/clock_gettime/clock_gettime.o compat/clock_nanosleep/clock_nanosleep.o
endif endif
ifeq ($(UNAME), OpenBSD)
CFLAGS+= -DMISSING_NANOSLEEP
COMPAT+= compat/clock_nanosleep/clock_nanosleep.o
endif
all: dump1090 view1090 all: dump1090 view1090
%.o: %.c *.h %.o: %.c *.h

View file

@ -1,7 +1,11 @@
#ifndef CLOCK_GETTIME_H #ifndef CLOCK_GETTIME_H
#define CLOCK_GETTIME_H #define CLOCK_GETTIME_H
#include <mach/mach_time.h> #include <mach/mach_time.h> // Apple-only, but this isn't inclued on other BSDs
#ifdef _CLOCKID_T_DEFINED_
#define CLOCKID_T
#endif
#ifndef CLOCKID_T #ifndef CLOCKID_T
#define CLOCKID_T #define CLOCKID_T
@ -12,7 +16,7 @@ typedef enum
CLOCK_PROCESS_CPUTIME_ID, CLOCK_PROCESS_CPUTIME_ID,
CLOCK_THREAD_CPUTIME_ID CLOCK_THREAD_CPUTIME_ID
} clockid_t; } clockid_t;
#endif // CLOCKID_T #endif // ifndef CLOCKID_T
struct timespec; struct timespec;

View file

@ -19,10 +19,13 @@
* http://www.gnu.org/copyleft/gpl.html * * http://www.gnu.org/copyleft/gpl.html *
***********************************************************************/ ***********************************************************************/
#include "clock_nanosleep.h"
#include <errno.h> // for errno, EINVAL #include <errno.h> // for errno, EINVAL
#include <time.h> // for nanosleep, NULL #include <time.h> // for nanosleep, NULL
#include "clock_nanosleep.h"
#ifdef MISSING_GETTIME
#include "../clock_gettime/clock_gettime.h" // for clock_gettime #include "../clock_gettime/clock_gettime.h" // for clock_gettime
#endif
int clock_nanosleep(clockid_t id, int flags, const struct timespec *ts, int clock_nanosleep(clockid_t id, int flags, const struct timespec *ts,
struct timespec *ots) { struct timespec *ots) {

View file

@ -1,6 +1,10 @@
#ifndef CLOCK_NANOSLEEP_H #ifndef CLOCK_NANOSLEEP_H
#define CLOCK_NANOSLEEP_H #define CLOCK_NANOSLEEP_H
#ifdef _CLOCKID_T_DEFINED_
#define CLOCKID_T
#endif
#ifndef CLOCKID_T #ifndef CLOCKID_T
#define CLOCKID_T #define CLOCKID_T
typedef enum typedef enum
@ -10,7 +14,8 @@ typedef enum
CLOCK_PROCESS_CPUTIME_ID, CLOCK_PROCESS_CPUTIME_ID,
CLOCK_THREAD_CPUTIME_ID CLOCK_THREAD_CPUTIME_ID
} clockid_t; } clockid_t;
#endif // CLOCKID_T #endif // ifndef CLOCKID_T
#ifndef TIMER_ABSTIME #ifndef TIMER_ABSTIME
#define TIMER_ABSTIME 1 #define TIMER_ABSTIME 1

View file

@ -7,11 +7,6 @@
#if defined(__APPLE__) #if defined(__APPLE__)
/* implementations of clock_gettime, clock_nanosleep */
#include "clock_gettime/clock_gettime.h"
#include "clock_nanosleep/clock_nanosleep.h"
/* /*
* Mach endian conversion * Mach endian conversion
*/ */
@ -29,4 +24,12 @@
#endif #endif
#ifdef MISSING_NANOSLEEP
#include "clock_nanosleep/clock_nanosleep.h"
#endif
#ifdef MISSING_GETTIME
#include "clock_gettime/clock_gettime.h"
#endif
#endif //COMPAT_UTIL_H #endif //COMPAT_UTIL_H

View file

@ -163,7 +163,7 @@ static int testCPRGlobalAirborne() {
|| fabs(rlon - cprGlobalAirborneTests[i].even_rlon) > 1e-6) { || fabs(rlon - cprGlobalAirborneTests[i].even_rlon) > 1e-6) {
ok = 0; ok = 0;
fprintf(stderr, fprintf(stderr,
"testCPRGlobalAirborne[%d,EVEN]: FAIL: decodeCPRairborne(%d,%d,%d,%d,EVEN) failed:\n" "testCPRGlobalAirborne[%u,EVEN]: FAIL: decodeCPRairborne(%d,%d,%d,%d,EVEN) failed:\n"
" result %d (expected %d)\n" " result %d (expected %d)\n"
" lat %.6f (expected %.6f)\n" " lat %.6f (expected %.6f)\n"
" lon %.6f (expected %.6f)\n", " lon %.6f (expected %.6f)\n",
@ -174,7 +174,7 @@ static int testCPRGlobalAirborne() {
rlat, cprGlobalAirborneTests[i].even_rlat, rlat, cprGlobalAirborneTests[i].even_rlat,
rlon, cprGlobalAirborneTests[i].even_rlon); rlon, cprGlobalAirborneTests[i].even_rlon);
} else { } else {
fprintf(stderr, "testCPRGlobalAirborne[%d,EVEN]: PASS\n", i); fprintf(stderr, "testCPRGlobalAirborne[%u,EVEN]: PASS\n", i);
} }
res = decodeCPRairborne(cprGlobalAirborneTests[i].even_cprlat, cprGlobalAirborneTests[i].even_cprlon, res = decodeCPRairborne(cprGlobalAirborneTests[i].even_cprlat, cprGlobalAirborneTests[i].even_cprlon,
@ -186,7 +186,7 @@ static int testCPRGlobalAirborne() {
|| fabs(rlon - cprGlobalAirborneTests[i].odd_rlon) > 1e-6) { || fabs(rlon - cprGlobalAirborneTests[i].odd_rlon) > 1e-6) {
ok = 0; ok = 0;
fprintf(stderr, fprintf(stderr,
"testCPRGlobalAirborne[%d,ODD]: FAIL: decodeCPRairborne(%d,%d,%d,%d,ODD) failed:\n" "testCPRGlobalAirborne[%u,ODD]: FAIL: decodeCPRairborne(%d,%d,%d,%d,ODD) failed:\n"
" result %d (expected %d)\n" " result %d (expected %d)\n"
" lat %.6f (expected %.6f)\n" " lat %.6f (expected %.6f)\n"
" lon %.6f (expected %.6f)\n", " lon %.6f (expected %.6f)\n",
@ -197,7 +197,7 @@ static int testCPRGlobalAirborne() {
rlat, cprGlobalAirborneTests[i].odd_rlat, rlat, cprGlobalAirborneTests[i].odd_rlat,
rlon, cprGlobalAirborneTests[i].odd_rlon); rlon, cprGlobalAirborneTests[i].odd_rlon);
} else { } else {
fprintf(stderr, "testCPRGlobalAirborne[%d,ODD]: PASS\n", i); fprintf(stderr, "testCPRGlobalAirborne[%u,ODD]: PASS\n", i);
} }
} }
@ -221,7 +221,7 @@ static int testCPRGlobalSurface() {
|| fabs(rlon - cprGlobalSurfaceTests[i].even_rlon) > 1e-6) { || fabs(rlon - cprGlobalSurfaceTests[i].even_rlon) > 1e-6) {
ok = 0; ok = 0;
fprintf(stderr, fprintf(stderr,
"testCPRGlobalSurface[%d,EVEN]: FAIL: decodeCPRsurface(%.6f,%.6f,%d,%d,%d,%d,EVEN) failed:\n" "testCPRGlobalSurface[%u,EVEN]: FAIL: decodeCPRsurface(%.6f,%.6f,%d,%d,%d,%d,EVEN) failed:\n"
" result %d (expected %d)\n" " result %d (expected %d)\n"
" lat %.6f (expected %.6f)\n" " lat %.6f (expected %.6f)\n"
" lon %.6f (expected %.6f)\n", " lon %.6f (expected %.6f)\n",
@ -233,7 +233,7 @@ static int testCPRGlobalSurface() {
rlat, cprGlobalSurfaceTests[i].even_rlat, rlat, cprGlobalSurfaceTests[i].even_rlat,
rlon, cprGlobalSurfaceTests[i].even_rlon); rlon, cprGlobalSurfaceTests[i].even_rlon);
} else { } else {
fprintf(stderr, "testCPRGlobalSurface[%d,EVEN]: PASS\n", i); fprintf(stderr, "testCPRGlobalSurface[%u,EVEN]: PASS\n", i);
} }
res = decodeCPRsurface(cprGlobalSurfaceTests[i].reflat, cprGlobalSurfaceTests[i].reflon, res = decodeCPRsurface(cprGlobalSurfaceTests[i].reflat, cprGlobalSurfaceTests[i].reflon,
@ -246,7 +246,7 @@ static int testCPRGlobalSurface() {
|| fabs(rlon - cprGlobalSurfaceTests[i].odd_rlon) > 1e-6) { || fabs(rlon - cprGlobalSurfaceTests[i].odd_rlon) > 1e-6) {
ok = 0; ok = 0;
fprintf(stderr, fprintf(stderr,
"testCPRGlobalSurface[%d,ODD]: FAIL: decodeCPRsurface(%.6f,%.6f,%d,%d,%d,%d,ODD) failed:\n" "testCPRGlobalSurface[%u,ODD]: FAIL: decodeCPRsurface(%.6f,%.6f,%d,%d,%d,%d,ODD) failed:\n"
" result %d (expected %d)\n" " result %d (expected %d)\n"
" lat %.6f (expected %.6f)\n" " lat %.6f (expected %.6f)\n"
" lon %.6f (expected %.6f)\n", " lon %.6f (expected %.6f)\n",
@ -258,7 +258,7 @@ static int testCPRGlobalSurface() {
rlat, cprGlobalSurfaceTests[i].odd_rlat, rlat, cprGlobalSurfaceTests[i].odd_rlat,
rlon, cprGlobalSurfaceTests[i].odd_rlon); rlon, cprGlobalSurfaceTests[i].odd_rlon);
} else { } else {
fprintf(stderr, "testCPRGlobalSurface[%d,ODD]: PASS\n", i); fprintf(stderr, "testCPRGlobalSurface[%u,ODD]: PASS\n", i);
} }
} }
@ -281,7 +281,7 @@ static int testCPRRelative() {
|| fabs(rlon - cprRelativeTests[i].rlon) > 1e-6) { || fabs(rlon - cprRelativeTests[i].rlon) > 1e-6) {
ok = 0; ok = 0;
fprintf(stderr, fprintf(stderr,
"testCPRRelative[%d]: FAIL: decodeCPRrelative(%.6f,%.6f,%d,%d,%d,%d) failed:\n" "testCPRRelative[%u]: FAIL: decodeCPRrelative(%.6f,%.6f,%d,%d,%d,%d) failed:\n"
" result %d (expected %d)\n" " result %d (expected %d)\n"
" lat %.6f (expected %.6f)\n" " lat %.6f (expected %.6f)\n"
" lon %.6f (expected %.6f)\n", " lon %.6f (expected %.6f)\n",
@ -293,7 +293,7 @@ static int testCPRRelative() {
rlat, cprRelativeTests[i].rlat, rlat, cprRelativeTests[i].rlat,
rlon, cprRelativeTests[i].rlon); rlon, cprRelativeTests[i].rlon);
} else { } else {
fprintf(stderr, "testCPRRelative[%d]: PASS\n", i); fprintf(stderr, "testCPRRelative[%u]: PASS\n", i);
} }
} }

View file

@ -1141,7 +1141,7 @@ void displayModesMessage(struct modesMessage *mm) {
if (mm->timestampMsg == MAGIC_MLAT_TIMESTAMP) if (mm->timestampMsg == MAGIC_MLAT_TIMESTAMP)
printf("This is a synthetic MLAT message.\n"); printf("This is a synthetic MLAT message.\n");
else else
printf("Time: %.2fus (phase: %d)\n", mm->timestampMsg / 12.0, (unsigned int) (360 * (mm->timestampMsg % 6) / 6)); printf("Time: %.2fus (phase: %u)\n", mm->timestampMsg / 12.0, (unsigned int) (360 * (mm->timestampMsg % 6) / 6));
} }
if (mm->msgtype == 0) { // DF 0 if (mm->msgtype == 0) { // DF 0

View file

@ -1316,7 +1316,7 @@ static int handleHTTPRequest(struct client *c, char *p) {
const char *statusmsg = "Internal Server Error"; const char *statusmsg = "Internal Server Error";
char *url, *content = NULL; char *url, *content = NULL;
char *ext; char *ext;
char *content_type; char *content_type = NULL;
int i; int i;
if (Modes.debug & MODES_DEBUG_NET) if (Modes.debug & MODES_DEBUG_NET)

View file

@ -1,11 +1,12 @@
<!DOCTYPE HTML>
<html> <html>
<head> <head>
<meta charset="utf-8"/> <meta charset="utf-8"/>
<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="//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="//ajax.googleapis.com/ajax/libs/jqueryui/1.10.3/jquery-ui.min.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?libraries=geometry"></script> <script type="text/javascript" src="//maps.googleapis.com/maps/api/js?libraries=geometry"></script>
<script type="text/javascript" src="config.js"></script> <script type="text/javascript" src="config.js"></script>
<script type="text/javascript" src="markers.js"></script> <script type="text/javascript" src="markers.js"></script>
<script type="text/javascript" src="dbloader.js"></script> <script type="text/javascript" src="dbloader.js"></script>
@ -13,11 +14,12 @@
<script type="text/javascript" src="formatter.js"></script> <script type="text/javascript" src="formatter.js"></script>
<script type="text/javascript" src="flags.js"></script> <script type="text/javascript" src="flags.js"></script>
<script type="text/javascript" src="script.js"></script> <script type="text/javascript" src="script.js"></script>
<title>FlightAware - Piaware</title> <title>FlightAware - PiAware</title>
</head> </head>
<body onload="initialize()"> <body onload="initialize()">
<div id="loader" class="hidden"> <div id="loader" class="hidden">
<img src="spinny.gif" id="spinny"> <img src="spinny.gif" id="spinny" alt="Loading...">
<progress id="loader_progress"></progress> <progress id="loader_progress"></progress>
</div> </div>
@ -26,7 +28,8 @@
but if we have an input control with that name then it shadows the submit() function that but if we have an input control with that name then it shadows the submit() function that
we need. So steal the submit function off a different form. Surely there is a better way?! we need. So steal the submit function off a different form. Surely there is a better way?!
--> -->
<form id="horrible_hack" class="hidden"></form> <form id="horrible_hack" class="hidden">
</form>
<form id="airframes_post" method="POST" action="http://www.airframes.org/" target="_blank" class="hidden"> <form id="airframes_post" method="POST" action="http://www.airframes.org/" target="_blank" class="hidden">
<input type="hidden" name="reg1" value=""> <input type="hidden" name="reg1" value="">
<input type="hidden" name="selcal" value=""> <input type="hidden" name="selcal" value="">
@ -37,25 +40,26 @@
<div id="map_container"> <div id="map_container">
<div id="map_canvas"></div> <div id="map_canvas"></div>
</div> </div>
<div id="sidebar_container"> <div id="sidebar_container">
<div id="sidebar_canvas"> <div id="sidebar_canvas">
<div id="sudo_buttons"> <div id="sudo_buttons">
<table width="100%"> <table style="width: 100%">
<tr> <tr>
<td width="150" style="text-align: center;" class="pointer"> <td style="width: 150px; text-align: center;" class="pointer">
[ <span onclick="resetMap();">Reset Map</span> ] [ <span onclick="resetMap();">Reset Map</span> ]
</td> </td>
</tr> </tr>
</table> </table>
</div> </div> <!-- sudo_buttons -->
<div id="dump1090_infoblock"> <div id="dump1090_infoblock">
<table width="100%"> <table style="width: 100%">
<tr class="infoblock_heading"> <tr class="infoblock_heading">
<td> <td>
<b id="infoblock_name">Piaware</b> <b id="infoblock_name">FlightAware - PiAware</b>
</td> </td>
<td align="right"> <td style="text-align: right">
<a href="https://github.com/mutability/dump1090" id="dump1090_version" target="_blank"></a> <a href="https://github.com/mutability/dump1090" id="dump1090_version" target="_blank"></a>
</td> </td>
</tr> </tr>
@ -85,19 +89,19 @@
<td>History: <span id="dump1090_total_history">n/a</span> positions</td> <td>History: <span id="dump1090_total_history">n/a</span> positions</td>
</tr> </tr>
</table> </table>
</div> </div> <!-- dump1090_infoblock -->
<div id="selected_infoblock" class="hidden"> <div id="selected_infoblock" class="hidden">
<table width="100%"> <table style="width: 100%">
<tr class="infoblock_heading"> <tr class="infoblock_heading">
<td colspan="2"> <td colspan="2">
<b> <b>
<span id="selected_callsign" onclick="toggleFollowSelected();" class="pointer">n/a</span> <span id="selected_callsign" onclick="toggleFollowSelected();" class="pointer">n/a</span>
</b> </b>
<span id="selected_follow" onclick="toggleFollowSelected();" class="pointer">&#x21D2</span> <span id="selected_follow" onclick="toggleFollowSelected();" class="pointer">&#x21D2;</span>
<span id="selected_flag"> <span id="selected_flag">
<img width="20" height="12"> <img style="width: 20px; height=12px" src="about:blank" alt="Flag">
</span> </span>
<a href="http://www.airframes.org/" onclick="document.getElementById('horrible_hack').submit.call(document.getElementById('airframes_post')); return false;"> <a href="http://www.airframes.org/" onclick="document.getElementById('horrible_hack').submit.call(document.getElementById('airframes_post')); return false;">
@ -106,9 +110,7 @@
<span id="selected_registration"></span> <span id="selected_registration"></span>
<span id="selected_icaotype"></span> <span id="selected_icaotype"></span>
<span id="selected_emergency"></span> <span id="selected_emergency"></span>
<span id="selected_links">
<a id="selected_flightaware_link" href="" target="_blank">[FlightAware]</a> <a id="selected_flightaware_link" href="" target="_blank">[FlightAware]</a>
</span>
</td> </td>
</tr> </tr>
@ -117,8 +119,8 @@
</tr> </tr>
<tr class="infoblock_body"> <tr class="infoblock_body">
<td width="55%">Altitude: <span id="selected_altitude"></span></td> <td style="width: 55%">Altitude: <span id="selected_altitude"></span></td>
<td width="45%">Squawk: <span id="selected_squawk"></span></td> <td style="width: 45%">Squawk: <span id="selected_squawk"></span></td>
</tr> </tr>
<tr class="infoblock_body"> <tr class="infoblock_body">
@ -139,41 +141,44 @@
<td colspan="2">Distance from Site: <span id="selected_sitedist">n/a</span></td> <td colspan="2">Distance from Site: <span id="selected_sitedist">n/a</span></td>
</tr> </tr>
</table> </table>
</div> </div> <!-- selected_infoblock -->
<div id="planes_table"> <div id="planes_table">
<table id="tableinfo" width="100%"> <table id="tableinfo" style="width: 100%">
<thead style="background-color: #BBBBBB; cursor: pointer;"> <thead style="background-color: #BBBBBB; cursor: pointer;">
<tr> <tr>
<td id="icao" onclick="sortByICAO();">ICAO</td> <td id="icao" onclick="sortByICAO();">ICAO</td>
<td id="flag" onclick="sortByCountry()"><!-- column for flag image --></td> <td id="flag" onclick="sortByCountry()"><!-- column for flag image --></td>
<td id="flight" onclick="sortByFlight();">Flight</td> <td id="flight" onclick="sortByFlight();">Flight</td>
<td id="squawk" onclick="sortBySquawk();" align="right">Squawk</td> <td id="squawk" onclick="sortBySquawk();" style="text-align: right">Squawk</td>
<td id="altitude" onclick="sortByAltitude();" align="right">Altitude</td> <td id="altitude" onclick="sortByAltitude();" style="text-align: right">Altitude</td>
<td id="speed" onclick="sortBySpeed();" align="right">Speed</td> <td id="speed" onclick="sortBySpeed();" style="text-align: right">Speed</td>
<td id="distance" onclick="sortByDistance();" align="right">Distance</td> <td id="distance" onclick="sortByDistance();" style="text-align: right">Distance</td>
<td id="track" onclick="sortByTrack();" align="right">Track</td> <td id="track" onclick="sortByTrack();" style="text-align: right">Track</td>
<td id="msgs" onclick="sortByMsgs();" align="right">Msgs</td> <td id="msgs" onclick="sortByMsgs();" style="text-align: right">Msgs</td>
<td id="seen" onclick="sortBySeen();" align="right">Age</td> <td id="seen" onclick="sortBySeen();" style="text-align: right">Age</td>
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
<tr id="plane_row_template" class="plane_table_row hidden"> <tr id="plane_row_template" class="plane_table_row hidden">
<td>ICAO</td> <td>ICAO</td>
<td><img width="20" height="12"></td> <td><img style="width: 20px; height=12px" src="about:blank" alt="Flag"></td>
<td>FLIGHT</td> <td>FLIGHT</td>
<td align="right">SQUAWK</td> <td style="text-align: right">SQUAWK</td>
<td align="right">ALTITUDE</td> <td style="text-align: right">ALTITUDE</td>
<td align="right">SPEED</td> <td style="text-align: right">SPEED</td>
<td align="right">DISTANCE</td> <td style="text-align: right">DISTANCE</td>
<td align="right">TRACK</td> <td style="text-align: right">TRACK</td>
<td align="right">MSGS</td> <td style="text-align: right">MSGS</td>
<td align="right">SEEN</td> <td style="text-align: right">SEEN</td>
</tr> </tr>
</tbody> </tbody>
</table> </table>
</div> </div> <!-- planes_table -->
</div>
</div> </div> <!-- sidebar_canvas -->
</div> <!-- sidebar_container -->
<div id="SpecialSquawkWarning" class="hidden"> <div id="SpecialSquawkWarning" class="hidden">
<b>Squawk 7x00 is reported and shown.</b><br> <b>Squawk 7x00 is reported and shown.</b><br>
This is most likely an error in receiving or decoding.<br> This is most likely an error in receiving or decoding.<br>

View file

@ -469,7 +469,7 @@ function initialize_map() {
// Add home marker if requested // Add home marker if requested
if (SitePosition) { if (SitePosition) {
var markerImage = new google.maps.MarkerImage( var markerImage = new google.maps.MarkerImage(
'http://maps.google.com/mapfiles/kml/pal4/icon57.png', '//maps.google.com/mapfiles/kml/pal4/icon57.png',
new google.maps.Size(32, 32), // Image size new google.maps.Size(32, 32), // Image size
new google.maps.Point(0, 0), // Origin point of image new google.maps.Point(0, 0), // Origin point of image
new google.maps.Point(16, 16)); // Position where marker should point new google.maps.Point(16, 16)); // Position where marker should point
@ -614,7 +614,7 @@ function refreshSelected() {
$('#dump1090_infoblock').css('display','none'); $('#dump1090_infoblock').css('display','none');
$('#selected_infoblock').css('display','block'); $('#selected_infoblock').css('display','block');
$('#selected_flightaware_link').attr('href','http://flightaware.com/live/modes/'+selected.icao+'/redirect'); $('#selected_flightaware_link').attr('href','//flightaware.com/live/modes/'+selected.icao+'/redirect');
if (selected.flight !== null && selected.flight !== "") { if (selected.flight !== null && selected.flight !== "") {
$('#selected_callsign').text(selected.flight); $('#selected_callsign').text(selected.flight);