discuss-gnuradio
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Discuss-gnuradio] Block for Doppler shift correction


From: Iain Young, G7III
Subject: Re: [Discuss-gnuradio] Block for Doppler shift correction
Date: Sat, 01 Aug 2015 09:33:03 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.4.0

Hi Wolfgang,

You Wrote:

On 01/08/15 09:17, Wolfgang Nagele wrote:
Hi,

I've recently needed to correct some satellite signals for Doppler
shift. I found that there was no easy way to do this yet - so I've

Interesting. The way I did it was the following (using predict, rather
than gpredict):

   a) Add a XMLRPC Server block to my flowgraph
   b) Write a piece of python glue code which:
      i) Gets the normalised doppler info from predict via UDP 1210
      ii) Calculates the correct doppler for the s/c frequency
      iii) Sends it onto gnuradio to set a variable, which twiddles
a FIR filter by the correct amount rather than mixing via a multiply
block.

Here is a version of the whole thing used for tracking Funcube-1
aka AO-73. I use similar scripts for doppler correcting the NOAA birds
as well, and do have a version which handles multiple spacecraft on one
flowgraph


#!/usr/bin/env python

import sys
import time
import socket
import xmlrpclib

# Create UDP Socket
predsock = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)

# Create XML Object
s = xmlrpclib.Server("http://localhost:8080";);

# Get Satellite object or name
s_c = str(sys.argv[1]);

doppler_msg = "GET_DOPPLER " + s_c

while True:
        # Get Doppler from Predict
        predsock.sendto(doppler_msg , ("127.0.0.1",1210))
        doppler_str,predaddr  = predsock.recvfrom(24)
        # Adjust for correct frequency
        dopp_float = float(doppler_str)
        dopp_freq = (145.935/100.000)*dopp_float
        print dopp_freq , dopp_float

        # Send to grc
        try:
                s.set_dopp_freq(dopp_freq)
        except socket.error:
                pass
        # Sleep
        time.sleep(1)


All the Best

Iain





reply via email to

[Prev in Thread] Current Thread [Next in Thread]