Changeset 11215 in ntrip for trunk/BNC/tests/tools/bncraw.py
- Timestamp:
- Nov 19, 2026, 11:04:10 PM (less than one hour ago)
- File:
-
- 1 edited
-
trunk/BNC/tests/tools/bncraw.py (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/BNC/tests/tools/bncraw.py
r11130 r11215 10 10 slice <raw> <out> [options] cut a time window / subset of stations 11 11 crs <raw> decode RTCM 1300/1301/1302 (CRS messages) 12 ephsats <raw> satellite IDs of the ephemeris messages 12 13 """ 13 14 … … 246 247 247 248 249 EPH_SYS = {"1019": ("G", 6), "1020": ("R", 6), "1041": ("I", 6), "1042": ("C", 6), 250 "1044": ("J", 4), "1045": ("E", 6), "1046": ("E", 6)} 251 252 253 def cmd_ephsats(args): 254 """Satellite IDs of the ephemeris messages per stream and message type.""" 255 sats = collections.OrderedDict() 256 framers = {} 257 for t, sta, fmt, data in read_chunks(args.input): 258 for p in framers.setdefault(sta, Rtcm3Framer()).feed(data): 259 mt = msg_type(p) 260 if mt in EPH_SYS: 261 sy, nb = EPH_SYS[mt] 262 b = BitReader(p) 263 b.u(12) 264 sats.setdefault((sta, mt), set()).add("%s%02d" % (sy, b.u(nb))) 265 for (sta, mt), s in sorted(sats.items()): 266 print("%s %s %s" % (sta, mt, " ".join(sorted(s)))) 267 268 248 269 def main(): 249 270 ap = argparse.ArgumentParser(description=__doc__, … … 269 290 p.set_defaults(func=cmd_crs) 270 291 292 p = sub.add_parser("ephsats", help="satellite IDs of the ephemeris messages") 293 p.add_argument("input") 294 p.set_defaults(func=cmd_ephsats) 295 271 296 args = ap.parse_args() 272 297 args.func(args)
Note:
See TracChangeset
for help on using the changeset viewer.
