Sunday, March 21, 2010

Scipts for Digital Frequency Meter conversions

Here are a couple of little BASH scripts one to convert the displayed value of a DFM connected to a reciever, it subtracts 455 from the displayed value to give you the frequency you are tuned to. It is called dfm, you can change the offset to suit your reciever

hiddensoul@hiddenslap:~$ dfm 986

Entered Frequency:- 986  khz
Tuned Frequency:- 531 -Khz

Second is dfm-tune that lets you input the required frequency and it will give you the displayed frequency to tune to on the DFM by adding 455 to it,

hiddensoul@hiddenslap:~$ dfm-tune 531

Required Frequency:- 531  khz
DFM Displayed Frequency:- 986 -Khz

The 455 is the generated frequency to bring the RF up to IF, most radios use 455khz but it may vary as I said you can always change the offset to match your reciever/transciever If you dont know the off set tune to a known station, eg a local AM broadcast station if your rig covers the broadcast band, then subtract the stations frequency from the displayed value on the DFM, this will give you the offset you need for the scripts.

Not much and anyone could knock them up in a few minutes, but it makes my life easier, copyleft do what you want with them..

First dfm

#Enter walue in khz on command line following the command dfm eg dfm 986
#Calculate tuned frequency of reciever by subtracting 455khz from
#Displayed Value on Digital Frequency Meter
AKHZ=$(($1 - 455));echo;echo -n "Entered Frequency:-" $1 " khz";echo;echo -n "Tuned Frequency:-" $AKHZ "-Khz";echo;echo

second dfm-tune

#Enter value in khz on command line following the command dfm-tune eg dfm-tune 531
#Calculate displayed frequency of DFM by adding 455khz to required
# tuned frequency of reciever
AKHZ=$(($1 + 455));echo;echo -n "Required Frequency:-" $1 " khz";echo;echo -n "DFM Displayed Frequency:-" $AKHZ "-Khz";echo;echo

No comments:

Post a Comment