[Date Prev][Date Next][Thread Prev][Thread Next] - [Date Index][Thread Index][Author Index]

RE: Kenwood D700 and Doppler (PCSAT2)



Used perl

#!/usr/bin/perl
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';
while (<$t>)
{
print $t "SUMMARY\n";
sleep 10;
@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) ;
print "FQ 00".$rounded."000,0\n";
open (comport, "> /dev/ttyS0");
print comport "FQ 00".$rounded."000,0\n";
close(comport);
}
$t->close();                       

FQ 00436790000,0
FQ 00436790000,0
FQ 00436790000,0
FQ 00436785000,0
FQ 00436785000,0
FQ 00436785000,0
FQ 00436785000,0
FQ 00436785000,0
FQ 00436785000,0
FQ 00436785000,0
FQ 00436785000,0
FQ 00436785000,0
----
Sent via amsat-bb@amsat.org. Opinions expressed are those of the author.
Not an AMSAT member? Join now to support the amateur satellite program!
To unsubscribe, send "unsubscribe amsat-bb" to Majordomo@amsat.org



AMSAT Top AMSAT Home