mirror of
				https://github.com/brmlab/osmo-tetra.git
				synced 2025-10-30 23:14:00 +01:00 
			
		
		
		
	update cqpsk demodulator to work with gnuradio 3.5
This commit is contained in:
		
							parent
							
								
									a4bdfabbbb
								
							
						
					
					
						commit
						2a7ed4e7ae
					
				
					 1 changed files with 22 additions and 2 deletions
				
			
		|  | @ -27,12 +27,21 @@ | ||||||
| differential PI/4 CQPSK modulation and demodulation. | differential PI/4 CQPSK modulation and demodulation. | ||||||
| """ | """ | ||||||
| 
 | 
 | ||||||
| from gnuradio import gr, gru, modulation_utils | from gnuradio import gr, gru | ||||||
| from math import pi, sqrt | from math import pi, sqrt | ||||||
| #import psk | #import psk | ||||||
| import cmath | import cmath | ||||||
| from pprint import pprint | from pprint import pprint | ||||||
| 
 | 
 | ||||||
|  | _def_has_gr_digital = False | ||||||
|  | 
 | ||||||
|  | # address gnuradio 3.5.x changes | ||||||
|  | try: | ||||||
|  |     from gnuradio import modulation_utils | ||||||
|  | except ImportError: | ||||||
|  |     from gnuradio import digital | ||||||
|  |     _def_has_gr_digital = True | ||||||
|  | 
 | ||||||
| # default values (used in __init__ and add_options) | # default values (used in __init__ and add_options) | ||||||
| _def_samples_per_symbol = 10 | _def_samples_per_symbol = 10 | ||||||
| _def_excess_bw = 0.35 | _def_excess_bw = 0.35 | ||||||
|  | @ -253,12 +262,23 @@ class cqpsk_demod(gr.hier_block2): | ||||||
|         fmin = -0.025 |         fmin = -0.025 | ||||||
|         fmax = 0.025 |         fmax = 0.025 | ||||||
|          |          | ||||||
|  | 	if not _def_has_gr_digital: | ||||||
|             self.receiver=gr.mpsk_receiver_cc(arity, pi/4.0, |             self.receiver=gr.mpsk_receiver_cc(arity, pi/4.0, | ||||||
|                                           self._costas_alpha, self._costas_beta, |                                           self._costas_alpha, self._costas_beta, | ||||||
|                                           fmin, fmax, |                                           fmin, fmax, | ||||||
|                                           self._mm_mu, self._mm_gain_mu, |                                           self._mm_mu, self._mm_gain_mu, | ||||||
|                                           self._mm_omega, self._mm_gain_omega, |                                           self._mm_omega, self._mm_gain_omega, | ||||||
|                                           self._mm_omega_relative_limit) |                                           self._mm_omega_relative_limit) | ||||||
|  | 	else: | ||||||
|  |             self.receiver=digital.mpsk_receiver_cc(arity, pi/4.0, | ||||||
|  |                                           2*pi/150, | ||||||
|  |                                           fmin, fmax, | ||||||
|  |                                           self._mm_mu, self._mm_gain_mu, | ||||||
|  |                                           self._mm_omega, self._mm_gain_omega, | ||||||
|  |                                           self._mm_omega_relative_limit) | ||||||
|  | 
 | ||||||
|  | 	    self.receiver.set_alpha(self._costas_alpha) | ||||||
|  | 	    self.receiver.set_beta(self._costas_beta) | ||||||
| 
 | 
 | ||||||
|         # Perform Differential decoding on the constellation |         # Perform Differential decoding on the constellation | ||||||
|         self.diffdec = gr.diff_phasor_cc() |         self.diffdec = gr.diff_phasor_cc() | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Dimitri Stolnikov
						Dimitri Stolnikov