spandsp  0.0.6
v22bis_rx_1200_fixed_rrc.h
1 #define RX_PULSESHAPER_1200_GAIN 32767.000000f
2 #define RX_PULSESHAPER_1200_COEFF_SETS 12
3 static const int16_t rx_pulseshaper_1200_re[RX_PULSESHAPER_1200_COEFF_SETS][27] =
4 {
5  {
6  -252, /* Filter 0 */
7  -65,
8  62,
9  -61,
10  -169,
11  175,
12  848,
13  1005,
14  0,
15  -1574,
16  -2144,
17  -774,
18  1579,
19  2779,
20  1633,
21  -830,
22  -2385,
23  -1824,
24  0,
25  1295,
26  1182,
27  275,
28  -334,
29  -288,
30  -36,
31  -32,
32  -202
33  },
34  {
35  -250, /* Filter 1 */
36  -63,
37  55,
38  -78,
39  -182,
40  183,
41  875,
42  1029,
43  0,
44  -1596,
45  -2167,
46  -780,
47  1585,
48  2783,
49  1631,
50  -826,
51  -2367,
52  -1805,
53  0,
54  1271,
55  1153,
56  267,
57  -319,
58  -267,
59  -26,
60  -36,
61  -208
62  },
63  {
64  -247, /* Filter 2 */
65  -61,
66  48,
67  -95,
68  -195,
69  191,
70  903,
71  1053,
72  0,
73  -1618,
74  -2189,
75  -785,
76  1591,
77  2786,
78  1628,
79  -822,
80  -2349,
81  -1785,
82  0,
83  1247,
84  1125,
85  258,
86  -305,
87  -246,
88  -17,
89  -39,
90  -214
91  },
92  {
93  -244, /* Filter 3 */
94  -59,
95  40,
96  -113,
97  -208,
98  199,
99  930,
100  1078,
101  0,
102  -1640,
103  -2210,
104  -791,
105  1597,
106  2788,
107  1625,
108  -818,
109  -2330,
110  -1765,
111  0,
112  1223,
113  1097,
114  249,
115  -290,
116  -226,
117  -8,
118  -42,
119  -220
120  },
121  {
122  -241, /* Filter 4 */
123  -56,
124  33,
125  -131,
126  -221,
127  207,
128  957,
129  1102,
130  0,
131  -1661,
132  -2231,
133  -796,
134  1603,
135  2789,
136  1621,
137  -814,
138  -2311,
139  -1745,
140  0,
141  1199,
142  1069,
143  241,
144  -276,
145  -206,
146  0,
147  -45,
148  -225
149  },
150  {
151  -238, /* Filter 5 */
152  -54,
153  25,
154  -149,
155  -234,
156  216,
157  985,
158  1126,
159  0,
160  -1683,
161  -2252,
162  -801,
163  1608,
164  2790,
165  1617,
166  -810,
167  -2292,
168  -1724,
169  0,
170  1175,
171  1041,
172  232,
173  -262,
174  -187,
175  8,
176  -48,
177  -229
178  },
179  {
180  -234, /* Filter 6 */
181  -51,
182  17,
183  -168,
184  -248,
185  224,
186  1013,
187  1150,
188  0,
189  -1704,
190  -2272,
191  -805,
192  1613,
193  2791,
194  1613,
195  -805,
196  -2272,
197  -1704,
198  0,
199  1150,
200  1013,
201  224,
202  -248,
203  -168,
204  17,
205  -51,
206  -234
207  },
208  {
209  -229, /* Filter 7 */
210  -48,
211  8,
212  -187,
213  -262,
214  232,
215  1041,
216  1175,
217  0,
218  -1724,
219  -2292,
220  -810,
221  1617,
222  2790,
223  1608,
224  -801,
225  -2252,
226  -1683,
227  0,
228  1126,
229  985,
230  216,
231  -234,
232  -149,
233  25,
234  -54,
235  -238
236  },
237  {
238  -225, /* Filter 8 */
239  -45,
240  0,
241  -206,
242  -276,
243  241,
244  1069,
245  1199,
246  0,
247  -1745,
248  -2311,
249  -814,
250  1621,
251  2789,
252  1603,
253  -796,
254  -2231,
255  -1661,
256  0,
257  1102,
258  957,
259  207,
260  -221,
261  -131,
262  33,
263  -56,
264  -241
265  },
266  {
267  -220, /* Filter 9 */
268  -42,
269  -8,
270  -226,
271  -290,
272  249,
273  1097,
274  1223,
275  0,
276  -1765,
277  -2330,
278  -818,
279  1625,
280  2788,
281  1597,
282  -791,
283  -2210,
284  -1640,
285  0,
286  1078,
287  930,
288  199,
289  -208,
290  -113,
291  40,
292  -59,
293  -244
294  },
295  {
296  -214, /* Filter 10 */
297  -39,
298  -17,
299  -246,
300  -305,
301  258,
302  1125,
303  1247,
304  0,
305  -1785,
306  -2349,
307  -822,
308  1628,
309  2786,
310  1591,
311  -785,
312  -2189,
313  -1618,
314  0,
315  1053,
316  903,
317  191,
318  -195,
319  -95,
320  48,
321  -61,
322  -247
323  },
324  {
325  -208, /* Filter 11 */
326  -36,
327  -26,
328  -267,
329  -319,
330  267,
331  1153,
332  1271,
333  0,
334  -1805,
335  -2367,
336  -826,
337  1631,
338  2783,
339  1585,
340  -780,
341  -2167,
342  -1596,
343  0,
344  1029,
345  875,
346  183,
347  -182,
348  -78,
349  55,
350  -63,
351  -250
352  }
353 };
354 static const int16_t rx_pulseshaper_1200_im[RX_PULSESHAPER_1200_COEFF_SETS][27] =
355 {
356  {
357  -82, /* Filter 0 */
358  -202,
359  -85,
360  0,
361  -233,
362  -541,
363  -275,
364  730,
365  1601,
366  1143,
367  -696,
368  -2385,
369  -2173,
370  0,
371  2248,
372  2555,
373  774,
374  -1325,
375  -1946,
376  -941,
377  384,
378  848,
379  460,
380  0,
381  -50,
382  100,
383  65
384  },
385  {
386  -81, /* Filter 1 */
387  -196,
388  -75,
389  0,
390  -250,
391  -565,
392  -284,
393  748,
394  1631,
395  1160,
396  -704,
397  -2402,
398  -2182,
399  0,
400  2245,
401  2544,
402  769,
403  -1311,
404  -1918,
405  -923,
406  374,
407  821,
408  440,
409  0,
410  -36,
411  111,
412  67
413  },
414  {
415  -80, /* Filter 2 */
416  -189,
417  -66,
418  0,
419  -268,
420  -590,
421  -293,
422  765,
423  1660,
424  1175,
425  -711,
426  -2418,
427  -2191,
428  0,
429  2241,
430  2532,
431  763,
432  -1297,
433  -1890,
434  -906,
435  365,
436  795,
437  419,
438  0,
439  -24,
440  121,
441  69
442  },
443  {
444  -79, /* Filter 3 */
445  -182,
446  -56,
447  0,
448  -286,
449  -614,
450  -302,
451  783,
452  1689,
453  1191,
454  -718,
455  -2434,
456  -2199,
457  0,
458  2236,
459  2519,
460  757,
461  -1282,
462  -1862,
463  -888,
464  356,
465  768,
466  400,
467  0,
468  -11,
469  131,
470  71
471  },
472  {
473  -78, /* Filter 4 */
474  -174,
475  -45,
476  0,
477  -304,
478  -639,
479  -311,
480  800,
481  1718,
482  1207,
483  -725,
484  -2450,
485  -2206,
486  0,
487  2231,
488  2507,
489  751,
490  -1268,
491  -1834,
492  -871,
493  347,
494  742,
495  380,
496  0,
497  0,
498  140,
499  73
500  },
501  {
502  -77, /* Filter 5 */
503  -166,
504  -34,
505  0,
506  -323,
507  -665,
508  -320,
509  818,
510  1748,
511  1222,
512  -731,
513  -2465,
514  -2213,
515  0,
516  2226,
517  2493,
518  744,
519  -1253,
520  -1805,
521  -853,
522  338,
523  716,
524  361,
525  0,
526  12,
527  149,
528  74
529  },
530  {
531  -76, /* Filter 6 */
532  -158,
533  -23,
534  0,
535  -341,
536  -690,
537  -329,
538  836,
539  1776,
540  1238,
541  -738,
542  -2479,
543  -2220,
544  0,
545  2220,
546  2479,
547  738,
548  -1238,
549  -1776,
550  -836,
551  329,
552  690,
553  341,
554  0,
555  23,
556  158,
557  76
558  },
559  {
560  -74, /* Filter 7 */
561  -149,
562  -12,
563  0,
564  -361,
565  -716,
566  -338,
567  853,
568  1805,
569  1253,
570  -744,
571  -2493,
572  -2226,
573  0,
574  2213,
575  2465,
576  731,
577  -1222,
578  -1748,
579  -818,
580  320,
581  665,
582  323,
583  0,
584  34,
585  166,
586  77
587  },
588  {
589  -73, /* Filter 8 */
590  -140,
591  0,
592  0,
593  -380,
594  -742,
595  -347,
596  871,
597  1834,
598  1268,
599  -751,
600  -2507,
601  -2231,
602  0,
603  2206,
604  2450,
605  725,
606  -1207,
607  -1718,
608  -800,
609  311,
610  639,
611  304,
612  0,
613  45,
614  174,
615  78
616  },
617  {
618  -71, /* Filter 9 */
619  -131,
620  11,
621  0,
622  -400,
623  -768,
624  -356,
625  888,
626  1862,
627  1282,
628  -757,
629  -2519,
630  -2236,
631  0,
632  2199,
633  2434,
634  718,
635  -1191,
636  -1689,
637  -783,
638  302,
639  614,
640  286,
641  0,
642  56,
643  182,
644  79
645  },
646  {
647  -69, /* Filter 10 */
648  -121,
649  24,
650  0,
651  -419,
652  -795,
653  -365,
654  906,
655  1890,
656  1297,
657  -763,
658  -2532,
659  -2241,
660  0,
661  2191,
662  2418,
663  711,
664  -1175,
665  -1660,
666  -765,
667  293,
668  590,
669  268,
670  0,
671  66,
672  189,
673  80
674  },
675  {
676  -67, /* Filter 11 */
677  -111,
678  36,
679  0,
680  -440,
681  -821,
682  -374,
683  923,
684  1918,
685  1311,
686  -769,
687  -2544,
688  -2245,
689  0,
690  2182,
691  2402,
692  704,
693  -1160,
694  -1631,
695  -748,
696  284,
697  565,
698  250,
699  0,
700  75,
701  196,
702  81
703  }
704 };
v22bis_state_s::scramble_reg
uint32_t scramble_reg
The register for the data scrambler.
Definition: private/v22bis.h:100
dds_advance
void dds_advance(uint32_t *phase_acc, int32_t phase_rate)
Advance the phase, without returning any new signal sample.
Definition: dds_int.c:362
v22bis_state_s::carrier_phase_rate
int32_t carrier_phase_rate
The update rate for the phase of the carrier (i.e. the DDS increment).
Definition: private/v22bis.h:116
SIG_STATUS_MODEM_RETRAIN_OCCURRED
@ SIG_STATUS_MODEM_RETRAIN_OCCURRED
Notification that a modem retrain has occurred.
Definition: async.h:83
v22bis_state_s::eq_delta
float eq_delta
The current delta factor for updating the equalizer coefficients.
Definition: private/v22bis.h:161
v22bis_state_s
Definition: private/v22bis.h:73
v22bis_state_s::carrier_phase
uint32_t carrier_phase
The current phase of the carrier (i.e. the DDS parameter).
Definition: private/v22bis.h:114
v22bis_state_s::eq_coeff
complexf_t eq_coeff[2 *7+1]
The adaptive equalizer coefficients.
Definition: private/v22bis.h:163
complexf_t
Definition: complex.h:43
SIG_STATUS_CARRIER_UP
@ SIG_STATUS_CARRIER_UP
The carrier signal is up. This merely indicates that carrier energy has been seen....
Definition: async.h:58
dds_advancef
void dds_advancef(uint32_t *phase_acc, int32_t phase_rate)
Advance the phase, without returning any new signal sample.
Definition: dds_float.c:2133
async.h
power_meter_current_dbm0
float power_meter_current_dbm0(power_meter_t *s)
Get the current power meter reading, in dBm0.
Definition: power_meter.c:120
v22bis_state_s::gardner_step
int gardner_step
Current step size of Gardner algorithm integration.
Definition: private/v22bis.h:183
v22bis_state_s::logging
logging_state_t logging
Error and flow logging control.
Definition: private/v22bis.h:246
v22bis_rx_signal_cutoff
void v22bis_rx_signal_cutoff(v22bis_state_t *s, float cutoff)
Definition: v22bis_rx.c:157
dds_phase_ratef
int32_t dds_phase_ratef(float frequency)
Find the phase rate equivalent to a frequency, in Hz.
Definition: dds_float.c:2109
v22bis_state_s::carrier_off_power
int32_t carrier_off_power
The power meter level at which carrier off is declared.
Definition: private/v22bis.h:130
dds_complexf
complexf_t dds_complexf(uint32_t *phase_acc, int32_t phase_rate)
Generate a complex floating point tone sample.
Definition: dds_float.c:2165
v22bis_state_s::carrier_on_power
int32_t carrier_on_power
The power meter level at which carrier on is declared.
Definition: private/v22bis.h:128
power_meter_update
int32_t power_meter_update(power_meter_t *s, int16_t amp)
Update a power meter.
Definition: power_meter.c:84
vec_circular_dot_prodf
float vec_circular_dot_prodf(const float x[], const float y[], int n, int pos)
Find the dot product of two float vectors, where the first is a circular buffer with an offset for th...
Definition: vector_float.c:852
v22bis_state_s::training_count
int training_count
A count of how far through the current training step we are.
Definition: private/v22bis.h:108
v22bis_state_s::scrambler_pattern_count
int scrambler_pattern_count
A counter for the number of consecutive bits of repeating pattern through the scrambler.
Definition: private/v22bis.h:103
v22bis.h
v22bis_rx_carrier_frequency
float v22bis_rx_carrier_frequency(v22bis_state_t *s)
Definition: v22bis_rx.c:139
v22bis_rx_set_qam_report_handler
void v22bis_rx_set_qam_report_handler(v22bis_state_t *s, qam_report_handler_t handler, void *user_data)
Definition: v22bis_rx.c:877
SPAN_DECLARE_NONSTD
SPAN_DECLARE_NONSTD(int) async_tx_get_bit(void *user_data)
Get the next bit of a transmitted serial bit stream.
v22bis_state_s::eq_buf
complexf_t eq_buf[15+1]
The equalizer signal buffer.
Definition: private/v22bis.h:165
v22bis_state_s::training_error
float training_error
A measure of how much mismatch there is between the real constellation, and the decoded symbol positi...
Definition: private/v22bis.h:169
complex.h
complexf_t::im
float im
Imaginary part.
Definition: complex.h:47
v22bis_rx_signal_power
float v22bis_rx_signal_power(v22bis_state_t *s)
Definition: v22bis_rx.c:151
v22bis_state_s::carrier_track_p
float carrier_track_p
The proportional part of the carrier tracking filter.
Definition: private/v22bis.h:171
v22bis_state_s::signal_present
int signal_present
>0 if a signal above the minimum is present. It may or may not be a V.22bis signal.
Definition: private/v22bis.h:111
v22bis_state_s::training
int training
0 if receiving user data. A training stage value during training
Definition: private/v22bis.h:106
v22bis_state_s::gardner_integrate
int gardner_integrate
Integration variable for damping the Gardner algorithm tests.
Definition: private/v22bis.h:181
v22bis_state_s::carrier_track_i
float carrier_track_i
The integral part of the carrier tracking filter.
Definition: private/v22bis.h:173
v22bis_state_s::bit_rate
int bit_rate
The maximum permitted bit rate of the modem. Valid values are 1200 and 2400.
Definition: private/v22bis.h:75
v22bis_state_s::put_bit
put_bit_func_t put_bit
The callback function used to put each bit received.
Definition: private/v22bis.h:83
v22bis_state_s::status_handler
modem_status_func_t status_handler
The callback function used to report modem status changes.
Definition: private/v22bis.h:87
SIG_STATUS_CARRIER_DOWN
@ SIG_STATUS_CARRIER_DOWN
The carrier signal has dropped.
Definition: async.h:54
v22bis_state_s::status_user_data
void * status_user_data
A user specified opaque pointer passed to the status function.
Definition: private/v22bis.h:89
vec_circular_dot_prodi16
int32_t vec_circular_dot_prodi16(const int16_t x[], const int16_t y[], int n, int pos)
Find the dot product of two int16_t vectors, where the first is a circular buffer with an offset for ...
Definition: vector_int.c:261
v22bis_rx_symbol_timing_correction
float v22bis_rx_symbol_timing_correction(v22bis_state_t *s)
Definition: v22bis_rx.c:145
v22bis_state_s::put_bit_user_data
void * put_bit_user_data
A user specified opaque pointer passed to the put_bit callback routine.
Definition: private/v22bis.h:85
v22bis_state_s::baud_phase
int baud_phase
The current fractional phase of the baud timing.
Definition: private/v22bis.h:188
v22bis_state_s::rrc_filter_step
int rrc_filter_step
Current offset into the RRC pulse shaping filter buffer.
Definition: private/v22bis.h:97
complexi16_t
Definition: complex.h:89
span_log
int span_log(logging_state_t *s, int level, const char *format,...)
Generate a log entry.
Definition: logging.c:84
v22bis_restart
int v22bis_restart(v22bis_state_t *s, int bit_rate)
Reinitialise an existing V.22bis modem context.
Definition: v22bis_tx.c:568
v22bis_state_s::total_baud_timing_correction
int total_baud_timing_correction
The total symbol timing correction since the carrier came up. This is only for performance analysis p...
Definition: private/v22bis.h:186
v29rx.h
dds_frequencyf
float dds_frequencyf(int32_t phase_rate)
Find the frequency, in Hz, equivalent to a phase rate.
Definition: dds_float.c:2115
v22bis_state_s::agc_scaling
float agc_scaling
The scaling factor accessed by the AGC algorithm.
Definition: private/v22bis.h:156
v22bis_state_s::constellation_state
int constellation_state
The code number for the current position in the constellation.
Definition: private/v22bis.h:132
v22bis_state_s::qam_user_data
void * qam_user_data
A user specified opaque pointer passed to the qam_report callback routine.
Definition: private/v22bis.h:123
power_meter_level_dbm0
int32_t power_meter_level_dbm0(float level)
Get the current power meter reading, in dBm0.
Definition: power_meter.c:91
logging.h
v22bis_state_s::calling_party
int calling_party
TRUE is this is the calling side modem.
Definition: private/v22bis.h:77
complexf_t::re
float re
Real part.
Definition: complex.h:45
v22bis_state_s::rrc_filter
float rrc_filter[27]
The root raised cosine (RRC) pulse shaping filter buffer.
Definition: private/v22bis.h:158
EQUALIZER_DELTA
#define EQUALIZER_DELTA
Definition: v22bis_rx.c:86
v22bis_state_s::eq_step
int eq_step
Current offset into the equalizer buffer.
Definition: private/v22bis.h:176
v22bis_rx_restart
int v22bis_rx_restart(v22bis_state_t *s)
Reinitialise an existing V.22bis modem receive context.
Definition: v22bis_rx.c:835
PULSESHAPER_COEFF_SETS
#define PULSESHAPER_COEFF_SETS
Definition: v22bis_rx.c:88
v22bis_rx_equalizer_state
int v22bis_rx_equalizer_state(v22bis_state_t *s, complexf_t **coeffs)
Get a snapshot of the current equalizer coefficients.
Definition: v22bis_rx.c:173
arctan2.h
power_meter_init
power_meter_t * power_meter_init(power_meter_t *s, int shift)
Initialise a power meter context.
Definition: power_meter.c:50
v22bis_state_s::qam_report
qam_report_handler_t qam_report
A callback function which may be enabled to report every symbol's constellation position.
Definition: private/v22bis.h:120
v22bis_state_s::rx_power
power_meter_t rx_power
A power meter, to measure the HPF'ed signal power in the channel.
Definition: private/v22bis.h:126
dds.h
v22bis_state_s::eq_put_step
int eq_put_step
Current write offset into the equalizer buffer.
Definition: private/v22bis.h:178