fix RCv for position with GNSS height

This commit is contained in:
Junzi Sun 2022-07-09 12:11:28 +02:00
parent b90932e51d
commit bb8f83e832
2 changed files with 19 additions and 15 deletions

View File

@ -44,7 +44,7 @@ from pyModeS.decoder.bds.bds62 import (
autopilot,
altitude_hold_mode,
approach_mode,
emergency_status
emergency_status,
)
@ -262,12 +262,16 @@ def nuc_p(msg):
NUCp = uncertainty.TC_NUCp_lookup[tc]
HPL = uncertainty.NUCp[NUCp]["HPL"]
RCu = uncertainty.NUCp[NUCp]["RCu"]
RCv = uncertainty.NUCp[NUCp]["RCv"]
except KeyError:
HPL, RCu, RCv = uncertainty.NA, uncertainty.NA, uncertainty.NA
HPL, RCu = uncertainty.NA, uncertainty.NA
if tc in [20, 21]:
RCv = uncertainty.NA
RCv = uncertainty.NA
# RCv only available for GNSS height
if tc == 20:
RCv = 4
elif tc == 21:
RCv = 15
return HPL, RCu, RCv

View File

@ -68,16 +68,16 @@ TC_NICv2_lookup = {
NUCp = {
9: {"HPL": 7.5, "RCu": 3, "RCv": 4},
8: {"HPL": 25, "RCu": 10, "RCv": 15},
7: {"HPL": 185, "RCu": 93, "RCv": NA},
6: {"HPL": 370, "RCu": 185, "RCv": NA},
5: {"HPL": 926, "RCu": 463, "RCv": NA},
4: {"HPL": 1852, "RCu": 926, "RCv": NA},
3: {"HPL": 3704, "RCu": 1852, "RCv": NA},
2: {"HPL": 18520, "RCu": 9260, "RCv": NA},
1: {"HPL": 37040, "RCu": 18520, "RCv": NA},
0: {"HPL": NA, "RCu": NA, "RCv": NA},
9: {"HPL": 7.5, "RCu": 3},
8: {"HPL": 25, "RCu": 10},
7: {"HPL": 185, "RCu": 93},
6: {"HPL": 370, "RCu": 185},
5: {"HPL": 926, "RCu": 463},
4: {"HPL": 1852, "RCu": 926},
3: {"HPL": 3704, "RCu": 1852},
2: {"HPL": 18520, "RCu": 9260},
1: {"HPL": 37040, "RCu": 18520},
0: {"HPL": NA, "RCu": NA},
}
NUCv = {