[aprssig] Kendwood D700 radio control perl script

Andrew Rich vk4tec at tech-software.net
Thu Aug 25 16:30:57 EDT 2005


Improved

Instead of setting the freq every 15 seconds, ask nova every 1 second for a
change, and
issue a freq chenge only if a change is necessary.

#!/usr/bin/perl
#
# Control KENWOOD D700 for doppler with corrections from NOVA
#
use Net::Telnet;
use Math::Round;
my $host = "192.168.1.101";
my $t = new Net::Telnet(Timeout=> '5', port => '9947');
$t->errmode('return');
$t->Net::Telnet::open($host);
sleep 2;
print $t "SUMMARY\n";
$frequency = '437975000';
# $frequency = '435300000';
# $frequency = '436795000';
# $frequency = '435225000';
while (<$t>)
{
print $t "SUMMARY\n";
sleep 1;
$date = `date +%d/%m/%y" "%H:%M:%S`;
chop $date;
@data = split (/:/);
$rr = $data[3];
@doppler = split (/ /,$data[3]);
$shift = -$frequency * $doppler[0] * (1.0/299792.458);
$newfreq = $frequency + $shift;
$newfreq1 = substr($newfreq,0,6);
$rounded = nearest(5,$newfreq1) ;
if ($store != $rounded)
{
print "DATE: $date \n";
print "NOVA: ";
print $_;
print "FREQ: $frequency \n";
print "DOPP: $shift kHz\n";
print "D700: FQ 00".$rounded."000,0\n";
print "TUNE: ".substr($rounded,0,3).".".substr($rounded,3,3)." MHz \n\n";
open (comport, "> /dev/ttyS0");
print comport "FQ 00".$rounded."000,0\n";
close(comport);
}
$store = $rounded;
}
$t->close();





More information about the aprssig mailing list