@@ -46,8 +46,15 @@ def is44(msg: str) -> bool:
46
46
if vw is not None and vw > 250 :
47
47
return False
48
48
49
- temp , temp2 = temp44 (msg )
50
- if min (temp , temp2 ) > 60 or max (temp , temp2 ) < - 80 :
49
+ temp = temp44 (msg )
50
+ if temp > 60 or temp < - 80 :
51
+ return False
52
+
53
+ # If all values are zero, the message was likely not MRAR
54
+ if vw is not None and vw == 0 and dw is not None and dw == 0 and temp is not None and temp == 0 :
55
+ return False
56
+
57
+ if vw is None and dw is None and temp is None :
51
58
return False
52
59
53
60
return True
@@ -82,9 +89,7 @@ def temp44(msg: str) -> Tuple[float, float]:
82
89
msg (str): 28 hexdigits string
83
90
84
91
Returns:
85
- float, float: temperature and alternative temperature in Celsius degree.
86
- Note: Two values returns due to what seems to be an inconsistency
87
- error in ICAO 9871 (2008) Appendix A-67.
92
+ float: temperature in Celsius degree.
88
93
89
94
"""
90
95
d = common .hex2bin (common .data (msg ))
@@ -97,9 +102,7 @@ def temp44(msg: str) -> Tuple[float, float]:
97
102
98
103
temp = value * 0.25 # celsius
99
104
100
- temp_alternative = value * 0.125 # celsius
101
-
102
- return temp , temp_alternative
105
+ return temp
103
106
104
107
105
108
def p44 (msg : str ) -> Optional [int ]:
0 commit comments