Skip to content

Commit

Permalink
fix bug due to pyModeS update
Browse files Browse the repository at this point in the history
  • Loading branch information
junzis committed Jul 6, 2018
1 parent 249bc0d commit 05329cf
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ This is the Python library for wind field estimation based on the Meteo-Particle
2. You may also install optional `geomag` library, to support the correction of magnetic declination in BDS60 heading.

```
$ pip install pyModeS
$ pip install git+https://github.com/junzis/pyModeS
$ pip install geomag
```

Expand Down
2 changes: 1 addition & 1 deletion run-realtime.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
TFLAG = 0

STREAM = Stream(lat0=51.99, lon0=4.37)
STREAM.mp.N_AC_PTCS = 500
STREAM.mp.N_AC_PTCS = 250
STREAM.mp.AGING_SIGMA = 180

DATA_LOCK = threading.Lock()
Expand Down
2 changes: 1 addition & 1 deletion run-recorded.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
stream = Stream(lat0=51.99, lon0=4.37, correction=True)

# you can set up the MP model parameters
stream.mp.N_AC_PTCS = 500
stream.mp.N_AC_PTCS = 250
stream.mp.AGING_SIGMA = 180

# read the message dumps
Expand Down
14 changes: 7 additions & 7 deletions stream.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ def process_raw(self, adsb_ts, adsb_msgs, ehs_ts, ehs_msgs, tnow=None):

# process adsb message
for t, msg in zip(adsb_ts, adsb_msgs):
icao = pms.adsb.icao(msg)
icao = pms.icao(msg)
tc = pms.adsb.typecode(msg)

if icao not in self.acs:
Expand Down Expand Up @@ -128,7 +128,7 @@ def process_raw(self, adsb_ts, adsb_msgs, ehs_ts, ehs_msgs, tnow=None):

# process ehs message
for t, msg in zip(ehs_ts, ehs_msgs):
icao = pms.ehs.icao(msg)
icao = pms.icao(msg)

if icao not in self.acs:
continue
Expand Down Expand Up @@ -172,8 +172,8 @@ def process_raw(self, adsb_ts, adsb_msgs, ehs_ts, ehs_msgs, tnow=None):
pass

if bds == 'BDS50':
tas = pms.ehs.tas50(msg)
roll = pms.ehs.roll50(msg)
tas = pms.commb.tas50(msg)
roll = pms.commb.roll50(msg)

if tas and roll:
self.acs[icao]['t50'] = t
Expand All @@ -183,9 +183,9 @@ def process_raw(self, adsb_ts, adsb_msgs, ehs_ts, ehs_msgs, tnow=None):


elif bds == 'BDS60':
ias = pms.ehs.ias60(msg)
hdg = pms.ehs.hdg60(msg)
mach = pms.ehs.mach60(msg)
ias = pms.commb.ias60(msg)
hdg = pms.commb.hdg60(msg)
mach = pms.commb.mach60(msg)


if ias and hdg and mach:
Expand Down

0 comments on commit 05329cf

Please sign in to comment.