fix exceptions

This commit is contained in:
Junzi Sun 2018-11-30 23:36:58 +01:00
parent 44a9c8d2aa
commit 495f320988
2 changed files with 14 additions and 14 deletions

View File

@ -323,10 +323,10 @@ def nic_v2(msg, NICa, NICbc):
else:
NICs = NICa*2 + NICbc
try:
if isinstance(NIC, dict):
NIC = NIC[NICs]
try:
Rc = uncertainty.NICv2[NIC][NICs]['Rc']
except KeyError:
Rc = uncertainty.NA

View File

@ -100,7 +100,7 @@ class Stream():
elif ('t0' in self.acs[icao]) and ('t1' in self.acs[icao]) and \
(abs(self.acs[icao]['t0'] - self.acs[icao]['t1']) < 10):
# use multi message decoding
# try:
try:
latlon = pms.adsb.position(
self.acs[icao][0],
self.acs[icao][1],
@ -108,9 +108,9 @@ class Stream():
self.acs[icao]['t1'],
self.lat0, self.lon0
)
# except:
# # mix of surface and airborne position message
# continue
except:
# mix of surface and airborne position message
continue
else:
latlon = None