Skip to content

Commit

Permalink
SkyAware renaming Pass 3 - source code
Browse files Browse the repository at this point in the history
  • Loading branch information
eric1tran committed Jul 16, 2019
1 parent 5fd0fa2 commit 9461395
Show file tree
Hide file tree
Showing 8 changed files with 25 additions and 25 deletions.
2 changes: 1 addition & 1 deletion Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ node(label: 'raspberrypi') {
}

stage("Test install on ${dist}") {
sh "/build/repo/validate-packages.sh ${dist} ${results}/dump978-fa_*.deb ${results}/skyview978_*.deb"
sh "/build/repo/validate-packages.sh ${dist} ${results}/dump978-fa_*.deb ${results}/skyaware978_*.deb"
}
}

Expand Down
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ dump978-fa is the main binary. It talks to the SDR, demodulates UAT data,
and provides the data in a variety of ways - either as raw messages or as
json-formatted decoded messages, and either on a network port or to stdout.

skyview978 connects to a running dump978-fa and writes json files suitable
for use by the Skyview web map.
skyaware978 connects to a running dump978-fa and writes json files suitable
for use by the SkyAware web map.

## Building as a package

Expand All @@ -30,7 +30,7 @@ $ sudo apt-get install \
libsoapysdr-dev
$ dpkg-buildpackage -b
$ sudo dpkg -i ../dump978-fa_*.deb ../skyview978_*.deb
$ sudo dpkg -i ../dump978-fa_*.deb ../skyaware978_*.deb
```

## Building from source
Expand All @@ -49,7 +49,7 @@ $ sudo apt-get install soapysdr-module-rtlsdr
## Configuration

For a package install, see `/etc/default/dump978-fa` and
`/etc/default/skyview978`.
`/etc/default/skyaware978`.

The main options are:

Expand Down
2 changes: 1 addition & 1 deletion skyaware/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ SiteCircles = true; // true to show circles (only shown if the center marker is
SiteCirclesDistances = new Array(100,150,200);

// Controls page title, righthand pane when nothing is selected
PageName = "PiAware Skyview";
PageName = "PiAware SkyAware";

// Show country flags by ICAO addresses?
ShowFlags = true;
Expand Down
6 changes: 3 additions & 3 deletions skyaware/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
<script type="text/javascript" src="flags.js"></script>
<script type="text/javascript" src="layers.js"></script>
<script type="text/javascript" src="script.js?v=2"></script>
<title>PiAware Skyview</title>
<title>PiAware SkyAware</title>
</head>

<body onload="initialize()">
Expand All @@ -49,8 +49,8 @@
<div id="header" class="infoHeading">
<div class="logoContainer">
<a href="http://flightaware.com/" target="_blank"><img src="images/fa_logo_color.png" alt="FlightAware" class="flightawareLogo" srcset="images/fa_logo_color.png 1x, images/[email protected] 2x, images/[email protected] 3x"></a>
<img src="images/pa-sv-logo.png" alt="PiAware SkyView" class="adsbLogo piAwareLogo" srcset="images/pa-sv-logo.png 1x, images/[email protected] 2x, images/[email protected] 3x">
<img src="images/ff-sv-logo.png" alt="FlightFeeder SkyView" class="adsbLogo flightfeederLogo" srcset="images/ff-sv-logo.png 1x, images/[email protected] 2x, images/[email protected] 3x" style="display: none;">
<img src="images/pa-sv-logo.png" alt="PiAware SkyAware" class="adsbLogo piAwareLogo" srcset="images/pa-sv-logo.png 1x, images/[email protected] 2x, images/[email protected] 3x">
<img src="images/ff-sv-logo.png" alt="FlightFeeder SkyAware" class="adsbLogo flightfeederLogo" srcset="images/ff-sv-logo.png 1x, images/[email protected] 2x, images/[email protected] 3x" style="display: none;">
</div>
<div class="buttonContainer">
<div class="dateTime" id="clock_div"></div>
Expand Down
4 changes: 2 additions & 2 deletions skyaware/script.js
Original file line number Diff line number Diff line change
Expand Up @@ -1896,11 +1896,11 @@ function updatePiAwareOrFlightFeeder() {
if (isFlightFeeder) {
$('.piAwareLogo').hide();
$('.flightfeederLogo').show();
PageName = 'FlightFeeder Skyview';
PageName = 'FlightFeeder SkyAware';
} else {
$('.flightfeederLogo').hide();
$('.piAwareLogo').show();
PageName = 'PiAware Skyview';
PageName = 'PiAware SkyAware';
}
refreshPageTitle();
}
8 changes: 4 additions & 4 deletions skyaware978_main.cc
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
#include "uat_message.h"

using namespace flightaware::uat;
using namespace flightaware::skyview;
using namespace flightaware::skyaware;

namespace po = boost::program_options;
using boost::asio::ip::tcp;
Expand Down Expand Up @@ -70,13 +70,13 @@ static int realmain(int argc, char **argv) {
}

if (opts.count("help")) {
std::cerr << "skyview978 " << VERSION << std::endl;
std::cerr << "skyaware978 " << VERSION << std::endl;
std::cerr << desc << std::endl;
return EXIT_NO_RESTART;
}

if (opts.count("version")) {
std::cerr << "skyview978 " << VERSION << std::endl;
std::cerr << "skyaware978 " << VERSION << std::endl;
return EXIT_NO_RESTART;
}

Expand Down Expand Up @@ -109,7 +109,7 @@ static int realmain(int argc, char **argv) {
}

auto dir = opts["json-dir"].as<std::string>();
auto writer = SkyviewWriter::Create(io_service, tracker, dir, std::chrono::milliseconds(1000), opts["history-count"].as<unsigned>(), std::chrono::milliseconds(opts["history-interval"].as<unsigned>() * 1000), location);
auto writer = SkyAwareWriter::Create(io_service, tracker, dir, std::chrono::milliseconds(1000), opts["history-count"].as<unsigned>(), std::chrono::milliseconds(opts["history-interval"].as<unsigned>() * 1000), location);

writer->Start();
tracker->Start();
Expand Down
8 changes: 4 additions & 4 deletions skyaware_writer.cc
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@
#include "track.h"

using namespace flightaware::uat;
using namespace flightaware::skyview;
using namespace flightaware::skyaware;

void SkyviewWriter::Start() {
void SkyAwareWriter::Start() {
nlohmann::json receiver_json;

receiver_json["version"] = "dump978 " VERSION;
Expand All @@ -34,9 +34,9 @@ void SkyviewWriter::Start() {
PeriodicWrite();
}

void SkyviewWriter::Stop() { timer_.cancel(); }
void SkyAwareWriter::Stop() { timer_.cancel(); }

void SkyviewWriter::PeriodicWrite() {
void SkyAwareWriter::PeriodicWrite() {
using json = nlohmann::json;
json aircraft_json;

Expand Down
12 changes: 6 additions & 6 deletions skyaware_writer.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,18 +18,18 @@
#include "track.h"
#include "uat_message.h"

namespace flightaware::skyview {
class SkyviewWriter : public std::enable_shared_from_this<SkyviewWriter> {
namespace flightaware::skyaware {
class SkyAwareWriter : public std::enable_shared_from_this<SkyAwareWriter> {
public:
typedef std::shared_ptr<SkyviewWriter> Pointer;
typedef std::shared_ptr<SkyAwareWriter> Pointer;

static Pointer Create(boost::asio::io_service &service, flightaware::uat::Tracker::Pointer tracker, const boost::filesystem::path &dir, std::chrono::milliseconds interval, unsigned history_count, std::chrono::milliseconds history_interval, boost::optional<std::pair<double, double>> location) { return Pointer(new SkyviewWriter(service, tracker, dir, interval, history_count, history_interval, location)); }
static Pointer Create(boost::asio::io_service &service, flightaware::uat::Tracker::Pointer tracker, const boost::filesystem::path &dir, std::chrono::milliseconds interval, unsigned history_count, std::chrono::milliseconds history_interval, boost::optional<std::pair<double, double>> location) { return Pointer(new SkyAwareWriter(service, tracker, dir, interval, history_count, history_interval, location)); }

void Start();
void Stop();

private:
SkyviewWriter(boost::asio::io_service &service, flightaware::uat::Tracker::Pointer tracker, const boost::filesystem::path &dir, std::chrono::milliseconds interval, unsigned history_count, std::chrono::milliseconds history_interval, boost::optional<std::pair<double, double>> location) : service_(service), strand_(service), timer_(service), tracker_(tracker), dir_(dir), interval_(interval), history_count_(history_count), history_interval_(history_interval), location_(location) {}
SkyAwareWriter(boost::asio::io_service &service, flightaware::uat::Tracker::Pointer tracker, const boost::filesystem::path &dir, std::chrono::milliseconds interval, unsigned history_count, std::chrono::milliseconds history_interval, boost::optional<std::pair<double, double>> location) : service_(service), strand_(service), timer_(service), tracker_(tracker), dir_(dir), interval_(interval), history_count_(history_count), history_interval_(history_interval), location_(location) {}

void PeriodicWrite();

Expand All @@ -45,6 +45,6 @@ namespace flightaware::skyview {
unsigned next_history_index_ = 0;
std::uint64_t next_history_time_ = 0;
};
} // namespace flightaware::skyview
} // namespace flightaware::skyaware

#endif

0 comments on commit 9461395

Please sign in to comment.