arguments for pmstream
This commit is contained in:
+1
-1
@@ -1,4 +1,4 @@
|
|||||||
The Python Mode-S Decoder (2.0-Dev branch)
|
The Python Mode-S Decoder (dev-2.0 branch)
|
||||||
==========================================
|
==========================================
|
||||||
|
|
||||||
Python library for Mode-S message decoding. Support Downlink Formats (DF) are:
|
Python library for Mode-S message decoding. Support Downlink Formats (DF) are:
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
from __future__ import print_function, division
|
from __future__ import print_function, division
|
||||||
import os
|
import os
|
||||||
import sys
|
import sys
|
||||||
|
import argparse
|
||||||
import curses
|
import curses
|
||||||
import numpy as np
|
import numpy as np
|
||||||
import time
|
import time
|
||||||
@@ -16,11 +17,17 @@ ADSB_TS = []
|
|||||||
EHS_MSG = []
|
EHS_MSG = []
|
||||||
EHS_TS = []
|
EHS_TS = []
|
||||||
|
|
||||||
HOST = 'sil.lr.tudelft.nl'
|
parser = argparse.ArgumentParser()
|
||||||
PORT = 30334
|
parser.add_argument('--server', help='server address or IP', required=True)
|
||||||
|
parser.add_argument('--port', help='Raw beast port', required=True)
|
||||||
|
parser.add_argument('--lat0', help='Latitude of receiver', required=True)
|
||||||
|
parser.add_argument('--lon0', help='Longitude of receiver', required=True)
|
||||||
|
args = parser.parse_args()
|
||||||
|
|
||||||
LAT0 = 51.9899
|
SERVER = args.server
|
||||||
LON0 = 4.3754
|
PORT = int(args.port)
|
||||||
|
LAT0 = float(args.lat0) # 51.9899 for TU Delft
|
||||||
|
LON0 = float(args.lon0) # 4.3754
|
||||||
|
|
||||||
class ModesClient(BaseClient):
|
class ModesClient(BaseClient):
|
||||||
def __init__(self, host, port):
|
def __init__(self, host, port):
|
||||||
@@ -58,7 +65,7 @@ class ModesClient(BaseClient):
|
|||||||
|
|
||||||
sys.stdout = open(os.devnull, 'w')
|
sys.stdout = open(os.devnull, 'w')
|
||||||
|
|
||||||
client = ModesClient(host=HOST, port=PORT)
|
client = ModesClient(host=SERVER, port=PORT)
|
||||||
client.daemon = True
|
client.daemon = True
|
||||||
client.start()
|
client.start()
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user