nearlink_sdr.phy.measurement¶
位置信息测量信号 -- TXS-10002-2025 标准 6.2.4
实现 SLE 位置信息测量所需的信号生成:
窄带波形测量信号 1 (6.2.4.1)
窄带波形测量信号 2 (6.2.4.2)
多天线测量信号天线对排序 (6.2.4.3)
Module Contents¶
Classes¶
测量信号 1 的安全类型配置。 |
Functions¶
随机天线对集合 (使用第三安全序列置乱) (6.2.4.3)。 |
|
顺序天线对集合: 优先变更后发节点天线 (6.2.4.3)。 |
|
生成测量信号 1 的比特序列 (6.2.4.1)。 |
|
生成测量信号 2 的复数基带波形 (6.2.4.2)。 |
API¶
- class nearlink_sdr.phy.measurement.SecurityType[源代码]¶
Bases:
enum.IntEnum测量信号 1 的安全类型配置。
Initialization
Initialize self. See help(type(self)) for accurate signature.
- TYPE_1¶
1
- TYPE_2¶
2
- TYPE_3¶
3
- TYPE_4¶
4
- nearlink_sdr.phy.measurement.antenna_pair_order_random(m: int, n: int, seed: bytes, slot_number: int, k: int, kdf_type: int = 0) list[tuple[int, int]][源代码]¶
随机天线对集合 (使用第三安全序列置乱) (6.2.4.3)。
- 参数:
m -- 发送天线数
n -- 接收天线数
seed -- 安全随机种子 (16 字节)
slot_number -- 起始调度时隙号
k -- 随机数位宽
kdf_type -- 0=AES-CMAC, 1=HMAC-SM3
- 返回:
随机排列的天线对列表 [(tx_ant, rx_ant), ...]
- nearlink_sdr.phy.measurement.antenna_pair_order_sequential(m: int, n: int) list[tuple[int, int]][源代码]¶
顺序天线对集合: 优先变更后发节点天线 (6.2.4.3)。
- 参数:
m -- 发送天线数
n -- 接收天线数
- 返回:
天线对列表 [(tx_ant, rx_ant), ...]
示例: m=3, n=2: [(0,0), (0,1), (1,0), (1,1), (2,0), (2,1)]
- nearlink_sdr.phy.measurement.measurement_signal_1(n_measur: int, security_type: nearlink_sdr.phy.measurement.SecurityType, seed: bytes = b'\x00' * 16, slot_number: int = 0, is_tx: bool = True, n_disturb_max: int = 11, kdf_type: int = 0) numpy.ndarray[源代码]¶
生成测量信号 1 的比特序列 (6.2.4.1)。
无相位旋转 BPSK 调制, 返回比特序列。
- 参数:
n_measur -- 测量序列长度 [16, 32, 64, 128, 256, 512, 1024, 2048]
security_type -- 安全类型 (1~4)
seed -- 安全随机种子 (16 字节)
slot_number -- 起始调度时隙号
is_tx -- True=先发节点, False=后发节点
n_disturb_max -- 最大扰动符号数配置 [0-11]
kdf_type -- 0=AES-CMAC, 1=HMAC-SM3
- 返回:
np.ndarray, dtype=int, 长度 n_measur
- nearlink_sdr.phy.measurement.measurement_signal_2(n_tones: int, bandwidth_mhz: int, duration_us: float, sample_rate: float, phase_set: int = 1) numpy.ndarray[源代码]¶
生成测量信号 2 的复数基带波形 (6.2.4.2)。
多音信号, 频率对称分布。
- 参数:
n_tones -- 音的个数 [1, 2, 4, 8]
bandwidth_mhz -- SLE 带宽 [1, 2, 4] MHz
duration_us -- 信号时长 (微秒)
sample_rate -- 采样率 (Hz)
phase_set -- 相位集合 [1, 2], N≥4 时有效
- 返回:
np.ndarray, dtype=complex128, 复数基带波形