Skip to content

Commit

Permalink
Updated WingBits to config v0.0.4 – resolves #101.
Browse files Browse the repository at this point in the history
  • Loading branch information
Ketil Moland Olsen authored and Ketil Moland Olsen committed May 26, 2024
1 parent 24974df commit 9c29acb
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 10 deletions.
14 changes: 9 additions & 5 deletions wingbits/Dockerfile.template
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,9 @@ ENV WINGBITS_DEVICE_ID=
ENV RECEIVER_HOST=dump1090-fa
ENV RECEIVER_PORT=30005

ARG PERM_INSTALL="curl gettext-base tini"
ENV WINGBITS_CONFIG_VERSION=0.0.4

ARG PERM_INSTALL="curl gettext-base tini ncurses-bin zlib1g"

RUN apt update && \
apt install -y $PERM_INSTALL && \
Expand All @@ -17,8 +19,8 @@ RUN apt update && \

FROM base AS buildstep

ARG READSB_COMMIT=f535e517996ad04ce8126a58757a9b91a82fe542
ARG TEMP_INSTALL="git build-essential debhelper libncurses5-dev zlib1g-dev python3-dev libzstd-dev"
ARG READSB_COMMIT=21353a0d9eeb71f42371e053e0104ee06e21b87c
ARG TEMP_INSTALL="git gcc make libusb-1.0-0-dev ncurses-dev build-essential debhelper libncurses5-dev zlib1g-dev python3-dev libzstd-dev pkg-config"

WORKDIR /tmp

Expand All @@ -27,7 +29,7 @@ RUN apt update && \

WORKDIR /tmp

RUN git clone --single-branch https://github.com/adsb-related-code/readsb && \
RUN git clone --single-branch https://github.com/wiedehopf/readsb.git && \
cd readsb && \
git checkout $READSB_COMMIT && \
make -j3 AIRCRAFT_HASH_BITS=14
Expand All @@ -46,6 +48,8 @@ RUN chmod +x /tmp/wingbits_installer.sh && \
mkdir -p /run/wingbits-feed && \
rm -rf /tmp/*

COPY vector.yaml /etc/vector/vector.yaml
#COPY vector.yaml /etc/vector/vector.yaml
RUN curl -o /etc/vector/vector.yaml https://gitlab.com/wingbits/config/-/raw/$WINGBITS_CONFIG_VERSION/vector.yaml
RUN sed -i 's|DEVICE_ID|WINGBITS_DEVICE_ID|g' /etc/vector/vector.yaml

ENTRYPOINT ["/usr/bin/tini", "--", "/start.sh"]
15 changes: 10 additions & 5 deletions wingbits/vector.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
sources:
readsb:
type: "socket"
address: "127.0.0.1:30006"
address: "0.0.0.0:30006"
mode: "tcp"
decoding:
codec: "json"
Expand All @@ -20,16 +20,21 @@ transforms:
new_event.lon = .lon
new_event.hex = .hex
new_event.flight = if is_null(.flight) { "" } else { .flight }
new_event.device_id = if is_null("${WINGBITS_DEVICE_ID}") { "not set" } else { "${WINGBITS_DEVICE_ID}" }
new_event.device_id = if is_null("${DEVICE_ID}") { "not set" } else { "${DEVICE_ID}" }
new_event.true_heading = if is_null(.track) { 0.0 } else { .track }
new_event.alt_baro = if is_null(.alt_baro) { -2000 } else if .alt_baro == "ground" { -1000 } else { .alt_baro }
new_event.alt_baro = .alt_baro
new_event.category = if is_null(.category) { "" } else { .category }
new_event.alt_geom = .alt_geom
new_event.gs = .gs
new_event.geom_rate = .geom_rate
new_event.on_ground = (.alt_baro == "ground")
new_event.squawk = .squawk
new_event.rssi = .rssi
. = new_event
sinks:
vector:
type: "vector"
inputs:
- "remapped"
address: "feed.wingbits.com:6000"

address: "feed.wingbits.com:6000"s

0 comments on commit 9c29acb

Please sign in to comment.