# Sync input streams on VOR Signal

**URL:** <https://www.ruby-forum.com/t/sync-input-streams-on-vor-signal/242719>\
**Category:** GNU Radio\
**Created:** [July 20, 2015, 5:38pm UTC](https://www.ruby-forum.com/t/sync-input-streams-on-vor-signal/242719 "2015-07-20T17:38:27Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Sadaf\_N](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/858c86/32.png) [@Sadaf\_N](https://www.ruby-forum.com/u/Sadaf_N)\
**Post date:** [July 20, 2015, 5:38pm UTC](https://www.ruby-forum.com/t/sync-input-streams-on-vor-signal/242719/1 "2015-07-20T17:38:27Z")

</div>

Hello,

I am trying to process a VOR signal. My blocks look like the following.

```
                        Source
                          v
                       Resample
                          v
                ______Demod AM__________
               v v
         Filter 30 Hz Filter 9960 Hz
               | v
               | Demod FM
               | v
               | Filter 30 Hz
               | _____________________ |
                          | |
                          v v
                    Phase Comparator

```

The problem is that by the time both sample streams get to the Phase  
Comparator the streams are out of sync because the right side has more  
to process and GNURadio blocks are asynchronous. I have tried adding a  
block to generate a tag before the “Demod AM” block and making the Phase  
Comparator wait to process until it receives the tag on both streams,  
but that appears to not work. In the Phase Comparator I’m basically  
calling “Consume(0, 0); Consume(1, 0);” until I receive both tags.

Does anyone know of a better way to try to sync up the sample streams?

Thank You.

---

<div class="post-metadata">

**Author:** ![cflach](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/e99b99/32.png) [@cflach](https://www.ruby-forum.com/u/cflach)\
**Post date:** [July 27, 2015, 3:10pm UTC](https://www.ruby-forum.com/t/sync-input-streams-on-vor-signal/242719/2 "2015-07-27T15:10:18Z")

</div>

I’ve had the same problems with my VOR Receiver.

First of all, I’ve used a sampling rate which allowed me to have 1  
degree per 1 sample. (Each sample the signal increases its phase by 1  
degree).

I’ve used a delay block on the left hand part of the flowgraph along  
with a “calibrated signal”, adjusting the delay I was able to null the  
output of the comparator.  
This way the receiver was calibrated.

The signal was generated by another flowgraph that simulates a VOR  
signal on radial ZERO.

VOR signal normally has 1 or 2 degrees tolerance.

Hope that helps.

IZ5XRC

PS. Could you please describe the phase comparator ?
