SimTX API v24/Packets/IqBlock: Difference between revisions
Appearance
SimTX API documentation |
Archive the v24 protocol reference: use the v24 templates, links and categories |
||
| (One intermediate revision by the same user not shown) | |||
| Line 1: | Line 1: | ||
{{SimTX API navigation}} | {{SimTX API v24 navigation}} | ||
{{SimTX packet | {{SimTX packet v24 | ||
| name = IqBlock | | name = IqBlock | ||
| id = 2 | | id = 2 | ||
| hex = 0x02 | | hex = 0x02 | ||
| direction = s2c | | direction = s2c | ||
| session = [[SimTX API/Receiver session|Receiver]] | | session = [[SimTX API v24/Receiver session|Receiver]] | ||
| size = 8 + chunkSamples × 4 bytes (INT16) | | size = 8 + chunkSamples × 4 bytes (INT16) | ||
| permission = None | | permission = None | ||
| group = receiver | | group = receiver | ||
}} | }} | ||
'''IqBlock''' carries one block of received complex baseband samples. A receiver session with role 1 receives a continuous stream of them after the [[SimTX API/Packets/IqStreamDescriptor|IqStreamDescriptor]], at the rate of the simulation. Role 6 receives [[SimTX API/Packets/TimedIqBlock|TimedIqBlock]] instead. | '''IqBlock''' carries one block of received complex baseband samples. A receiver session with role 1 receives a continuous stream of them after the [[SimTX API v24/Packets/IqStreamDescriptor|IqStreamDescriptor]], at the rate of the simulation. Role 6 receives [[SimTX API v24/Packets/TimedIqBlock|TimedIqBlock]] instead. | ||
== Layout == | == Layout == | ||
| Line 40: | Line 40: | ||
== See also == | == See also == | ||
* [[SimTX API/Receiver session#Decoding samples|Decoding samples]] | * [[SimTX API v24/Receiver session#Decoding samples|Decoding samples]] | ||
{{SimTX API navbox}} | {{SimTX API v24 navbox}} | ||
[[Category:SimTX API]] | [[Category:SimTX API v24]] | ||
Latest revision as of 16:15, 24 October 2026
| Packet ID | 2(0x02)
|
|---|---|
| Direction | Server → client |
| Session | Receiver |
| Body size | 8 + chunkSamples × 4 bytes (INT16) |
| Permission | None |
IqBlock carries one block of received complex baseband samples. A receiver session with role 1 receives a continuous stream of them after the IqStreamDescriptor, at the rate of the simulation. Role 6 receives TimedIqBlock instead.
Layout[edit | edit source]
| Field | Type | Description |
|---|---|---|
packetId |
u8 |
Always 2.
|
payloadLength |
i32 |
Length of the payload in bytes. At most 1 MiB. |
blockScale |
f32 |
First 4 bytes of the payload. Scale factor for this block. |
samples |
chunkSamples × (I, Q) |
Remainder of the payload. Interleaved I and Q integers: i16 each for INT16, i8 each for INT8.
|
Decoding[edit | edit source]
I = i_raw × blockScale / 32767 (INT16; use 127 for INT8)
Q = q_raw × blockScale / 32767
- A client should check that
payloadLengthequals4 + chunkSamples × 2 × bytesPerComponentand treat anything else as a protocol error. blockScaleis the block's peak component magnitude, at least 10−9. The server quantises each component asround(x × 32767 / blockScale).- A magnitude of 1.0 corresponds to −12 dBm at the receiver input. Components are clipped at ±1.0 before quantisation, so strong signals overload the receiver.
Delivery[edit | edit source]
- Blocks are sent in real time. The server queues at most 8 blocks per connection and drops the oldest when the queue is full. Missing blocks are not marked; a client that needs to detect gaps should use role 6 and its timestamps.
- A client that does not read for 5 seconds is disconnected.