Skip to content

Commit

Permalink
hints on using readsb api
Browse files Browse the repository at this point in the history
  • Loading branch information
wiedehopf committed Jul 24, 2022
1 parent 8d8e3f4 commit 29fc9e3
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 0 deletions.
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -413,6 +413,11 @@ I don't support this feature for the general user base.
This information is only for people who could figure it out from the source code anyhow,
so that they don't have to spend as much time figuring it out.

If you're using --write-json-globe-index with tar1090, you might be interested in tar1090
using the readsb API to get data, it's less requests and usually more efficient,
for details see the file nginx-readsb-api.conf
(this needs adding to your existing nginx tar1090 configuration, this is only for people who really know their stuff anyway)

## A separate instance with longer data retention for gauging range

If this seems too complicated for you or you don't want a 2nd instance, changing / adding PTRACKS=24 to the /etc/default/tar1090 configuration should also extend the history (for /?pTracks only).
Expand Down
19 changes: 19 additions & 0 deletions nginx-readsb-api.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# tar1090 needs to know to use the API as data source, readsb will signal it when you add this option:
# readsb add option: --tar1090-use-api

location /tar1090/re-api/ {
gzip on;
proxy_http_version 1.1;
proxy_max_temp_file_size 0;
proxy_set_header Connection $http_connection;
proxy_set_header Host $http_host;

# i like unix sockets
# readsb add option: --net-api-port unix:/run/readsb/api.sock
proxy_pass http://unix:/run/readsb/api.sock:/$is_args$args;

# instead of using unix sockets, you can also use a port:
# readsb add option: --net-api-port 30152
# proxy_pass http://127.0.0.1:30152/$is_args$args;
}

0 comments on commit 29fc9e3

Please sign in to comment.