-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
34c4ace
commit 393efcc
Showing
6 changed files
with
948 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
SRC=main.c adsb_encode.c | ||
DEST=pluto-adsb-sim | ||
OBJS=$(SRC:.c=.o) | ||
LDFLAGS=-lm $(shell pkg-config --libs libiio libad9361) | ||
CFLAGS=-g -Wall $(shell pkg-config --cflags libiio libad9361) | ||
|
||
all: $(DEST) | ||
|
||
$(DEST): $(OBJS) | ||
$(CC) -o $@ $^ $(LDFLAGS) | ||
%.o: %.c | ||
$(CC) $(CFLAGS) -o $@ -c $< | ||
clean: | ||
rm -f *.o $(DEST) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,93 @@ | ||
# pluto-adsb-sim | ||
pluto-adsb-sim generates ADSB signal IQ data stream, which is then transmitted by the software-defined radio (SDR) platform ADALM-Pluto. | ||
# pluto-absb-sim | ||
|
||
pluto-adsb-sim generates ADSB signal IQ data stream, which is then transmitted | ||
by the software-defined radio (SDR) platform [ADALM-Pluto](https://wiki.analog.com/university/tools/pluto). | ||
|
||
Project based on [ADSB-Out](https://github.com/lyusupov/ADSB-Out) | ||
|
||
Three mode are available: | ||
* Tx stream from an ASCII file; | ||
* Tx stream from fake frame; | ||
* fake frame or ASCII file to binary file | ||
|
||
### compile | ||
|
||
#### dependencies | ||
This application require [libiio](https://github.com/analogdevicesinc/libiio), [libad9361-iio](https://github.com/analogdevicesinc/libad9361-iio) | ||
and *pkg-config* | ||
|
||
```bash | ||
$ sudo apt install libiio-dev libad9361-dev libad9361-0 libiio0 pkg-config | ||
``` | ||
|
||
#### compile | ||
|
||
```bash | ||
$ make | ||
``` | ||
|
||
### usage | ||
|
||
```bash | ||
Usage: pluto-adsb-sim [options] | ||
-h This help | ||
-t <filename> Transmit data from file | ||
-o <outfile> Write to file instead of using PlutoSDR | ||
-a <attenuation> Set TX attenuation [dB] (default -20.0) | ||
-b <bw> Set RF bandwidth [MHz] (default 5.0) | ||
-f <freq> Set RF center frequency [MHz] (default 868.0) | ||
-u <uri> ADALM-Pluto URI | ||
-n <network> ADALM-Pluto network IP or hostname (default pluto.local) | ||
-i <ICAO> | ||
-l <Latitude> | ||
-L <Longitude> | ||
-A <Altitude> | ||
-I <Aicraft identification> | ||
|
||
``` | ||
|
||
To use **-n** or nothing, you need to have in */etc/hosts* a line like: | ||
``` | ||
192.168.2.1 pluto pluto.local | ||
``` | ||
|
||
#### Transmit data from file | ||
|
||
To use this mode a file must be provided with *-t* option | ||
|
||
The file used is an ascii, hex format, one frame by line: | ||
``` | ||
@XXXXXXXXXXXXYYYYYYYYYYYYYYYYYYYYYYYYYYYY; | ||
``` | ||
|
||
Each line start with a *@* and finish with a *;* | ||
Where: | ||
* X is a 12 char hex date in ns | ||
* Y is the 14 char hex full frame (DF, ICAO, DATA, CRC) | ||
|
||
__example__ | ||
```bash | ||
./pluto-adsb-sim -f 868 -t maFile.dat | ||
``` | ||
|
||
#### Fake signal generation | ||
|
||
To use this mode, don't provide a data file (no *-t* option) | ||
|
||
__example__ | ||
```bash | ||
./pluto-adsb-sim -f 868 -i 0xABCDEF -I GGM_1980 -l 48.36 -L -4.77 -A 9999.0 | ||
``` | ||
|
||
### binary file generation | ||
|
||
If *-o* is used the *PlutoSDR* is not used. Instead the data stream is written | ||
in a binary, signed short IQ interleaved format | ||
|
||
### Verify with dump1090 | ||
|
||
```bash | ||
$ dump1090 --freq 868000000 | ||
``` | ||
|
||
*--freq* parameter must be the same as -f |
Oops, something went wrong.