Compare commits
32 Commits
e310-updat
...
gr37
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
0b6c383506 | ||
|
|
f6ba6da8ba | ||
|
|
48c1afc3ba | ||
|
|
3b65986159 | ||
|
|
eb63b0034f | ||
|
|
719d52b6dd | ||
|
|
f96b83cb48 | ||
|
|
fd277e7fb0 | ||
|
|
737c98bf8a | ||
|
|
8cbcc676c4 | ||
|
|
d4d17bc4db | ||
|
|
3bad1f5d35 | ||
|
|
c29eb6030a | ||
|
|
e8c2a47278 | ||
|
|
0599c09198 | ||
|
|
49b7d87e7a | ||
|
|
2ffdcf6705 | ||
|
|
65e5bd1e2e | ||
|
|
2b8451cbe2 | ||
|
|
bdfcc42b39 | ||
|
|
514414f6b3 | ||
|
|
e82cf9d4de | ||
|
|
2c9ef501b8 | ||
|
|
953a7ddded | ||
|
|
c96dea7fa0 | ||
|
|
d810ed75a8 | ||
|
|
3d1b95832a | ||
|
|
93078a8cae | ||
|
|
d569e31a68 | ||
|
|
f0323160a0 | ||
|
|
95ff2cade0 | ||
|
|
9bdac2a499 |
10
Dockerfile
Normal file
10
Dockerfile
Normal file
@@ -0,0 +1,10 @@
|
||||
FROM bistromath/gnuradio:3.7.11
|
||||
|
||||
ENV num_threads 10
|
||||
MAINTAINER bistromath@gmail.com version: 0.1
|
||||
|
||||
WORKDIR /opt
|
||||
RUN mkdir gr-air-modes
|
||||
COPY . gr-air-modes/
|
||||
WORKDIR /opt/gr-air-modes
|
||||
RUN mkdir build && cd build && cmake ../ && make -j${num_threads} && make install && ldconfig
|
||||
1
README
1
README
@@ -97,6 +97,7 @@ gr-air-modes requires:
|
||||
|
||||
* Python >= 2.5 (written for Python 2.7, Python 3.0 might work)
|
||||
** NumPy and SciPy are required for the FlightGear output plugin.
|
||||
* PyZMQ
|
||||
* Gnuradio >= 3.5.0
|
||||
* Ettus UHD >= 3.4.0 for use with USRPs
|
||||
* osmosdr (any version) for use with RTLSDR dongles
|
||||
|
||||
@@ -30,6 +30,7 @@ import air_modes
|
||||
from air_modes.exceptions import *
|
||||
from air_modes.modes_rx_ui import Ui_MainWindow
|
||||
from air_modes.gui_model import *
|
||||
from air_modes.az_map import *
|
||||
import sqlite3
|
||||
import zmq
|
||||
|
||||
@@ -87,7 +88,9 @@ class mainwindow(QtGui.QMainWindow):
|
||||
self.ui.line_my_lat.insert(defaults["latitude"])
|
||||
if defaults["longitude"] is not None:
|
||||
self.ui.line_my_lon.insert(defaults["longitude"])
|
||||
|
||||
if defaults["apikey"] is not None:
|
||||
self.ui.line_my_api_key.insert(defaults["apikey"])
|
||||
|
||||
#disable by default
|
||||
self.ui.check_adsbonly.setCheckState(QtCore.Qt.Unchecked)
|
||||
|
||||
@@ -104,7 +107,7 @@ class mainwindow(QtGui.QMainWindow):
|
||||
self.ui.list_aircraft.setModel(self.datamodel)
|
||||
self.ui.list_aircraft.setModelColumn(0)
|
||||
|
||||
self.az_model = air_modes.az_map_model(None)
|
||||
self.az_model = air_modes.az_map.az_map_model(None)
|
||||
self.ui.azimuth_map.setModel(self.az_model)
|
||||
|
||||
#set up dashboard views
|
||||
@@ -321,6 +324,11 @@ class mainwindow(QtGui.QMainWindow):
|
||||
except:
|
||||
my_position = None
|
||||
|
||||
try:
|
||||
my_apikey = str(self.ui.line_my_api_key.text())
|
||||
except:
|
||||
my_apikey = None
|
||||
|
||||
self._cpr_dec = air_modes.cpr_decoder(my_position)
|
||||
|
||||
self.datamodelout = dashboard_output(self._cpr_dec, self.datamodel, self._publisher)
|
||||
@@ -343,7 +351,7 @@ class mainwindow(QtGui.QMainWindow):
|
||||
|
||||
#add azimuth map output and hook it up
|
||||
if my_position is not None:
|
||||
self.az_map_output = air_modes.az_map_output(self._cpr_dec, self.az_model, self._publisher)
|
||||
self.az_map_output = air_modes.az_map.az_map_output(self._cpr_dec, self.az_model, self._publisher)
|
||||
#self._relay.subscribe("dl_data", self.az_map_output.output)
|
||||
|
||||
#set up map
|
||||
@@ -359,7 +367,7 @@ class mainwindow(QtGui.QMainWindow):
|
||||
#create SQL database for KML and dashboard displays
|
||||
self.dbwriter = air_modes.output_sql(self._cpr_dec, self.dbname, self.lock, self._publisher)
|
||||
self.jsonpgen = air_modes.output_jsonp(self._jsonfile.name, self.dbname, my_position, self.lock, timeout=1)
|
||||
htmlstring = air_modes.html_template(my_position, self._jsonfile.name)
|
||||
htmlstring = air_modes.html_template(my_apikey, my_position, self._jsonfile.name)
|
||||
self._htmlfile.write(htmlstring)
|
||||
self._htmlfile.flush()
|
||||
class WebPage(QtWebKit.QWebPage):
|
||||
@@ -404,7 +412,11 @@ class mainwindow(QtGui.QMainWindow):
|
||||
self.prefs["longitude"] = float(self.ui.line_my_lon.text())
|
||||
except:
|
||||
pass
|
||||
|
||||
try:
|
||||
self.prefs["apikey"] = self.ui.line_my_api_key.text()
|
||||
except:
|
||||
pass
|
||||
|
||||
def on_quit(self):
|
||||
if self.running is True:
|
||||
self._radio.close()
|
||||
@@ -463,6 +475,7 @@ class mainwindow(QtGui.QMainWindow):
|
||||
defaults["threshold"] = "5"
|
||||
defaults["latitude"] = None
|
||||
defaults["longitude"] = None
|
||||
defaults["apikey"] = None
|
||||
|
||||
prefs = ConfigParser.ConfigParser(defaults)
|
||||
prefs.optionxform = str
|
||||
|
||||
@@ -4,23 +4,34 @@
|
||||
# QWT_FOUND If false, do not try to use Qwt
|
||||
|
||||
find_path (QWT_INCLUDE_DIRS
|
||||
NAMES qwt_plot.h
|
||||
PATHS
|
||||
/usr/local/include/qwt-qt4
|
||||
/usr/local/include/qwt
|
||||
/usr/include/qwt-qt4
|
||||
/usr/include/qwt
|
||||
/opt/local/include/qwt
|
||||
/sw/include/qwt
|
||||
NAMES qwt_plot.h
|
||||
HINTS
|
||||
${CMAKE_INSTALL_PREFIX}/include/qwt
|
||||
${CMAKE_PREFIX_PATH}/include/qwt
|
||||
PATHS
|
||||
/usr/local/include/qwt-qt4
|
||||
/usr/local/include/qwt
|
||||
/usr/include/qwt6
|
||||
/usr/include/qwt-qt4
|
||||
/usr/include/qwt
|
||||
/usr/include/qwt5
|
||||
/opt/local/include/qwt
|
||||
/sw/include/qwt
|
||||
/usr/local/lib/qwt.framework/Headers
|
||||
)
|
||||
|
||||
find_library (QWT_LIBRARIES
|
||||
NAMES qwt-qt4 qwt
|
||||
PATHS
|
||||
/usr/local/lib
|
||||
/usr/lib
|
||||
/opt/local/lib
|
||||
/sw/lib
|
||||
NAMES qwt6 qwt6-qt4 qwt qwt-qt4 qwt5 qwtd5
|
||||
HINTS
|
||||
${CMAKE_INSTALL_PREFIX}/lib
|
||||
${CMAKE_INSTALL_PREFIX}/lib64
|
||||
${CMAKE_PREFIX_PATH}/lib
|
||||
PATHS
|
||||
/usr/local/lib
|
||||
/usr/lib
|
||||
/opt/local/lib
|
||||
/sw/lib
|
||||
/usr/local/lib/qwt.framework
|
||||
)
|
||||
|
||||
# handle the QUIETLY and REQUIRED arguments and set QWT_FOUND to TRUE if
|
||||
|
||||
@@ -87,7 +87,7 @@ set(Boost_NOGO_VERSIONS
|
||||
)
|
||||
|
||||
foreach(ver ${Boost_NOGO_VERSIONS})
|
||||
if(${Boost_VERSION} EQUAL ${ver})
|
||||
if("${Boost_VERSION}" STREQUAL "${ver}")
|
||||
if(NOT ENABLE_BAD_BOOST)
|
||||
MESSAGE(STATUS "WARNING: Found a known bad version of Boost (v${Boost_VERSION}). Disabling.")
|
||||
set(Boost_FOUND FALSE)
|
||||
@@ -95,5 +95,5 @@ foreach(ver ${Boost_NOGO_VERSIONS})
|
||||
MESSAGE(STATUS "WARNING: Found a known bad version of Boost (v${Boost_VERSION}). Continuing anyway.")
|
||||
set(Boost_FOUND TRUE)
|
||||
endif(NOT ENABLE_BAD_BOOST)
|
||||
endif(${Boost_VERSION} EQUAL ${ver})
|
||||
endif("${Boost_VERSION}" STREQUAL "${ver}")
|
||||
endforeach(ver)
|
||||
|
||||
@@ -37,11 +37,11 @@ class AIR_MODES_API preamble : virtual public gr::block
|
||||
{
|
||||
public:
|
||||
typedef boost::shared_ptr<preamble> sptr;
|
||||
static sptr make(int channel_rate, float threshold_db);
|
||||
static sptr make(float channel_rate, float threshold_db);
|
||||
|
||||
virtual void set_rate(int channel_rate) = 0;
|
||||
virtual void set_rate(float channel_rate) = 0;
|
||||
virtual void set_threshold(float threshold_db) = 0;
|
||||
virtual int get_rate(void) = 0;
|
||||
virtual float get_rate(void) = 0;
|
||||
virtual float get_threshold(void) = 0;
|
||||
};
|
||||
|
||||
|
||||
@@ -34,11 +34,11 @@
|
||||
|
||||
namespace gr {
|
||||
|
||||
air_modes::preamble::sptr air_modes::preamble::make(int channel_rate, float threshold_db) {
|
||||
air_modes::preamble::sptr air_modes::preamble::make(float channel_rate, float threshold_db) {
|
||||
return gnuradio::get_initial_sptr(new air_modes::preamble_impl(channel_rate, threshold_db));
|
||||
}
|
||||
|
||||
air_modes::preamble_impl::preamble_impl(int channel_rate, float threshold_db) :
|
||||
air_modes::preamble_impl::preamble_impl(float channel_rate, float threshold_db) :
|
||||
gr::block ("preamble",
|
||||
gr::io_signature::make2 (2, 2, sizeof(float), sizeof(float)), //stream 0 is received data, stream 1 is moving average for reference
|
||||
gr::io_signature::make (1, 1, sizeof(float))) //the output soft symbols
|
||||
@@ -53,11 +53,11 @@ air_modes::preamble_impl::preamble_impl(int channel_rate, float threshold_db) :
|
||||
d_key = pmt::string_to_symbol("preamble_found");
|
||||
}
|
||||
|
||||
void air_modes::preamble_impl::set_rate(int channel_rate) {
|
||||
void air_modes::preamble_impl::set_rate(float channel_rate) {
|
||||
d_samples_per_chip = channel_rate / d_chip_rate;
|
||||
d_samples_per_symbol = d_samples_per_chip * 2;
|
||||
d_check_width = 120 * d_samples_per_symbol;
|
||||
d_secs_per_sample = 1.0/channel_rate;
|
||||
d_sample_rate = channel_rate;
|
||||
set_output_multiple(1+d_check_width*2);
|
||||
set_history(d_samples_per_symbol);
|
||||
}
|
||||
@@ -71,8 +71,8 @@ float air_modes::preamble_impl::get_threshold(void) {
|
||||
return d_threshold_db;
|
||||
}
|
||||
|
||||
int air_modes::preamble_impl::get_rate(void) {
|
||||
return d_samples_per_chip * d_chip_rate;
|
||||
float air_modes::preamble_impl::get_rate(void) {
|
||||
return d_sample_rate;
|
||||
}
|
||||
|
||||
static void integrate_and_dump(float *out, const float *in, int chips, int samps_per_chip) {
|
||||
@@ -97,19 +97,42 @@ static double correlate_preamble(const float *in, int samples_per_chip) {
|
||||
return corr;
|
||||
}
|
||||
|
||||
//todo: make it return a pair of some kind, otherwise you can lose precision
|
||||
static double tag_to_timestamp(gr::tag_t tstamp, uint64_t abs_sample_cnt, double secs_per_sample) {
|
||||
uint64_t ts_sample, last_whole_stamp;
|
||||
static pmt::pmt_t tag_to_timestamp(gr::tag_t tstamp, uint64_t abs_sample_cnt, int rate) {
|
||||
uint64_t last_whole_stamp;
|
||||
double last_frac_stamp;
|
||||
pmt::pmt_t tstime = pmt::make_tuple(pmt::from_uint64(0), pmt::from_double(0));
|
||||
if(tstamp.key == NULL
|
||||
|| !pmt::is_symbol(tstamp.key)
|
||||
|| pmt::symbol_to_string(tstamp.key) != "rx_time") {
|
||||
last_whole_stamp = 0;
|
||||
last_frac_stamp = 0;
|
||||
} else {
|
||||
last_whole_stamp = pmt::to_uint64(pmt::tuple_ref(tstamp.value, 0));
|
||||
last_frac_stamp = pmt::to_double(pmt::tuple_ref(tstamp.value, 1));
|
||||
}
|
||||
|
||||
if(tstamp.key == NULL || pmt::symbol_to_string(tstamp.key) != "rx_time") return 0;
|
||||
//the timestamp tag has tstamp.offset, the sample index of the timestamp tag
|
||||
//also tstamp.value, a pmt pair with (uint64, double) representing int and
|
||||
//fractional timestamp, respectively.
|
||||
//this function also gets an abs_sample_cnt which represents the sample count to
|
||||
//find a timestamp for. sps is obviously samples per second.
|
||||
//
|
||||
//so (abs_sample_cnt - tstamp.offset) is the delay we apply to the tag
|
||||
// int((abs_sample_cnt - tstamp.offset)/sps) is the integer offset
|
||||
// (abs_sample_cnt - tstamp.offset)/sps is the fractional offset
|
||||
|
||||
last_whole_stamp = pmt::to_uint64(pmt::tuple_ref(tstamp.value, 0));
|
||||
last_frac_stamp = pmt::to_double(pmt::tuple_ref(tstamp.value, 1));
|
||||
ts_sample = tstamp.offset;
|
||||
uint64_t int_offset = (abs_sample_cnt - tstamp.offset)/rate;
|
||||
double frac_offset = ((abs_sample_cnt - tstamp.offset) % rate) / double(rate);
|
||||
|
||||
uint64_t abs_whole = last_whole_stamp + int_offset;
|
||||
double abs_frac = last_frac_stamp + frac_offset;
|
||||
if(abs_frac > 1.0f) {
|
||||
abs_frac -= 1.0f;
|
||||
abs_whole += 1;
|
||||
}
|
||||
|
||||
tstime = pmt::make_tuple(pmt::from_uint64(abs_whole), pmt::from_double(abs_frac));
|
||||
|
||||
double tstime = double(abs_sample_cnt * secs_per_sample) + last_whole_stamp + last_frac_stamp;
|
||||
if(0) std::cout << "HEY WE GOT A STAMP AT " << tstime << " TICKS AT SAMPLE " << ts_sample << " ABS SAMPLE CNT IS " << abs_sample_cnt << std::endl;
|
||||
return tstime;
|
||||
}
|
||||
|
||||
@@ -124,7 +147,7 @@ int air_modes::preamble_impl::general_work(int noutput_items,
|
||||
int mininputs = std::min(ninput_items[0], ninput_items[1]); //they should be matched but let's be safe
|
||||
//round number of input samples down to nearest d_samples_per_chip
|
||||
//we also subtract off d_samples_per_chip to allow the bit center finder some leeway
|
||||
const int ninputs = std::max(mininputs - (mininputs % d_samples_per_chip) - d_samples_per_chip, 0);
|
||||
const int ninputs = std::max(mininputs - (mininputs % int(d_samples_per_chip)) - int(d_samples_per_chip), 0);
|
||||
if (ninputs <= 0) { consume_each(0); return 0; }
|
||||
|
||||
float *out = (float *) output_items[0];
|
||||
@@ -194,22 +217,20 @@ int air_modes::preamble_impl::general_work(int noutput_items,
|
||||
|
||||
//all right i'm prepared to call this a preamble
|
||||
for(int j=0; j<240; j++) {
|
||||
out[j] = in[i+j*d_samples_per_chip] - inavg[i];
|
||||
out[j] = in[i+int(j*d_samples_per_chip)] - inavg[i];
|
||||
}
|
||||
|
||||
//get the timestamp of the preamble
|
||||
double tstamp = tag_to_timestamp(d_timestamp, abs_sample_cnt + i, d_secs_per_sample);
|
||||
pmt::pmt_t tstamp = tag_to_timestamp(d_timestamp, abs_sample_cnt + i, d_sample_rate);
|
||||
|
||||
//now tag the preamble
|
||||
add_item_tag(0, //stream ID
|
||||
nitems_written(0), //sample
|
||||
d_key, //frame_info
|
||||
pmt::from_double(tstamp),
|
||||
tstamp,
|
||||
d_me //block src id
|
||||
);
|
||||
|
||||
//std::cout << "PREAMBLE" << std::endl;
|
||||
|
||||
//produce only one output per work call -- TODO this should probably change
|
||||
if(0) std::cout << "Preamble consumed " << i+240*d_samples_per_chip << "with i=" << i << ", returned 240" << std::endl;
|
||||
|
||||
|
||||
@@ -15,26 +15,26 @@ private:
|
||||
int d_check_width;
|
||||
int d_chip_rate;
|
||||
float d_preamble_length_us;
|
||||
int d_samples_per_chip;
|
||||
int d_samples_per_symbol;
|
||||
float d_samples_per_chip;
|
||||
float d_samples_per_symbol;
|
||||
float d_threshold_db;
|
||||
float d_threshold;
|
||||
pmt::pmt_t d_me, d_key;
|
||||
gr::tag_t d_timestamp;
|
||||
double d_secs_per_sample;
|
||||
pmt::pmt_t d_me, d_key;
|
||||
int d_sample_rate;
|
||||
|
||||
public:
|
||||
preamble_impl(int channel_rate, float threshold_db);
|
||||
preamble_impl(float channel_rate, float threshold_db);
|
||||
|
||||
int general_work (int noutput_items,
|
||||
gr_vector_int &ninput_items,
|
||||
gr_vector_const_void_star &input_items,
|
||||
gr_vector_void_star &output_items);
|
||||
|
||||
void set_rate(int channel_rate);
|
||||
void set_rate(float channel_rate);
|
||||
void set_threshold(float threshold_db);
|
||||
float get_threshold(void);
|
||||
int get_rate(void);
|
||||
float get_rate(void);
|
||||
};
|
||||
|
||||
} //namespace air_modes
|
||||
|
||||
@@ -158,8 +158,6 @@ int air_modes::slicer_impl::work(int noutput_items,
|
||||
}
|
||||
}
|
||||
|
||||
rx_packet.timestamp = pmt::to_double(tag_iter->value);
|
||||
|
||||
//here you might want to traverse the whole packet and if you find all 0's, just toss it. don't know why these packets turn up, but they pass ECC.
|
||||
bool zeroes = 1;
|
||||
for(int m = 0; m < 14; m++) {
|
||||
@@ -183,13 +181,15 @@ int air_modes::slicer_impl::work(int noutput_items,
|
||||
//crc for the other short packets is usually nonzero, so they can't really be trusted that far
|
||||
if(rx_packet.crc && (rx_packet.message_type == 11 || rx_packet.message_type == 17)) {continue;}
|
||||
|
||||
pmt::pmt_t tstamp = tag_iter->value;
|
||||
|
||||
d_payload.str("");
|
||||
for(int m = 0; m < packet_length/8; m++) {
|
||||
d_payload << std::hex << std::setw(2) << std::setfill('0') << unsigned(rx_packet.data[m]);
|
||||
}
|
||||
|
||||
d_payload << " " << std::setw(6) << rx_packet.crc << " " << std::dec << rx_packet.reference_level
|
||||
<< " " << std::setprecision(10) << std::setw(10) << rx_packet.timestamp;
|
||||
<< " " << pmt::to_uint64(pmt::tuple_ref(tstamp, 0)) << " " << std::setprecision(10) << pmt::to_double(pmt::tuple_ref(tstamp, 1));
|
||||
gr::message::sptr msg = gr::message::make_from_string(std::string(d_payload.str()));
|
||||
d_queue->handle(msg);
|
||||
}
|
||||
|
||||
@@ -38,6 +38,7 @@ private:
|
||||
int d_chip_rate;
|
||||
int d_samples_per_chip;
|
||||
int d_samples_per_symbol;
|
||||
gr::tag_t d_timestamp;
|
||||
gr::msg_queue::sptr d_queue;
|
||||
std::ostringstream d_payload;
|
||||
|
||||
|
||||
@@ -67,7 +67,6 @@ from kml import output_kml, output_jsonp
|
||||
from raw_server import raw_server
|
||||
from radio import modes_radio
|
||||
from exceptions import *
|
||||
from az_map import *
|
||||
from types import *
|
||||
from altitude import *
|
||||
from cpr import cpr_decoder
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
#HTML template for Mode S map display
|
||||
#Nick Foster, 2013
|
||||
|
||||
def html_template(my_position, json_file):
|
||||
def html_template(my_apikey, my_position, json_file):
|
||||
if my_position is None:
|
||||
my_position = [37, -122]
|
||||
|
||||
@@ -25,9 +25,9 @@ def html_template(my_position, json_file):
|
||||
white-space: nowrap;
|
||||
}
|
||||
</style>
|
||||
<script type="text/javascript" src="http://maps.google.com/maps/api/js?sensor=false">
|
||||
<script type="text/javascript" src="http://maps.google.com/maps/api/js?key=%s">
|
||||
</script>
|
||||
<script type="text/javascript" src="http://google-maps-utility-library-v3.googlecode.com/svn/tags/markerwithlabel/1.1.9/src/markerwithlabel.js">
|
||||
<script type="text/javascript" src="https://raw.githubusercontent.com/googlemaps/v3-utility-library/master/markerwithlabel/src/markerwithlabel.js">
|
||||
</script>
|
||||
<script type="text/javascript">
|
||||
var map;
|
||||
@@ -152,4 +152,4 @@ def html_template(my_position, json_file):
|
||||
<div id="map_canvas" style="width:100%%; height:100%%">
|
||||
</div>
|
||||
</body>
|
||||
</html>""" % (my_position[0], my_position[1], json_file)
|
||||
</html>""" % (my_apikey, my_position[0], my_position[1], json_file)
|
||||
|
||||
@@ -335,13 +335,13 @@ def parseBDS09_1(data):
|
||||
ew = bool(data["dew"])
|
||||
subtype = data["sub"]
|
||||
if subtype == 0x02:
|
||||
ns_vel <<= 2
|
||||
ew_vel <<= 2
|
||||
ns_vel *= 4
|
||||
ew_vel *= 4
|
||||
|
||||
velocity = math.hypot(ns_vel, ew_vel)
|
||||
if ew:
|
||||
ew_vel = 0 - ew_vel
|
||||
|
||||
|
||||
if ns_vel == 0:
|
||||
heading = 0
|
||||
else:
|
||||
@@ -423,12 +423,12 @@ def parse_TCAS_CRM(data):
|
||||
def make_parser(pub):
|
||||
publisher = pub
|
||||
def publish(message):
|
||||
[data, ecc, reference, timestamp] = message.split()
|
||||
[data, ecc, reference, int_timestamp, frac_timestamp] = message.split()
|
||||
try:
|
||||
ret = air_modes.modes_report(modes_reply(int(data, 16)),
|
||||
int(ecc, 16),
|
||||
10.0*math.log10(max(1e-8,float(reference))),
|
||||
air_modes.stamp(0, float(timestamp)))
|
||||
air_modes.stamp(int(int_timestamp), float(frac_timestamp)))
|
||||
pub["modes_dl"] = ret
|
||||
pub["type%i_dl" % ret.data.get_type()] = ret
|
||||
except ADSBError:
|
||||
|
||||
@@ -219,7 +219,7 @@ class modes_radio (gr.top_block, pubsub):
|
||||
ip, port = re.search("(.*)\:(\d{1,5})", options.source).groups()
|
||||
except:
|
||||
raise Exception("Please input UDP source e.g. 192.168.10.1:12345")
|
||||
self._u = gr.udp_source(gr.sizeof_gr_complex, ip, int(port))
|
||||
self._u = blocks.udp_source(gr.sizeof_gr_complex, ip, int(port))
|
||||
print "Using UDP source %s:%s" % (ip, port)
|
||||
else:
|
||||
self._u = blocks.file_source(gr.sizeof_gr_complex, options.source)
|
||||
|
||||
@@ -83,6 +83,6 @@ class rx_path(gr.hier_block2):
|
||||
def get_pmf(self, pmf):
|
||||
return not (self._bb == self._demod)
|
||||
|
||||
def get_threshold(self, threshold):
|
||||
def get_threshold(self):
|
||||
return self._sync.get_threshold()
|
||||
|
||||
|
||||
@@ -83,7 +83,7 @@ class output_sbs1:
|
||||
# dictionary is getting too large.
|
||||
if len(self._aircraft_id_map) > 1e4:
|
||||
minimum = min(self._aircraft_id_map.values()) + (len(self._aircraft_id_map) - 1e4)
|
||||
for icao, _id in self._aircraft_id_map.iteritems():
|
||||
for icao, _id in dict(self._aircraft_id_map).iteritems():
|
||||
if _id < minimum:
|
||||
del self._aircraft_id_map[icao]
|
||||
|
||||
|
||||
@@ -6,8 +6,8 @@
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>687</width>
|
||||
<height>422</height>
|
||||
<width>719</width>
|
||||
<height>454</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="sizePolicy">
|
||||
@@ -102,8 +102,8 @@
|
||||
<rect>
|
||||
<x>10</x>
|
||||
<y>20</y>
|
||||
<width>236</width>
|
||||
<height>251</height>
|
||||
<width>241</width>
|
||||
<height>281</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="title">
|
||||
@@ -307,7 +307,7 @@
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>10</x>
|
||||
<y>200</y>
|
||||
<y>190</y>
|
||||
<width>221</width>
|
||||
<height>22</height>
|
||||
</rect>
|
||||
@@ -320,7 +320,7 @@
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>10</x>
|
||||
<y>220</y>
|
||||
<y>210</y>
|
||||
<width>221</width>
|
||||
<height>22</height>
|
||||
</rect>
|
||||
@@ -329,6 +329,16 @@
|
||||
<string>Use DC blocking filter</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLineEdit" name="line_my_api_key">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>90</x>
|
||||
<y>250</y>
|
||||
<width>121</width>
|
||||
<height>27</height>
|
||||
</rect>
|
||||
</property>
|
||||
</widget>
|
||||
</widget>
|
||||
<widget class="QGroupBox" name="group_output">
|
||||
<property name="geometry">
|
||||
@@ -549,6 +559,19 @@
|
||||
</property>
|
||||
</widget>
|
||||
</widget>
|
||||
<widget class="QLabel" name="label_34">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>20</x>
|
||||
<y>270</y>
|
||||
<width>67</width>
|
||||
<height>17</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>API Key</string>
|
||||
</property>
|
||||
</widget>
|
||||
</widget>
|
||||
<widget class="QWidget" name="dashboard">
|
||||
<attribute name="title">
|
||||
@@ -1031,7 +1054,7 @@
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>687</width>
|
||||
<width>719</width>
|
||||
<height>25</height>
|
||||
</rect>
|
||||
</property>
|
||||
|
||||
@@ -39,7 +39,7 @@ set(GR_SWIG_LIBRARIES air_modes)
|
||||
#set(GR_SWIG_DOC_FILE ${CMAKE_CURRENT_BINARY_DIR}/gr-air-modes_swig_doc.i)
|
||||
#set(GR_SWIG_DOC_DIRS ${CMAKE_CURRENT_SOURCE_DIR}/../include)
|
||||
|
||||
GR_SWIG_MAKE(air_modes_swig air_modes.i)
|
||||
GR_SWIG_MAKE(air_modes_swig air_modes_swig.i)
|
||||
|
||||
########################################################################
|
||||
# Install the build swig module
|
||||
|
||||
Reference in New Issue
Block a user