Skip to content

Commit

Permalink
Merge pull request #53 from semuconsulting/RC-1.0.17
Browse files Browse the repository at this point in the history
RELEASE CANDIDATE 1.0.17
  • Loading branch information
semuadmin authored Mar 25, 2024
2 parents 2681938 + 94c45af commit 1a55bcd
Show file tree
Hide file tree
Showing 9 changed files with 403 additions and 6 deletions.
2 changes: 1 addition & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@
"editor.formatOnSave": true,
"modulename": "${workspaceFolderBasename}",
"distname": "${workspaceFolderBasename}",
"moduleversion": "1.0.16"
"moduleversion": "1.0.17"
}
6 changes: 6 additions & 0 deletions RELEASE_NOTES.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# pyrtcm Release Notes

### RELEASE 1.0.17

ENHANCEMENTS:

1. Add proprietary IGS SSR 4076 messages, as defined in https://files.igs.org/pub/data/format/igs_ssr_v1.pdf. NB not fully tested as available NTRIP sources only cover a subset of the 4076 subtypes defined.

### RELEASE 1.0.16

CHANGES:
Expand Down
4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ name = "pyrtcm"
authors = [{ name = "semuadmin", email = "[email protected]" }]
maintainers = [{ name = "semuadmin", email = "[email protected]" }]
description = "RTCM3 protocol parser"
version = "1.0.16"
version = "1.0.17"
license = { file = "LICENSE" }
readme = "README.md"
requires-python = ">=3.8"
Expand Down Expand Up @@ -85,7 +85,7 @@ disable = """

[tool.pytest.ini_options]
minversion = "7.0"
addopts = "--cov --cov-report term-missing --cov-fail-under 95"
addopts = "--cov --cov-report html --cov-fail-under 98"
pythonpath = ["src"]

[tool.coverage.run]
Expand Down
2 changes: 1 addition & 1 deletion src/pyrtcm/_version.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@
:license: BSD 3-Clause
"""

__version__ = "1.0.16"
__version__ = "1.0.17"
23 changes: 22 additions & 1 deletion src/pyrtcm/rtcmmessage.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@
ATT_NCELL,
ATT_NSAT,
NCELL,
NHARMCOEFFC,
NHARMCOEFFS,
NSAT,
NSIG,
RTCM_DATA_FIELDS,
Expand Down Expand Up @@ -133,6 +135,8 @@ def _set_attribute_group(self, att: tuple, offset: int, index: list) -> tuple:
if numr == "DF379":
numr += f"_{index[-1]:02d}"
rng = getattr(self, numr)
if numr == "IDF035": # 4076_201 range is n-1
rng += 1

index.append(0) # add a (nested) group index level
# recursively process each group attribute,
Expand Down Expand Up @@ -200,6 +204,17 @@ def _set_attribute_single(
setattr(self, NSIG, n)
elif key == "DF396": # num of cells in MSM message
setattr(self, NCELL, n)
# add special coefficient attributes for message 4076_201
if key == "IDF038":
i = index[0]
N = getattr(self, f"IDF037_{i:02d}") + 1
M = getattr(self, f"IDF038_{i:02d}") + 1
nc = int(((N + 1) * (N + 2) / 2) - ((N - M) * (N - M + 1) / 2))
ns = int(nc - (N + 1))
# ncs = (N + 1) * (N + 1) - (N - M) * (N - M + 1)
# print(f"DEBUG nc {nc} ns {ns} ncs {ncs} nc+ns {nc+ns}")
setattr(self, NHARMCOEFFC, nc)
setattr(self, NHARMCOEFFS, ns)

return offset

Expand Down Expand Up @@ -338,7 +353,13 @@ def identity(self) -> str:
:rtype: str
"""

return str(self._payload[0] << 4 | self._payload[1] >> 4)
id = self._payload[0] << 4 | self._payload[1] >> 4

if id == 4076: # proprietary IGS SSR message type
subtype = (self._payload[1] & 0x1) << 7 | self._payload[2] >> 1
id = f"{id}_{subtype:03d}"

return str(id)

@property
def payload(self) -> bytes:
Expand Down
96 changes: 96 additions & 0 deletions src/pyrtcm/rtcmtypes_core.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@
NSIG = "NSig"
NCELL = "NCell"
NRES = 16 # number of Residuals groups in MT1023 and MT1024
NHARMCOEFFC = "_NHarmCoeffC" # number of cosine harmonic coefficients in 4076
NHARMCOEFFS = "_NHarmCoeffS" # number of sine harmonic coefficients in 4076

# Power of 2 scaling constants
P2_P4 = 16 # 2**4
Expand Down Expand Up @@ -645,6 +647,49 @@
"DF545": (BIT2, 1, "NAVIC/IRNSS 2 spare bits after i0"),
"DF546": (UINT30, 1, "NAVIC/IRNSS Epoch Time (TOW)"),
"ExtSatInfo": (UINT4, 0, "Extended Satellite Information"),
# IGS SSR data types, used in 4076 messages
# https://files.igs.org/pub/data/format/igs_ssr_v1.pdf
"IDF001": (UINT3, 1, "IGM/IM Version"),
"IDF002": (UINT8, 1, "IGS Message Number"),
"IDF003": (UINT20, 1, "SSR Epoch Time 1s"),
"IDF004": (BIT4, 1, "SSR Update Interval"),
"IDF005": (BIT1, 1, "SSR Multiple Message Indicator"),
"IDF006": (BIT1, 1, "Global/Regional CRS Indicator"),
"IDF007": (UINT4, 1, "IOD SSR"),
"IDF008": (UINT16, 1, "SSR Provider ID"),
"IDF009": (UINT4, 1, "SSR Solution ID"),
"IDF010": (UINT6, 1, "No. of Satellites"),
"IDF011": (UINT6, 1, "GNSS Satellite ID"),
"IDF012": (BIT8, 1, "GNSS IOD"),
"IDF013": (INT22, 0.1, "Delta Orbit Radial"),
"IDF014": (INT20, 0.4, "Delta Orbit Along-Track"),
"IDF015": (INT20, 0.4, "Delta Orbit Cross-Track"),
"IDF016": (INT21, 0.001, "Dot Orbit Delta Radial"),
"IDF017": (INT19, 0.004, "Dot Orbit Delta Along-Track"),
"IDF018": (INT19, 0.004, "Dot Orbit Delta Cross-Track"),
"IDF019": (INT22, 0.1, "Delta Clock C0"),
"IDF020": (INT21, 0.001, "Delta Clock C1"),
"IDF021": (INT27, 0.00002, "Delta Clock C2"),
"IDF022": (INT22, 0.1, "High Rate Clock Correction"),
"IDF023": (UINT5, 1, "No. of Biases Processed"),
"IDF024": (UINT5, 1, "GNSS Signal and Tracking Mode Identifier"),
"IDF025": (INT14, 0.01, "Code Bias"),
"IDF026": (UINT9, 1 / 256, "Yaw Angle"),
"IDF027": (INT8, 1 / 8192, "Yaw Rate"),
"IDF028": (INT20, 0.0001, "Phase Bias"),
"IDF029": (BIT1, 1, "Signal Integer Indicator"),
"IDF030": (BIT2, 1, "Signals Wide-Lane Integer Indicator"),
"IDF031": (UINT4, 1, "Signal Discontinuity Counter"),
"IDF032": (BIT1, 1, "Dispersive Bias Consistency Indicator"),
"IDF033": (BIT1, 1, "MW Consistency Indicator"),
"IDF034": (BIT6, 1, "SSR URA"),
"IDF035": (UINT2, 1, "Number of Ionospheric Layers"),
"IDF036": (UINT8, 10, "Height of Ionospheric Layer"),
"IDF037": (UINT4, 1, "Spherical Harmonics Degree"),
"IDF038": (UINT4, 1, "Spherical Harmonics Order"),
"IDF039": (INT16, 0.005, "Spherical Harmonic Coefficient C"),
"IDF040": (INT16, 0.005, "Spherical Harmonic Coefficient S"),
"IDF041": (UINT9, 0.05, "VTEC Quality Indicator"),
}

# ***************************************************************************
Expand Down Expand Up @@ -786,6 +831,57 @@
"4073": "Unicore Communications Inc",
"4075": "Alberding GmbH",
"4076": "International GNSS Service (IGS)",
"4076_021": "GPS SSR Orbit Correction",
"4076_022": "GPS SSR Clock Correction",
"4076_023": "GPS SSR Combined Orbit and Clock Correction",
"4076_024": "GPS SSR High Rate Clock Correction",
"4076_025": "GPS SSR Code Bias",
"4076_026": "GPS SSR Phase Bias",
"4076_027": "GPS SSR URA",
# "4076_028-040": "Reserved for GPS",
"4076_041": "GLONASS SSR Orbit Correction",
"4076_042": "GLONASS SSR Clock Correction",
"4076_043": "GLONASS SSR Combined Orbit and Clock Correction",
"4076_044": "GLONASS SSR High Rate Clock Correction",
"4076_045": "GLONASS SSR Code Bias",
"4076_046": "GLONASS SSR Phase Bias",
"4076_047": "GLONASS SSR URA",
# "4076_048-060": "Reserved for GLONASS",
"4076_061": "Galileo SSR Orbit Correction",
"4076_062": "Galileo SSR Clock Correction",
"4076_063": "Galileo SSR Combined Orbit and Clock Correction",
"4076_064": "Galileo SSR High Rate Clock Correction",
"4076_065": "Galileo SSR Code Bias",
"4076_066": "Galileo SSR Phase Bias",
"4076_067": "Galileo SSR URA",
# "4076_068-080": "Reserved for Galileo",
"4076_081": "QZSS SSR Orbit Correction",
"4076_082": "QZSS SSR Clock Correction",
"4076_083": "QZSS SSR Combined Orbit and Clock Correction",
"4076_084": "QZSS SSR High Rate Clock Correction",
"4076_085": "QZSS SSR Code Bias",
"4076_086": "QZSS SSR Phase Bias",
"4076_087": "QZSS SSR URA",
# "4076_088-100": "Reserved for QZSS",
"4076_101": "BeiDou SSR Orbit Correction",
"4076_102": "BeiDou SSR Clock Correction",
"4076_103": "BeiDou SSR Combined Orbit and Clock Correction",
"4076_104": "BeiDou SSR High Rate Clock Correction",
"4076_105": "BeiDou SSR Code Bias",
"4076_106": "BeiDou SSR Phase Bias",
"4076_107": "BeiDou SSR URA",
# "4076_108-120": "Reserved for BeiDou",
"4076_121": "SBAS SSR Orbit Correction",
"4076_122": "SBAS SSR Clock Correction",
"4076_123": "SBAS SSR Combined Orbit and Clock Correction",
"4076_124": "SBAS SSR High Rate Clock Correction",
"4076_125": "SBAS SSR Code Bias",
"4076_126": "SBAS SSR Phase Bias",
"4076_127": "SBAS SSR URA",
# "4076_128-140": "Reserved for SBAS",
# "4076_141-160": "Reserved for NavIC/IRNSS",
# "4076_161-200": "Reserved",
"4076_201": "GNSS SSR Ionosphere VTEC Spherical Harmonics",
"4077": "Hemisphere GNSS Inc.",
"4078": "ComNav Technology Ltd.",
"4079": "SubCarrier Systems Corp. (SCSC) The makers of SNIP",
Expand Down
Loading

0 comments on commit 1a55bcd

Please sign in to comment.