osmo-gmr 0.2.104-2b98
Osmocom GMR-1
|
Files | |
file | pi4cxpsk.h |
Osmocom GMR-1 pi2-CBPSK, pi4-CBPSK and pi4-CQPSK modulation support header. | |
file | pi4cxpsk.c |
Osmocom GMR-1 pi2-CBPSK, pi4-CBPSK and pi4-CQPSK modulation support implementation. | |
Data Structures | |
struct | gmr1_pi4cxpsk_symbol |
pi4-CxPSK symbol description More... | |
struct | gmr1_pi4cxpsk_modulation |
pi4-CxPSK modulation description More... | |
struct | gmr1_pi4cxpsk_sync |
pi4-CxPSK Synchronization sequence segment description More... | |
struct | gmr1_pi4cxpsk_data |
pi4-CxPSK Data segment description More... | |
struct | gmr1_pi4cxpsk_burst |
pi4-CxPSK Burst format description More... | |
Macros | |
#define | GMR1_MAX_SYM_EBITS 2 |
Max e bits in a symbol. | |
#define | GMR1_MAX_SYNC 4 |
Max diff. sync seqs | |
#define | GMR1_MAX_SYNC_SYMS 32 |
Max sym in a sync seq | |
Functions | |
int | gmr1_pi4cxpsk_demod (struct gmr1_pi4cxpsk_burst *burst_type, struct osmo_cxvec *burst_in, int sps, float freq_shift, sbit_t *ebits, int *sync_id_p, float *toa_p, float *freq_err_p) |
All-in-one pi4-CxPSK demodulation method. More... | |
int | gmr1_pi4cxpsk_detect (struct gmr1_pi4cxpsk_burst **burst_types, float e_toa, struct osmo_cxvec *burst_in, int sps, float freq_shift, int *bt_id_p, int *sync_id_p, float *toa_p) |
Try to identify burst type by matching training sequences. More... | |
int | gmr1_pi4cxpsk_mod_order (struct osmo_cxvec *burst_in, int sps, float freq_shift) |
Estimates modulation order by comparing power of x^2 vs x^4. More... | |
int | gmr1_pi4cxpsk_mod (struct gmr1_pi4cxpsk_burst *burst_type, ubit_t *ebits, int sync_id, struct osmo_cxvec *burst_out) |
Modulates (currently at 1 sps) More... | |
Variables | |
struct gmr1_pi4cxpsk_modulation | gmr1_pi2cbpsk |
pi2-CBPSK modulation description | |
struct gmr1_pi4cxpsk_modulation | gmr1_pi4cbpsk |
pi4-CBPSK modulation description | |
struct gmr1_pi4cxpsk_modulation | gmr1_pi4cqpsk |
pi4-CQPSK modulation description | |
struct gmr1_pi4cxpsk_modulation | gmr1_pi2cbpsk |
pi2-CBPSK modulation description More... | |
struct gmr1_pi4cxpsk_modulation | gmr1_pi4cbpsk |
pi4-CBPSK modulation description More... | |
struct gmr1_pi4cxpsk_modulation | gmr1_pi4cqpsk |
pi4-CQPSK modulation description More... | |
int gmr1_pi4cxpsk_demod | ( | struct gmr1_pi4cxpsk_burst * | burst_type, |
struct osmo_cxvec * | burst_in, | ||
int | sps, | ||
float | freq_shift, | ||
sbit_t * | ebits, | ||
int * | sync_id_p, | ||
float * | toa_p, | ||
float * | freq_err_p | ||
) |
All-in-one pi4-CxPSK demodulation method.
[in] | burst_type | Burst format description |
[in] | burst_in | Complex signal of the burst |
[in] | sps | Oversampling used in the input complex signal |
[in] | freq_shift | Frequency shift to pre-apply to burst_in (rad/sym) |
[out] | ebits | Encoded soft bits return array |
[out] | sync_id_p | Pointer to sync sequence id return variable |
[out] | toa_p | Pointer to TOA return variable |
[out] | freq_err_p | Pointer to frequency error return variable (rad/sym) |
burst_in is expected to be longer than necessary. Any extra length will be used as 'search window' to find proper alignement. Good practice is to have a few samples too much in front and a few samples after the expected TOA.
int gmr1_pi4cxpsk_detect | ( | struct gmr1_pi4cxpsk_burst ** | burst_types, |
float | e_toa, | ||
struct osmo_cxvec * | burst_in, | ||
int | sps, | ||
float | freq_shift, | ||
int * | bt_id_p, | ||
int * | sync_id_p, | ||
float * | toa_p | ||
) |
Try to identify burst type by matching training sequences.
[in] | burst_types | Array of burst types to test (NULL terminated) |
[in] | e_toa | Expected time of arrival |
[in] | burst_in | Complex signal of the burst |
[in] | sps | Oversampling used in the input complex signal |
[in] | freq_shift | Frequency shift to pre-apply to burst_in (rad/sym) |
[out] | bt_id_p | Pointer to burst type ID return variable |
[out] | sync_id_p | Pointer to sync sequence id return variable |
[out] | toa_p | Pointer to TOA return variable |
The various burst types must be compatible in length and modulation !
References osmo_cxvec_sig_normalize(), and gmr1_pi4cxpsk_modulation::rotation.
int gmr1_pi4cxpsk_mod | ( | struct gmr1_pi4cxpsk_burst * | burst_type, |
ubit_t * | ebits, | ||
int | sync_id, | ||
struct osmo_cxvec * | burst_out | ||
) |
Modulates (currently at 1 sps)
[in] | burst_type | Burst format description |
[in] | ebits | Encoded hard bits to pack in the burst |
[in] | sync_id | The sequence id to use (0 if burst_type only has one) |
[out] | burst_out | Complex signal to fill with modulated symbols |
burst_out is expected to be long enough to contains the resulting symbols see the burst_type structure for how long that is.
References osmo_cxvec::len, gmr1_pi4cxpsk_burst::len, osmo_cxvec::max_len, and gmr1_pi4cxpsk_burst::mod.
int gmr1_pi4cxpsk_mod_order | ( | struct osmo_cxvec * | burst_in, |
int | sps, | ||
float | freq_shift | ||
) |
Estimates modulation order by comparing power of x^2 vs x^4.
[in] | burst_in | Complex signal of the burst |
[in] | sps | Oversampling used in the input complex signal |
[in] | freq_shift | Frequency shift to pre-apply to burst_in (rad/sym) |
Since x^4 only make sense for pi/4 variant, the pi/4 counter rotation is always applied.
References M_PIf, and osmo_cxvec_sig_normalize().
struct gmr1_pi4cxpsk_modulation gmr1_pi2cbpsk |
struct gmr1_pi4cxpsk_modulation gmr1_pi4cbpsk |
pi4-CBPSK modulation description
struct gmr1_pi4cxpsk_modulation gmr1_pi4cqpsk |
pi4-CQPSK modulation description