dump1090.h
Go to the documentation of this file.
1 // dump1090, a Mode S messages decoder for RTLSDR devices.
2 //
3 // Copyright (C) 2012 by Salvatore Sanfilippo <antirez@gmail.com>
4 //
5 // All rights reserved.
6 //
7 // Redistribution and use in source and binary forms, with or without
8 // modification, are permitted provided that the following conditions are
9 // met:
10 //
11 // * Redistributions of source code must retain the above copyright
12 // notice, this list of conditions and the following disclaimer.
13 //
14 // * Redistributions in binary form must reproduce the above copyright
15 // notice, this list of conditions and the following disclaimer in the
16 // documentation and/or other materials provided with the distribution.
17 //
18 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
19 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
20 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
21 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
22 // HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
23 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
24 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
25 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
26 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
28 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 //
30 #ifndef __DUMP1090_H
31 #define __DUMP1090_H
32 
33 // File Version number
34 // ====================
35 // Format is : MajorVer.MinorVer.DayMonth.Year"
36 // MajorVer changes only with significant changes
37 // MinorVer changes when additional features are added, but not for bug fixes (range 00-99)
38 // DayDate & Year changes for all changes, including for bug fixes. It represent the release date of the update
39 //
40 #define MODES_DUMP1090_VERSION "1.07.0710.13"
41 
42 // ============================= Include files ==========================
43 
44 #ifndef _WIN32
45  #include <stdio.h>
46  #include <string.h>
47  #include <stdlib.h>
48  #include <pthread.h>
49  #include <stdint.h>
50  #include <errno.h>
51  #include <unistd.h>
52  #include <math.h>
53  #include <sys/time.h>
54  #include <sys/timeb.h>
55  #include <signal.h>
56  #include <fcntl.h>
57  #include <ctype.h>
58  #include <sys/stat.h>
59  #include "rtl-sdr.h"
60  #include "anet.h"
61 #else
62  #include "winstubs.h" //Put everything Windows specific in here
63  #include "rtl-sdr.h"
64 #endif
65 
66 // ============================= #defines ===============================
67 //
68 // If you have a valid coaa.h, these values will come from it. If not,
69 // then you can enter your own values in the #else section here
70 //
71 #ifdef USER_LATITUDE
72  #define MODES_USER_LATITUDE_DFLT (USER_LATITUDE)
73  #define MODES_USER_LONGITUDE_DFLT (USER_LONGITUDE)
74 #else
75  #define MODES_USER_LATITUDE_DFLT (-35.108405932)
76  #define MODES_USER_LONGITUDE_DFLT (-69.533337772)
77 #endif
78 
79 #define MODES_DEFAULT_RATE 2000000
80 #define MODES_DEFAULT_FREQ 1090000000
81 #define MODES_DEFAULT_WIDTH 1000
82 #define MODES_DEFAULT_HEIGHT 700
83 #define MODES_ASYNC_BUF_NUMBER 12
84 #define MODES_ASYNC_BUF_SIZE (16*16384) // 256k
85 #define MODES_ASYNC_BUF_SAMPLES (MODES_ASYNC_BUF_SIZE / 2) // Each sample is 2 bytes
86 #define MODES_AUTO_GAIN -100 // Use automatic gain
87 #define MODES_MAX_GAIN 999999 // Use max available gain
88 #define MODES_MSG_SQUELCH_LEVEL 0x02FF // Average signal strength limit
89 #define MODES_MSG_ENCODER_ERRS 3 // Maximum number of encoding errors
90 
91 // When changing, change also fixBitErrors() and modesInitErrorTable() !!
92 #define MODES_MAX_BITERRORS 2 // Global max for fixable bit erros
93 
94 #define MODEAC_MSG_SAMPLES (25 * 2) // include up to the SPI bit
95 #define MODEAC_MSG_BYTES 2
96 #define MODEAC_MSG_SQUELCH_LEVEL 0x07FF // Average signal strength limit
97 #define MODEAC_MSG_FLAG (1<<0)
98 #define MODEAC_MSG_MODES_HIT (1<<1)
99 #define MODEAC_MSG_MODEA_HIT (1<<2)
100 #define MODEAC_MSG_MODEC_HIT (1<<3)
101 #define MODEAC_MSG_MODEA_ONLY (1<<4)
102 #define MODEAC_MSG_MODEC_OLD (1<<5)
103 
104 #define MODES_PREAMBLE_US 8 // microseconds = bits
105 #define MODES_PREAMBLE_SAMPLES (MODES_PREAMBLE_US * 2)
106 #define MODES_PREAMBLE_SIZE (MODES_PREAMBLE_SAMPLES * sizeof(uint16_t))
107 #define MODES_LONG_MSG_BYTES 14
108 #define MODES_SHORT_MSG_BYTES 7
109 #define MODES_LONG_MSG_BITS (MODES_LONG_MSG_BYTES * 8)
110 #define MODES_SHORT_MSG_BITS (MODES_SHORT_MSG_BYTES * 8)
111 #define MODES_LONG_MSG_SAMPLES (MODES_LONG_MSG_BITS * 2)
112 #define MODES_SHORT_MSG_SAMPLES (MODES_SHORT_MSG_BITS * 2)
113 #define MODES_LONG_MSG_SIZE (MODES_LONG_MSG_SAMPLES * sizeof(uint16_t))
114 #define MODES_SHORT_MSG_SIZE (MODES_SHORT_MSG_SAMPLES * sizeof(uint16_t))
115 
116 #define MODES_RAWOUT_BUF_SIZE (1500)
117 #define MODES_RAWOUT_BUF_FLUSH (MODES_RAWOUT_BUF_SIZE - 200)
118 #define MODES_RAWOUT_BUF_RATE (1000) // 1000 * 64mS = 1 Min approx
119 
120 #define MODES_ICAO_CACHE_LEN 1024 // Power of two required
121 #define MODES_ICAO_CACHE_TTL 60 // Time to live of cached addresses
122 #define MODES_UNIT_FEET 0
123 #define MODES_UNIT_METERS 1
124 
125 #define MODES_USER_LATLON_VALID (1<<0)
126 
127 #define MODES_ACFLAGS_LATLON_VALID (1<<0) // Aircraft Lat/Lon is decoded
128 #define MODES_ACFLAGS_ALTITUDE_VALID (1<<1) // Aircraft altitude is known
129 #define MODES_ACFLAGS_HEADING_VALID (1<<2) // Aircraft heading is known
130 #define MODES_ACFLAGS_SPEED_VALID (1<<3) // Aircraft speed is known
131 #define MODES_ACFLAGS_VERTRATE_VALID (1<<4) // Aircraft vertical rate is known
132 #define MODES_ACFLAGS_SQUAWK_VALID (1<<5) // Aircraft Mode A Squawk is known
133 #define MODES_ACFLAGS_CALLSIGN_VALID (1<<6) // Aircraft Callsign Identity
134 #define MODES_ACFLAGS_EWSPEED_VALID (1<<7) // Aircraft East West Speed is known
135 #define MODES_ACFLAGS_NSSPEED_VALID (1<<8) // Aircraft North South Speed is known
136 #define MODES_ACFLAGS_AOG (1<<9) // Aircraft is On the Ground
137 #define MODES_ACFLAGS_LLEVEN_VALID (1<<10) // Aircraft Even Lot/Lon is known
138 #define MODES_ACFLAGS_LLODD_VALID (1<<11) // Aircraft Odd Lot/Lon is known
139 #define MODES_ACFLAGS_AOG_VALID (1<<12) // MODES_ACFLAGS_AOG is valid
140 #define MODES_ACFLAGS_FS_VALID (1<<13) // Aircraft Flight Status is known
141 #define MODES_ACFLAGS_NSEWSPD_VALID (1<<14) // Aircraft EW and NS Speed is known
142 #define MODES_ACFLAGS_LATLON_REL_OK (1<<15) // Indicates it's OK to do a relative CPR
143 
144 #define MODES_ACFLAGS_LLEITHER_VALID (MODES_ACFLAGS_LLEVEN_VALID | MODES_ACFLAGS_LLODD_VALID)
145 #define MODES_ACFLAGS_LLBOTH_VALID (MODES_ACFLAGS_LLEVEN_VALID | MODES_ACFLAGS_LLODD_VALID)
146 #define MODES_ACFLAGS_AOG_GROUND (MODES_ACFLAGS_AOG_VALID | MODES_ACFLAGS_AOG)
147 
148 #define MODES_DEBUG_DEMOD (1<<0)
149 #define MODES_DEBUG_DEMODERR (1<<1)
150 #define MODES_DEBUG_BADCRC (1<<2)
151 #define MODES_DEBUG_GOODCRC (1<<3)
152 #define MODES_DEBUG_NOPREAMBLE (1<<4)
153 #define MODES_DEBUG_NET (1<<5)
154 #define MODES_DEBUG_JS (1<<6)
155 
156 // When debug is set to MODES_DEBUG_NOPREAMBLE, the first sample must be
157 // at least greater than a given level for us to dump the signal.
158 #define MODES_DEBUG_NOPREAMBLE_LEVEL 25
159 
160 #define MODES_INTERACTIVE_REFRESH_TIME 250 // Milliseconds
161 #define MODES_INTERACTIVE_ROWS 22 // Rows on screen
162 #define MODES_INTERACTIVE_DELETE_TTL 300 // Delete from the list after 300 seconds
163 #define MODES_INTERACTIVE_DISPLAY_TTL 60 // Delete from display after 60 seconds
164 
165 #define MODES_NET_MAX_FD 1024
166 #define MODES_NET_INPUT_RAW_PORT 30001
167 #define MODES_NET_OUTPUT_RAW_PORT 30002
168 #define MODES_NET_OUTPUT_SBS_PORT 30003
169 #define MODES_NET_INPUT_BEAST_PORT 30004
170 #define MODES_NET_OUTPUT_BEAST_PORT 30005
171 #define MODES_NET_HTTP_PORT 8080
172 #define MODES_CLIENT_BUF_SIZE 1024
173 #define MODES_NET_SNDBUF_SIZE (1024*64)
174 
175 #ifndef HTMLPATH
176 #define HTMLPATH "./public_html" // default path for gmap.html etc
177 #endif
178 
179 #define MODES_NOTUSED(V) ((void) V)
180 
181 //======================== structure declarations =========================
182 
183 // Structure used to describe a networking client
184 struct client {
185  int fd; // File descriptor
186  int service; // TCP port the client is connected to
187  int buflen; // Amount of data on buffer
188  char buf[MODES_CLIENT_BUF_SIZE+1]; // Read buffer
189 };
190 
191 // Structure used to describe an aircraft in iteractive mode
192 struct aircraft {
193  uint32_t addr; // ICAO address
194  char flight[16]; // Flight number
195  unsigned char signalLevel[8]; // Last 8 Signal Amplitudes
196  int altitude; // Altitude
197  int speed; // Velocity
198  int track; // Angle of flight
199  int vert_rate; // Vertical rate.
200  time_t seen; // Time at which the last packet was received
201  time_t seenLatLon; // Time at which the last lat long was calculated
202  uint64_t timestamp; // Timestamp at which the last packet was received
203  uint64_t timestampLatLon;// Timestamp at which the last lat long was calculated
204  long messages; // Number of Mode S messages received
205  int modeA; // Squawk
206  int modeC; // Altitude
207  long modeAcount; // Mode A Squawk hit Count
208  long modeCcount; // Mode C Altitude hit Count
209  int modeACflags; // Flags for mode A/C recognition
210 
211  // Encoded latitude and longitude as extracted by odd and even CPR encoded messages
216  uint64_t odd_cprtime;
217  uint64_t even_cprtime;
218  double lat, lon; // Coordinated obtained from CPR encoded data
219  int bFlags; // Flags related to valid fields in this structure
220  struct aircraft *next; // Next aircraft in our linked list
221 };
222 
223 // Program global state
224 struct { // Internal state
225  pthread_t reader_thread;
226  pthread_mutex_t data_mutex; // Mutex to synchronize buffer access
227  pthread_cond_t data_cond; // Conditional variable associated
228  uint16_t *data; // Raw IQ samples buffer
229  uint16_t *magnitude; // Magnitude vector
230  struct timeb stSystemTimeRTL; // System time when RTL passed us the Latest block
231  uint64_t timestampBlk; // Timestamp of the start of the current block
232  struct timeb stSystemTimeBlk; // System time when RTL passed us currently processing this block
233  int fd; // --ifile option file descriptor
234  int data_ready; // Data ready to be processed
235  uint32_t *icao_cache; // Recently seen ICAO addresses cache
236  uint16_t *maglut; // I/Q -> Magnitude lookup table
237  int exit; // Exit from the main loop when true
238 
239  // RTLSDR
241  int gain;
243  rtlsdr_dev_t *dev;
244  int freq;
246 
247  // Networking
249  struct client *clients[MODES_NET_MAX_FD]; // Our clients
250  int maxfd; // Greatest fd currently active
251  int sbsos; // SBS output listening socket
252  int ros; // Raw output listening socket
253  int ris; // Raw input listening socket
254  int bos; // Beast output listening socket
255  int bis; // Beast input listening socket
256  int https; // HTTP listening socket
257  char *rawOut; // Buffer for building raw output data
258  int rawOutUsed; // How much of the buffer is currently used
259  char *beastOut; // Buffer for building beast output data
260  int beastOutUsed; // How much if the buffer is currently used
261 #ifdef _WIN32
262  WSADATA wsaData; // Windows socket initialisation
263 #endif
264 
265  // Configuration
266  char *filename; // Input form file, --ifile option
267  int phase_enhance; // Enable phase enhancement if true
268  int nfix_crc; // Number of crc bit error(s) to correct
269  int check_crc; // Only display messages with good CRC
270  int raw; // Raw output format
271  int print_timestamp; // Add a timestamp to raw output
272  int aera; // Port to send azimuth/zenith to T3Maker / creates logfiles with long/lat
273  char *aera_net; // Host of T3Maker
274  int beast; // Beast binary format output
275  int mode_ac; // Enable decoding of SSR Modes A & C
276  int debug; // Debugging mode
277  int net; // Enable networking
278  int net_only; // Enable just networking
279  int net_output_sbs_port; // SBS output TCP port
280  int net_output_raw_size; // Minimum Size of the output raw data
281  int net_output_raw_rate; // Rate (in 64mS increments) of output raw data
282  int net_output_raw_rate_count; // Rate (in 64mS increments) of output raw data
283  int net_output_raw_port; // Raw output TCP port
284  int net_input_raw_port; // Raw input TCP port
285  int net_output_beast_port; // Beast output TCP port
286  int net_input_beast_port; // Beast input TCP port
287  int net_http_port; // HTTP port
288  int quiet; // Suppress stdout
289  int interactive; // Interactive mode
290  int interactive_rows; // Interactive mode: max number of rows
291  int interactive_display_ttl; // Interactive mode: TTL display
292  int interactive_delete_ttl; // Interactive mode: TTL before deletion
293  int stats; // Print stats at exit in --ifile mode
294  int onlyaddr; // Print only ICAO addresses
295  int metric; // Use metric units
296  int mlat; // Use Beast ascii format for raw data output, i.e. @...; iso *...;
297  int interactive_rtl1090; // flight table in interactive mode is formatted like RTL1090
298 
299  // User details
300  double fUserLat; // Users receiver/antenna lat/lon needed for initial surface location
301  double fUserLon; // Users receiver/antenna lat/lon needed for initial surface location
302  int bUserFlags; // Flags relating to the user details
303 
304  // Interactive mode
306  uint64_t interactive_last_update; // Last screen update in milliseconds
307 
308  // Statistics
309  unsigned int stat_valid_preamble;
310  unsigned int stat_demodulated0;
311  unsigned int stat_demodulated1;
312  unsigned int stat_demodulated2;
313  unsigned int stat_demodulated3;
314  unsigned int stat_goodcrc;
315  unsigned int stat_badcrc;
316  unsigned int stat_fixed;
317 
318  // Histogram of fixed bit errors: index 0 for single bit erros,
319  // index 1 for double bit errors etc.
321 
322  unsigned int stat_http_requests;
323  unsigned int stat_sbs_connections;
324  unsigned int stat_raw_connections;
326  unsigned int stat_out_of_phase;
327  unsigned int stat_ph_demodulated0;
328  unsigned int stat_ph_demodulated1;
329  unsigned int stat_ph_demodulated2;
330  unsigned int stat_ph_demodulated3;
331  unsigned int stat_ph_goodcrc;
332  unsigned int stat_ph_badcrc;
333  unsigned int stat_ph_fixed;
334  // Histogram of fixed bit errors: index 0 for single bit erros,
335  // index 1 for double bit errors etc.
337 
338  unsigned int stat_DF_Len_Corrected;
340  unsigned int stat_ModeAC;
341 } Modes;
342 
343 // The struct we use to store information about a decoded message.
344 struct modesMessage {
345  // Generic fields
346  unsigned char msg[MODES_LONG_MSG_BYTES]; // Binary message.
347  int msgbits; // Number of bits in message
348  int msgtype; // Downlink format #
349  int crcok; // True if CRC was valid
350  uint32_t crc; // Message CRC
351  int correctedbits; // No. of bits corrected
352  char corrected[MODES_MAX_BITERRORS]; // corrected bit positions
353  uint32_t addr; // ICAO Address from bytes 1 2 and 3
354  int phase_corrected; // True if phase correction was applied
355  uint64_t timestampMsg; // Timestamp of the message
356  int remote; // If set this message is from a remote station
357  unsigned char signalLevel; // Signal Amplitude
358 
359  // DF 11
360  int ca; // Responder capabilities
361  int iid;
362 
363  // DF 17, DF 18
364  int metype; // Extended squitter message type.
365  int mesub; // Extended squitter message subtype.
366  int heading; // Reported by aircraft, or computed from from EW and NS velocity
367  int raw_latitude; // Non decoded latitude.
368  int raw_longitude; // Non decoded longitude.
369  double fLat; // Coordinates obtained from CPR encoded data if/when decoded
370  double fLon; // Coordinates obtained from CPR encoded data if/when decoded
371  char flight[16]; // 8 chars flight number.
372  int ew_velocity; // E/W velocity.
373  int ns_velocity; // N/S velocity.
374  int vert_rate; // Vertical rate.
375  int velocity; // Reported by aircraft, or computed from from EW and NS velocity
376 
377  // DF4, DF5, DF20, DF21
378  int fs; // Flight status for DF4,5,20,21
379  int modeA; // 13 bits identity (Squawk).
380 
381  // Fields used by multiple message types.
382  int altitude;
383  int unit;
384  int bFlags; // Flags related to fields in this structure
385 };
386 
387 // ======================== function declarations =========================
388 
389 #ifdef __cplusplus
390 extern "C" {
391 #endif
392 
393 //
394 // Functions exported from mode_ac.c
395 //
396 int detectModeA (uint16_t *m, struct modesMessage *mm);
397 void decodeModeAMessage(struct modesMessage *mm, int ModeA);
398 int ModeAToModeC (unsigned int ModeA);
399 
400 //
401 // Functions exported from mode_s.c
402 //
403 void detectModeS (uint16_t *m, uint32_t mlen);
404 void decodeModesMessage (struct modesMessage *mm, unsigned char *msg);
405 void displayModesMessage(struct modesMessage *mm);
406 void useModesMessage (struct modesMessage *mm);
408 void decodeCPR (struct aircraft *a, int fflag, int surface);
409 int decodeCPRrelative (struct aircraft *a, int fflag, int surface);
410 void modesInitErrorInfo ();
411 //
412 // Functions exported from interactive.c
413 //
414 struct aircraft* interactiveReceiveData(struct modesMessage *mm);
415 void interactiveShowData(void);
417 int decodeBinMessage (struct client *c, char *p);
418 
419 //
420 // Functions exported from net_io.c
421 //
422 void modesInitNet (void);
423 void modesReadFromClients (void);
424 void modesSendAllClients (int service, void *msg, int len);
425 void modesQueueOutput (struct modesMessage *mm);
426 void modesReadFromClient(struct client *c, char *sep, int(*handler)(struct client *, char *));
427 
428 #ifdef __cplusplus
429 }
430 #endif
431 
432 #endif // __DUMP1090_H
int ModeAToModeC(unsigned int ModeA)
Definition: mode_ac.c:319
long messages
Definition: dump1090.h:204
int interactive_rtl1090
Definition: dump1090.h:297
uint32_t * icao_cache
Definition: dump1090.h:235
void interactiveRemoveStaleAircrafts(void)
Definition: interactive.c:446
int modeC
Definition: dump1090.h:206
int modeA
Definition: dump1090.h:205
unsigned int stat_ModeAC
Definition: dump1090.h:340
unsigned int stat_raw_connections
Definition: dump1090.h:324
int detectModeA(uint16_t *m, struct modesMessage *mm)
Definition: mode_ac.c:135
constexpr double mm
Definition: AugerUnits.h:113
int phase_corrected
Definition: dump1090.h:354
void decodeModesMessage(struct modesMessage *mm, unsigned char *msg)
Definition: mode_s.c:819
unsigned int stat_ph_goodcrc
Definition: dump1090.h:331
char buf[1024+1]
Definition: dump1090.h:188
int raw
Definition: dump1090.h:270
void detectModeS(uint16_t *m, uint32_t mlen)
Definition: mode_s.c:1466
int track
Definition: dump1090.h:198
uint64_t even_cprtime
Definition: dump1090.h:217
int bUserFlags
Definition: dump1090.h:302
int data_ready
Definition: dump1090.h:234
uint32_t addr
Definition: dump1090.h:193
int correctedbits
Definition: dump1090.h:351
int raw_longitude
Definition: dump1090.h:368
int fd
Definition: dump1090.h:185
uint64_t odd_cprtime
Definition: dump1090.h:216
int altitude
Definition: dump1090.h:196
char flight[16]
Definition: dump1090.h:194
void interactiveShowData(void)
Definition: interactive.c:324
int mlat
Definition: dump1090.h:296
int freq
Definition: dump1090.h:244
void modesQueueOutput(struct modesMessage *mm)
Definition: net_io.c:407
int print_timestamp
Definition: dump1090.h:271
int enable_agc
Definition: dump1090.h:242
int net_output_sbs_port
Definition: dump1090.h:279
uint32_t addr
Definition: dump1090.h:353
int ris
Definition: dump1090.h:253
struct timeb stSystemTimeBlk
Definition: dump1090.h:232
int sbsos
Definition: dump1090.h:251
char corrected[2]
Definition: dump1090.h:352
int decodeBinMessage(struct client *c, char *p)
Definition: net_io.c:425
#define MODES_CLIENT_BUF_SIZE
Definition: dump1090.h:172
int even_cprlon
Definition: dump1090.h:215
int ppm_error
Definition: dump1090.h:245
unsigned int stat_beast_connections
Definition: dump1090.h:325
unsigned int stat_ph_demodulated3
Definition: dump1090.h:330
int vert_rate
Definition: dump1090.h:374
unsigned int stat_demodulated0
Definition: dump1090.h:310
int net_output_raw_port
Definition: dump1090.h:283
uint16_t * maglut
Definition: dump1090.h:236
unsigned int stat_ph_demodulated1
Definition: dump1090.h:328
int debug
Definition: dump1090.h:276
int net_output_raw_rate
Definition: dump1090.h:281
char flight[16]
Definition: dump1090.h:371
void decodeModeAMessage(struct modesMessage *mm, int ModeA)
Definition: mode_ac.c:359
uint64_t timestampLatLon
Definition: dump1090.h:203
long modeAcount
Definition: dump1090.h:207
unsigned int stat_http_requests
Definition: dump1090.h:322
int gain
Definition: dump1090.h:241
int exit
Definition: dump1090.h:237
void modesInitErrorInfo()
Definition: mode_s.c:234
#define ANET_ERR_LEN
Definition: anet.h:36
uint64_t timestampMsg
Definition: dump1090.h:355
void modesReadFromClient(struct client *c, char *sep, int(*handler)(struct client *, char *))
Definition: net_io.c:759
int modeACflags
Definition: dump1090.h:209
int service
Definition: dump1090.h:186
unsigned int stat_goodcrc
Definition: dump1090.h:314
int net_http_port
Definition: dump1090.h:287
uint64_t timestampBlk
Definition: dump1090.h:231
int odd_cprlon
Definition: dump1090.h:213
int interactive_delete_ttl
Definition: dump1090.h:292
int maxfd
Definition: dump1090.h:250
unsigned int stat_ph_fixed
Definition: dump1090.h:333
unsigned char signalLevel
Definition: dump1090.h:357
int fd
Definition: dump1090.h:233
int ns_velocity
Definition: dump1090.h:373
int odd_cprlat
Definition: dump1090.h:212
unsigned int stat_badcrc
Definition: dump1090.h:315
int https
Definition: dump1090.h:256
int bis
Definition: dump1090.h:255
#define MODES_LONG_MSG_BYTES
Definition: dump1090.h:107
double fLon
Definition: dump1090.h:370
uint64_t interactive_last_update
Definition: dump1090.h:306
double fLat
Definition: dump1090.h:369
int bos
Definition: dump1090.h:254
struct aircraft * next
Definition: dump1090.h:220
void modesReadFromClients(void)
Definition: net_io.c:860
struct @0 Modes
int check_crc
Definition: dump1090.h:269
void decodeCPR(struct aircraft *a, int fflag, int surface)
Definition: mode_s.c:1956
int net
Definition: dump1090.h:277
int net_output_beast_port
Definition: dump1090.h:285
int interactive
Definition: dump1090.h:289
int net_output_raw_size
Definition: dump1090.h:280
int dev_index
Definition: dump1090.h:240
int rawOutUsed
Definition: dump1090.h:258
struct aircraft * interactiveReceiveData(struct modesMessage *mm)
Definition: interactive.c:178
unsigned int stat_bit_fix[2]
Definition: dump1090.h:320
unsigned int stat_DF_Type_Corrected
Definition: dump1090.h:339
void displayModesMessage(struct modesMessage *mm)
Definition: mode_s.c:1097
int vert_rate
Definition: dump1090.h:199
struct timeb stSystemTimeRTL
Definition: dump1090.h:230
void useModesMessage(struct modesMessage *mm)
Definition: mode_s.c:1838
#define MODES_MAX_BITERRORS
Definition: dump1090.h:92
int beastOutUsed
Definition: dump1090.h:260
unsigned int stat_demodulated1
Definition: dump1090.h:311
int net_input_raw_port
Definition: dump1090.h:284
void modesSendAllClients(int service, void *msg, int len)
Definition: net_io.c:165
int quiet
Definition: dump1090.h:288
void modesInitNet(void)
Definition: net_io.c:49
unsigned int stat_ph_demodulated0
Definition: dump1090.h:327
unsigned int stat_ph_badcrc
Definition: dump1090.h:332
int aera
Definition: dump1090.h:272
unsigned int stat_demodulated3
Definition: dump1090.h:313
struct client * clients[1024]
Definition: dump1090.h:249
int phase_enhance
Definition: dump1090.h:267
uint64_t timestamp
Definition: dump1090.h:202
unsigned int stat_DF_Len_Corrected
Definition: dump1090.h:338
#define MODES_NET_MAX_FD
Definition: dump1090.h:165
unsigned int stat_sbs_connections
Definition: dump1090.h:323
int bFlags
Definition: dump1090.h:219
unsigned char signalLevel[8]
Definition: dump1090.h:195
uint32_t crc
Definition: dump1090.h:350
int decodeCPRrelative(struct aircraft *a, int fflag, int surface)
Definition: mode_s.c:2021
double lon
Definition: dump1090.h:218
rtlsdr_dev_t * dev
Definition: dump1090.h:243
int velocity
Definition: dump1090.h:375
unsigned char msg[14]
Definition: dump1090.h:346
unsigned int stat_fixed
Definition: dump1090.h:316
uint16_t * magnitude
Definition: dump1090.h:229
int interactive_display_ttl
Definition: dump1090.h:291
int metric
Definition: dump1090.h:295
uint16_t * data
Definition: dump1090.h:228
double lat
Definition: dump1090.h:218
pthread_mutex_t data_mutex
Definition: dump1090.h:226
int beast
Definition: dump1090.h:274
void computeMagnitudeVector()
Definition: mode_s.c:1386
int ew_velocity
Definition: dump1090.h:372
unsigned int stat_valid_preamble
Definition: dump1090.h:309
char * rawOut
Definition: dump1090.h:257
int net_only
Definition: dump1090.h:278
int onlyaddr
Definition: dump1090.h:294
time_t seen
Definition: dump1090.h:200
unsigned int stat_ph_bit_fix[2]
Definition: dump1090.h:336
struct aircraft * aircrafts
Definition: dump1090.h:305
int net_input_beast_port
Definition: dump1090.h:286
int altitude
Definition: dump1090.h:382
char * filename
Definition: dump1090.h:266
time_t seenLatLon
Definition: dump1090.h:201
unsigned int stat_ph_demodulated2
Definition: dump1090.h:329
int interactive_rows
Definition: dump1090.h:290
int buflen
Definition: dump1090.h:187
int raw_latitude
Definition: dump1090.h:367
char * aera_net
Definition: dump1090.h:273
double fUserLon
Definition: dump1090.h:301
unsigned int stat_out_of_phase
Definition: dump1090.h:326
int nfix_crc
Definition: dump1090.h:268
constexpr double m
Definition: AugerUnits.h:121
double fUserLat
Definition: dump1090.h:300
int net_output_raw_rate_count
Definition: dump1090.h:282
int mode_ac
Definition: dump1090.h:275
long modeCcount
Definition: dump1090.h:208
pthread_cond_t data_cond
Definition: dump1090.h:227
int stats
Definition: dump1090.h:293
char * beastOut
Definition: dump1090.h:259
int speed
Definition: dump1090.h:197
pthread_t reader_thread
Definition: dump1090.h:225
int ros
Definition: dump1090.h:252
int even_cprlat
Definition: dump1090.h:214
unsigned int stat_demodulated2
Definition: dump1090.h:312
char aneterr[256]
Definition: dump1090.h:248

, generated on Tue Sep 26 2023.