Skip to content
This repository has been archived by the owner on Aug 1, 2020. It is now read-only.
/ readsb Public archive

Fix build issue #8

Closed
wants to merge 71 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
71 commits
Select commit Hold shift + click to select a range
417aee9
Makefile: don't override the CC definition.
kukabu Jul 28, 2017
196ef89
Cleanup after removed internal webserver code.
kukabu Jul 28, 2017
18b455f
Fix URL.
kukabu Jul 28, 2017
43b0f5a
Merge pull request #13 from kukabu/master
mutability Jul 28, 2017
5676008
Change color for on-the-ground aircraft to brown.
mutability Jul 28, 2017
74c9cb5
Parallelise the history JSON loads for faster initial load times.
daviessm Jul 29, 2017
14bbf09
Fix string concatenation to be addition
daviessm Jul 29, 2017
51e3e1d
Merge pull request #14 from daviessm/html_parallel_history_load
mutability Jul 31, 2017
220bbf5
Fix L2P/L2T icon mappings, remove Dash 8 overrides
mutability Jul 31, 2017
3e207b5
Changelog for 3.5.1
mutability Jul 31, 2017
20c3c4b
Tag & release 3.5.1
mutability Jul 31, 2017
ee7d879
Update OpenLayers to current version. This fixes slowness in certain …
Oct 23, 2017
a38acc3
Update index.html to point to the correct OpenLayers files
Oct 30, 2017
a125155
Merge pull request #19 from drakeapps/master
mutability Nov 1, 2017
d62f4c2
Version bump to 3.5.3~dev
mutability Nov 2, 2017
232a64e
Prepare for 3.5.3 release
mutability Nov 3, 2017
d5eccc3
If we see a bad NIC supplementary bits combination, return RC_UNKNOWN
mutability May 9, 2018
7749316
Fix 10NM Rc value
mutability May 9, 2018
9efd6b3
Mapzen is shutting down, remove the mapzen support
mutability May 9, 2018
084acd2
Remove chartbundle WAC, add helicopter chart.
mutability May 9, 2018
c9e729a
Hide extended data fields by default
mutability May 9, 2018
c9997a7
Also turn on extended data with #extended in the URL
mutability May 9, 2018
f4fa94f
Merge branch 'more_mode_s' into dev
mutability May 9, 2018
fcbf32d
Prepare for 3.6.0 release
mutability May 9, 2018
3340e63
Fix changelog timestamp
mutability May 9, 2018
60c762c
Version bump to 3.6.1~dev.
mutability Jun 12, 2018
9101d50
Generalize prepare-wheezy-tree for other distributions.
mutability Jun 21, 2018
f81044c
Try to dance around the libbladerf version confusion between upstream…
mutability Jun 29, 2018
6e7c32b
Give up on a single control file for jessie+stretch, just handle the …
mutability Jun 29, 2018
39b0084
Disable 7x00 -> emergency status translation.
mutability Jul 6, 2018
fffd3c9
Bump TSV_VERSION due to 7x00 handling change
mutability Jul 10, 2018
655d311
Prepare for 3.6.1 release
mutability Jul 16, 2018
dfdee15
Bump version to 3.6.2~dev
mutability Jul 20, 2018
d3448b0
Update flags for Libya, Serbia, Montenegro
mutability Jul 20, 2018
b82922e
Strip out bad callsigns seen in ADS-B ident messages.
mutability Jul 20, 2018
1caabc5
Update FlightAware registry data export; regenerate json db.
mutability Jul 20, 2018
2b00c05
Add --direct option for rtlsdr direct sampling
mutability Jul 23, 2018
6c055c8
Update aircraft db docs
mutability Jul 24, 2018
41fa394
Merge branch 'direct-sampling' into dev
mutability Jul 24, 2018
20a16d5
Prepare for 3.6.2 release
mutability Jul 27, 2018
3e4012e
SkyView extended mode-s changes
Jul 30, 2018
3298eb7
Add accuracy fields
Jul 31, 2018
0983766
Add close button and airframes.org link
Jul 31, 2018
01a4477
Fix mangled msec part in port 30003 timestamps
mutability Jul 31, 2018
6af6ff7
Fix NAC/NIC/SIL labels and content. Fix airframes padding. Fix info i…
Jul 31, 2018
12151ed
Prevent full page scrolling
Aug 1, 2018
ea7a2c1
Update NAC displays. Add RC
Aug 2, 2018
974e962
C should be subscript for RC. 0 = unknown
Aug 2, 2018
3ec6ec1
Center info icon. Show highlight hover with select box
Aug 3, 2018
540e5f8
Just use ft/m for the Rc display
Aug 3, 2018
71f2c99
Fix air/ground status. Tooltip/infoblock changes
Aug 8, 2018
963cb1a
Add back in photos link. Add more descriptions and remove squawks sec…
Aug 8, 2018
65f44d9
Actually remove the squawks section
Aug 8, 2018
7bb2cfe
Move FlightAware link to the top
Aug 10, 2018
7d61b2a
Add Selected to nav alt/heading. Replace dragger with bar on top
Aug 13, 2018
e0bb6e1
Add registration and source to hover box
Aug 15, 2018
43fedd9
Move registration on hover box. Default to n/a
Aug 15, 2018
4fbb336
Show n/a for aircraft type on info pane
Aug 15, 2018
bf05a94
Show n/a for not known registration
Aug 15, 2018
8985b5a
Version planeObject also
Aug 17, 2018
8eeb29e
Fix typo. Clean up CSS and spacing
Aug 17, 2018
e31bee1
More spacing
Aug 17, 2018
ed23dbd
Merge pull request #21 from drakeapps/master
mutability Aug 17, 2018
7d17d8e
Version bump to 3.6.3~dev
mutability Aug 17, 2018
e2c8d36
Don't copy package-* when preparing source
mutability Aug 21, 2018
f4692a3
Ignore altitude reporting when part of airborne position message with…
Aug 28, 2018
8829b65
Merge pull request #23 from flightaware/ignore_altitude_onGround
mutability Aug 28, 2018
d0cfbdf
Build automation
mutability Aug 28, 2018
2a7a1e1
Prepare for 3.6.3 release
mutability Sep 11, 2018
cdba756
Fix skyview display of geometric altitude
mutability Sep 11, 2018
e52354c
Fix build issue
Urgau Nov 15, 2018
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
46 changes: 46 additions & 0 deletions Jenkinsfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
node(label: 'raspberrypi') {
def dists = ["stretch", "jessie", "wheezy"]
def srcdir = "${WORKSPACE}/src"

stage('Checkout') {
sh "rm -fr ${srcdir}"
sh "mkdir ${srcdir}"
dir(srcdir) {
checkout scm
}
}

for (int i = 0; i < dists.size(); ++i) {
def dist = dists[i]
def pkgdir = "package-${dist}"
def results = "results-${dist}"

stage("Prepare source for ${dist}") {
sh "rm -fr ${pkgdir}"
sh "${srcdir}/prepare-build.sh ${dist} ${pkgdir}"
}

stage("Build for ${dist}") {
sh "rm -fr ${results}"
sh "mkdir -p ${results}"
dir(pkgdir) {
sh "DIST=${dist} pdebuild --use-pdebuild-internal --debbuildopts -b --buildresult ${WORKSPACE}/${results}"
}
archiveArtifacts artifacts: "${results}/*.deb", fingerprint: true
}

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

if (env.BRANCH_NAME == "master" || env.BRANCH_NAME == "dev") {
stage("Deploy to staging repo") {
for (int i = 0; i < dists.size(); ++i) {
def dist = dists[i]
def results = "results-${dist}"
sh "/build/repo/deploy-packages.sh ${dist} ${results}/*.deb"
}
}
}
}
5 changes: 0 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,8 @@ PROGNAME=dump1090
RTLSDR ?= yes
BLADERF ?= yes

CC=gcc
CPPFLAGS += -DMODES_DUMP1090_VERSION=\"$(DUMP1090_VERSION)\" -DMODES_DUMP1090_VARIANT=\"dump1090-fa\"

ifneq ($(HTMLPATH),"")
CPPFLAGS += -DHTMLPATH=\"$(HTMLPATH)\"
endif

DIALECT = -std=c11
CFLAGS += $(DIALECT) -O2 -g -Wall -Werror -W -D_DEFAULT_SOURCE
LIBS = -lpthread -lm -lrt
Expand Down
2 changes: 1 addition & 1 deletion comm_b.c
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,7 @@ static int decodeBDS20(struct modesMessage *mm, bool store)

if (store) {
mm->commb_format = COMMB_AIRCRAFT_IDENT;
memcpy(mm->callsign, callsign, sizeof(mm->callsign));
memcpy(mm->callsign, callsign, sizeof(callsign));
mm->callsign_valid = 1;
}

Expand Down
6 changes: 3 additions & 3 deletions debian-wheezy/control
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ Priority: extra
Maintainer: Oliver Jowett <[email protected]>
Build-Depends: debhelper(>=9), libusb-1.0-0-dev, pkg-config, cmake, libncurses5-dev
Standards-Version: 3.9.3
Homepage: https:https://github.com/mutability/dump1090
Vcs-Git: https://github.com/mutability/dump1090.git
Homepage: http:https://www.flightaware.com/
Vcs-Git: https://github.com/flightaware/dump1090.git

Package: dump1090
Architecture: all
Expand All @@ -26,5 +26,5 @@ Description: ADS-B Ground Station System for RTL-SDR
Networked Aviation Mode S / ADS-B decoder/translator with RTL-SDR software
defined radio USB device support.
.
This is FlightAware's packaging of dump1090-mutability, customized for use
This is FlightAware's fork of dump1090-mutability, customized for use
in the PiAware sdcard images.
2 changes: 1 addition & 1 deletion debian-wheezy/rules
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ install_rtlsdr:
cd rtl-sdr-build && cmake ../rtl-sdr -DCMAKE_INSTALL_PREFIX=./install && make install

override_dh_auto_build: install_rtlsdr
dh_auto_build -- RTLSDR=yes BLADERF=no DIALECT=-std=gnu1x HTMLPATH=/usr/share/$(SRCNAME)/html DUMP1090_VERSION=$(DUMP1090_VERSION) STATIC=yes RTLSDR_PREFIX=rtl-sdr-build/install
dh_auto_build -- RTLSDR=yes BLADERF=no DIALECT=-std=gnu1x DUMP1090_VERSION=$(DUMP1090_VERSION) STATIC=yes RTLSDR_PREFIX=rtl-sdr-build/install

override_dh_auto_test:
dh_auto_test -- DIALECT=-std=gnu1x
Expand Down
69 changes: 66 additions & 3 deletions debian/changelog
Original file line number Diff line number Diff line change
@@ -1,8 +1,71 @@
dump1090-fa (3.6.0~dev) UNRELEASED; urgency=medium
dump1090-fa (3.6.3) stable; urgency=medium

* In development
* Fix port 30003 output (Basestation) timestamp formatting broken in 3.6.0
* Ignore altitudes in DF17 "airborne" positions with airGround = ground
* SkyView layout change and proper support for extended data fields

-- Oliver Jowett <[email protected]> Mon, 19 Jun 2017 11:11:59 -0500
-- Oliver Jowett <[email protected]> Tue, 11 Sep 2018 14:52:20 +0100

dump1090-fa (3.6.2) stable; urgency=medium

* Update SkyView flags for Libya, Serbia, Montenegro
* Improve handling of bad callsigns in ADS-B messages
* Update FlightAware aircraft static data export
* Add --direct option to enable rtlsdr direct sampling mode

-- Oliver Jowett <[email protected]> Fri, 27 Jul 2018 18:32:30 +0100

dump1090-fa (3.6.1) stable; urgency=medium

* Fix tracking of NICbaro
* Don't translate 7x00 to emergency status, it obscures the source of the
data (squawk vs ADS-B v2)
* Support for building on stretch

-- Oliver Jowett <[email protected]> Mon, 16 Jul 2018 14:58:59 +0100

dump1090-fa (3.6.0) stable; urgency=medium

* dump1090: implement speculative decoding for Comm-B messages, capturing
most of the Mode S EHS data:
BDS 1,0 (datalink capabilities); BDS 1,7 (GICB capabilities);
BDS 2,0 (aircraft identification); BDS 3,0 (ACAS RA);
BDS 4,0 (vertical intention); BDS 5,0 (track and turn);
BDS 6,0 (heading and speed)
* dump1090: implement decoding of most of DO-260A/DO-260B including
ADS-B version, autopilot settings, NIC/Rc, NAC, SIL, GVA, etc.
* dump1090: aircraft state tracking overhaul; track data age in milliseconds
* dump1090: emit newly decoded fields in aircraft.json
* Skyview: experimental display of new fields, disabled by default; to
enable, set ExtendedData = true in config.js or add #extended to the URL
* Skyview: Remove obsolete chartbundle WAC layer, add heli layer
* Skyview: Remove Mapzen layer as Mapzen is shutting down
* faup1090: Restructure emitted data to include data age and source
* faup1090: Include newly decoded fields in reports
* dump1090, faup1090: fix use of snprintf to correctly handle buffer overruns
* dump1090: don't bother tracking ICAO 000000

-- Oliver Jowett <[email protected]> Wed, 09 May 2018 22:34:24 +0100

dump1090-fa (3.5.3) stable; urgency=medium

* Skip 3.5.2 to align with piaware versioning
* Skyview: Update OpenLayers to fix performance problems on some browsers

-- Oliver Jowett <[email protected]> Fri, 03 Nov 2017 22:44:40 +0000

dump1090-fa (3.5.1) stable; urgency=medium

* Skyview: fix font mappings
* Skyview: mark tisb_icao and tisb_other addresses as TIS-B
* Skyview: fix unit selection on Firefox
* Skyview: report data source correctly in popup
* Skyview: change default color for grounded aircraft to brown
* Skyview: initial history load speedups (Steven Davies)
* Skyview: fix L2T/L2P icon selection
* Makefile cleanups (Michael Tatarinov)

-- Oliver Jowett <[email protected]> Mon, 31 Jul 2017 13:43:32 +0100

dump1090-fa (3.5.0) stable; urgency=medium

Expand Down
8 changes: 4 additions & 4 deletions debian/control
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ Priority: extra
Maintainer: Oliver Jowett <[email protected]>
Build-Depends: debhelper(>=9), librtlsdr-dev, libusb-1.0-0-dev, pkg-config, dh-systemd, libncurses5-dev, libbladerf-dev
Standards-Version: 3.9.3
Homepage: https:https://github.com/mutability/dump1090
Vcs-Git: https://github.com/mutability/dump1090.git
Homepage: http:https://www.flightaware.com/
Vcs-Git: https://github.com/flightaware/dump1090.git

Package: dump1090
Architecture: all
Expand All @@ -19,12 +19,12 @@ Description: transitional dummy package for dump1090

Package: dump1090-fa
Architecture: any
Depends: ${shlibs:Depends}, ${misc:Depends}, libbladerf1(>=2016.06), libbladerf-udev, adduser, lighttpd
Depends: ${shlibs:Depends}, ${misc:Depends}, libbladerf1 (>= 0.2016.06), adduser, lighttpd
Replaces: dump1090 (<< 3.0)
Breaks: dump1090 (<< 3.0)
Description: ADS-B Ground Station System for RTL-SDR
Networked Aviation Mode S / ADS-B decoder/translator with RTL-SDR software
defined radio USB device support.
.
This is FlightAware's packaging of dump1090-mutability, customized for use
This is FlightAware's fork of dump1090-mutability, customized for use
in the PiAware sdcard images.
2 changes: 1 addition & 1 deletion debian/rules
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ ifeq ($(DEB_HOST_ARCH),armhf)
endif

override_dh_auto_build:
dh_auto_build -- RTLSDR=yes BLADERF=yes HTMLPATH=/usr/share/$(DEB_SOURCE)/html DUMP1090_VERSION=$(DEB_VERSION)
dh_auto_build -- RTLSDR=yes BLADERF=yes DUMP1090_VERSION=$(DEB_VERSION)

override_dh_install:
dh_install
Expand Down
4 changes: 0 additions & 4 deletions dump1090.c
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,6 @@ void modesInitConfig(void) {
Modes.net_input_beast_ports = strdup("30004,30104");
Modes.net_output_beast_ports = strdup("30005");
Modes.interactive_display_ttl = MODES_INTERACTIVE_DISPLAY_TTL;
Modes.html_dir = HTMLPATH;
Modes.json_interval = 1000;
Modes.json_location_accuracy = 1;
Modes.maxRange = 1852 * 300; // 300NM default max range
Expand Down Expand Up @@ -329,7 +328,6 @@ void showHelp(void) {
"--debug <flags> Debug mode (verbose), see README for details\n"
"--quiet Disable output to stdout. Use for daemon applications\n"
"--show-only <addr> Show only messages from the given ICAO on stdout\n"
"--html-dir <dir> Use <dir> as base directory for the internal HTTP server. Defaults to " HTMLPATH "\n"
"--write-json <dir> Periodically write json output to <dir> (for serving by a separate webserver)\n"
"--write-json-every <t> Write json output every t seconds (default 1)\n"
"--json-location-accuracy <n> Accuracy of receiver location in json metadata: 0=no location, 1=approximate, 2=exact\n"
Expand Down Expand Up @@ -605,8 +603,6 @@ int main(int argc, char **argv) {
Modes.mlat = 1;
} else if (!strcmp(argv[j],"--oversample")) {
// Ignored
} else if (!strcmp(argv[j], "--html-dir") && more) {
Modes.html_dir = strdup(argv[++j]);
#ifndef _WIN32
} else if (!strcmp(argv[j], "--write-json") && more) {
Modes.json_dir = strdup(argv[++j]);
Expand Down
5 changes: 0 additions & 5 deletions dump1090.h
Original file line number Diff line number Diff line change
Expand Up @@ -250,10 +250,6 @@ typedef enum {
#define MODES_NET_SNDBUF_SIZE (1024*64)
#define MODES_NET_SNDBUF_MAX (7)

#ifndef HTMLPATH
#define HTMLPATH "./public_html" // default path for gmap.html etc
#endif

#define HISTORY_SIZE 120
#define HISTORY_INTERVAL 30000

Expand Down Expand Up @@ -366,7 +362,6 @@ struct { // Internal state
int mlat; // Use Beast ascii format for raw data output, i.e. @...; iso *...;
char *json_dir; // Path to json base directory, or NULL not to write json.
uint64_t json_interval; // Interval between rewriting the json aircraft file, in milliseconds; also the advertised map refresh interval
char *html_dir; // Path to www base directory.
int json_location_accuracy; // Accuracy of location metadata: 0=none, 1=approx, 2=exact

int json_aircraft_history_next;
Expand Down
18 changes: 13 additions & 5 deletions mode_s.c
Original file line number Diff line number Diff line change
Expand Up @@ -716,10 +716,18 @@ static void decodeESIdentAndCategory(struct modesMessage *mm)
mm->callsign[6] = ais_charset[getbits(me, 45, 50)];
mm->callsign[7] = ais_charset[getbits(me, 51, 56)];
mm->callsign[8] = 0;

// A common failure mode seems to be to intermittently send
// all zeros. Catch that here.
mm->callsign_valid = (strcmp(mm->callsign, "@@@@@@@@") != 0);
mm->callsign_valid = 1;

// actually valid?
for (unsigned i = 0; i < 8; ++i) {
if (!(mm->callsign[i] >= 'A' && mm->callsign[i] <= 'Z') &&
!(mm->callsign[i] >= '0' && mm->callsign[i] <= '9') &&
mm->callsign[i] != ' ') {
// Bad callsign, ignore it
mm->callsign_valid = 0;
break;
}
}

mm->category = ((0x0E - mm->metype) << 4) | mm->mesub;
mm->category_valid = 1;
Expand Down Expand Up @@ -966,7 +974,7 @@ static void decodeESAirbornePosition(struct modesMessage *mm, int check_imf)
}
}

if (AC12Field) {// Only attempt to decode if a valid (non zero) altitude is present
if (AC12Field && mm->airground != AG_GROUND) {// Only attempt to decode if a valid (non zero) altitude is present and not on ground
altitude_unit_t unit;
int alt = decodeAC12Field(AC12Field, &unit);
if (alt != INVALID_ALTITUDE) {
Expand Down
4 changes: 2 additions & 2 deletions net_io.c
Original file line number Diff line number Diff line change
Expand Up @@ -571,7 +571,7 @@ static void modesSendSBSOutput(struct modesMessage *mm, struct aircraft *a) {

// Fields 7 & 8 are the message reception time and date
p += sprintf(p, "%04d/%02d/%02d,", (stTime_receive.tm_year+1900),(stTime_receive.tm_mon+1), stTime_receive.tm_mday);
p += sprintf(p, "%02d:%02d:%02d.%03u,", stTime_receive.tm_hour, stTime_receive.tm_min, stTime_receive.tm_sec, (unsigned) (mm->sysTimestampMsg / 1000));
p += sprintf(p, "%02d:%02d:%02d.%03u,", stTime_receive.tm_hour, stTime_receive.tm_min, stTime_receive.tm_sec, (unsigned) (mm->sysTimestampMsg % 1000));

// Fields 9 & 10 are the current time and date
p += sprintf(p, "%04d/%02d/%02d,", (stTime_now.tm_year+1900),(stTime_now.tm_mon+1), stTime_now.tm_mday);
Expand Down Expand Up @@ -1863,7 +1863,7 @@ __attribute__ ((format (printf,4,5))) static char *appendFATSV(char *p, char *en
}

#define TSV_MAX_PACKET_SIZE 600
#define TSV_VERSION 2
#define TSV_VERSION 3

void writeFATSVHeader()
{
Expand Down
62 changes: 62 additions & 0 deletions prepare-build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
#!/bin/sh

# This script prepares a package tree for building on different target
# distributions

if [ $# -lt 1 ]
then
echo "Syntax: $0 <distribution> [target]" >&2
echo "" >&2
echo "Prepares a package tree in <target> (default package-<distribution>) ready for building" >&2
exit 1
fi

export DEBFULLNAME=${DEBFULLNAME:-FlightAware build automation}
export DEBEMAIL=${DEBEMAIL:[email protected]}

TOP=`dirname $0`
DIST=$1
OUT=$2

if [ -n "$OUT" ]
then
OUT=$(realpath $OUT)
else
OUT=$(realpath package-$DIST)
fi

if [ -e $OUT ]
then
echo "$OUT already exists, refusing to overwrite it" >&2
exit 1
fi

FILES=$(find $TOP -mindepth 1 -maxdepth 1 -name .git -prune -o -name 'debian*' -prune -o -name 'package-*' -prune -o -print)
mkdir -p $OUT
cp -a $FILES $OUT
cp -a $TOP/debian $OUT

case "$DIST" in
wheezy)
cp -a $TOP/debian-wheezy/* $OUT/debian/
echo "Updating changelog for wheezy backport build" >&2
dch --changelog $OUT/debian/changelog --local ~bpo7+ --force-distribution --distribution wheezy-backports "Automated backport build for wheezy"
echo "Cloning rtl-sdr source"
git clone git:https://git.osmocom.org/rtl-sdr.git $OUT/rtl-sdr
;;

jessie)
cp -a $TOP/debian-jessie/* $OUT/debian/
echo "Updating changelog for jessie backport build" >&2
dch --changelog $OUT/debian/changelog --local ~bpo8+ --force-distribution --distribution jessie-backports "Automated backport build for jessie"
;;

stretch)
;;

*)
echo "Don't know how to build for a distribution named $DIST" >&2
exit 1
esac

echo "Package tree prepared in $OUT" >&2
23 changes: 0 additions & 23 deletions prepare-wheezy-tree.sh

This file was deleted.

Loading