Koellner, Guenter schrieb:

>Hello Tobias,
>
>just a question, maybe I am simply missing something from the user manual: How 
>do you change Winrad L.O. frequency by, e.g. 25kHz. I only found the method of 
>tuning with the mouse wheel, while havign the mouse pointer above the digits 
>of the L.O. display. So one can change by 10kHz, but this will be rounded down 
>and so no actual change will happen. Maybe I have missed some possibility.
>
>73, Günter
>  
>
Hallo Günter !
Hallo Alberto !

It's much more easier than I thought of : To calculate the "new" LO 
frequency, we use the "integer division" method and an additive term for 
frequencies just above the old LO. Pseudocode :

The variables, all frequencies in Hz :
old_LO : the frequency the VFO is currently at.
new_LO : the frequency where any user input wants us to move to.
stepwidth : the VFO is capable of generating frequencies this step apart.

first we decide if we have to do some correction for later algorithms :
    if (the new_LO is higher than old_LO) and ( new_LO is less higher 
than one stepwidth),  then
    we add just one stepwidth to the new_LO.

Second step is to use the "integer division" to get a frequency at any 
VFO-step :
(Declaration of  "integer division" : after division the remainder is 
discarded, the output is an integer )

 new_LO is equal to :   (new_LO divided by stepwidth) multiplied by 
stepwidth.

Thats all.

At any frequency change below one stepwidth the new LO is moved away at 
least to the next stepwidth-dividable frequency. At higher frequency 
changes the new_LO is moved directly to the exact frequency or -at 
least- to the nearest lower frequency available.

    73 de dg3lv Tobias

A dummy DLL (without managing the hardware) is already running under 
WinRad 124b30.


_______________________________________________
Winrad mailing list
[email protected]
http://winrad.org/mailman/listinfo/winrad_winrad.org

Reply via email to