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: else:
NICs = NICa*2 + NICbc NICs = NICa*2 + NICbc
try:
if isinstance(NIC, dict): if isinstance(NIC, dict):
NIC = NIC[NICs] NIC = NIC[NICs]
try:
Rc = uncertainty.NICv2[NIC][NICs]['Rc'] Rc = uncertainty.NICv2[NIC][NICs]['Rc']
except KeyError: except KeyError:
Rc = uncertainty.NA Rc = uncertainty.NA

View File

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