Index: trunk/BNC/tests/tools/bncraw.py
===================================================================
--- trunk/BNC/tests/tools/bncraw.py	(revision 11193)
+++ trunk/BNC/tests/tools/bncraw.py	(revision 11215)
@@ -10,4 +10,5 @@
     slice <raw> <out> [options]      cut a time window / subset of stations
     crs   <raw>                      decode RTCM 1300/1301/1302 (CRS messages)
+    ephsats <raw>                    satellite IDs of the ephemeris messages
 """
 
@@ -246,4 +247,24 @@
 
 
+EPH_SYS = {"1019": ("G", 6), "1020": ("R", 6), "1041": ("I", 6), "1042": ("C", 6),
+           "1044": ("J", 4), "1045": ("E", 6), "1046": ("E", 6)}
+
+
+def cmd_ephsats(args):
+    """Satellite IDs of the ephemeris messages per stream and message type."""
+    sats = collections.OrderedDict()
+    framers = {}
+    for t, sta, fmt, data in read_chunks(args.input):
+        for p in framers.setdefault(sta, Rtcm3Framer()).feed(data):
+            mt = msg_type(p)
+            if mt in EPH_SYS:
+                sy, nb = EPH_SYS[mt]
+                b = BitReader(p)
+                b.u(12)
+                sats.setdefault((sta, mt), set()).add("%s%02d" % (sy, b.u(nb)))
+    for (sta, mt), s in sorted(sats.items()):
+        print("%s %s %s" % (sta, mt, " ".join(sorted(s))))
+
+
 def main():
     ap = argparse.ArgumentParser(description=__doc__,
@@ -269,4 +290,8 @@
     p.set_defaults(func=cmd_crs)
 
+    p = sub.add_parser("ephsats", help="satellite IDs of the ephemeris messages")
+    p.add_argument("input")
+    p.set_defaults(func=cmd_ephsats)
+
     args = ap.parse_args()
     args.func(args)
Index: trunk/BNC/tests/tools/mk_eph_g39.py
===================================================================
--- trunk/BNC/tests/tools/mk_eph_g39.py	(revision 11215)
+++ trunk/BNC/tests/tools/mk_eph_g39.py	(revision 11215)
@@ -0,0 +1,42 @@
+#!/usr/bin/env python3
+"""Test data for satellites outside BNC's range (case eph_out_of_range): the
+first 6 minutes of data/eph_vote_261118_20min.raw, where each GPS ephemeris
+(1019) of G24 from ASCG00SHN0, KERG00ATF0 and OWMG00NZL0 is followed by a copy
+with satellite ID 39 (as broadcast by the NTS-3 test signal since 30 Sep 2026).
+
+    mk_eph_g39.py data/eph_vote_261118_20min.raw data/eph_g39_261118_6min.raw
+"""
+import sys
+import bncraw
+
+STATIONS = {"ASCG00SHN0", "KERG00ATF0", "OWMG00NZL0"}
+
+
+def with_sv(payload, sv):
+    p = bytearray(payload)          # satellite ID: bits 12-17 after the message number
+    p[1] = (p[1] & 0xF0) | (sv >> 2)
+    p[2] = (p[2] & 0x3F) | ((sv & 0x03) << 6)
+    return bytes(p)
+
+
+def main():
+    src, out = sys.argv[1], sys.argv[2]
+    chunks = []
+    framers = {}
+    for t, sta, fmt, data in bncraw.read_chunks(src):
+        if t >= "2026-11-18T17:49":
+            break
+        chunks.append((t, sta, fmt, data))
+        if sta not in STATIONS:
+            continue
+        extra = b""
+        for p in framers.setdefault(sta, bncraw.Rtcm3Framer()).feed(data):
+            if bncraw.msg_type(p) == "1019" and bncraw.BitReader(p).u(18) & 0x3F == 24:
+                extra += bncraw.frame(with_sv(p, 39))
+        if extra:
+            chunks.append((t, sta, fmt, extra))
+    bncraw.write_chunks(out, chunks)
+
+
+if __name__ == "__main__":
+    main()
