Order Tray | Contact Us | Home | SIG Lists

[aprssig] Predict

Andrew Rich vk4tec at people.net.au
Thu Nov 8 03:15:45 UTC 2007


Predict is a command like thing.

It has a socket that lets programs talk to it.

I use PERL to ask it questions. You can find several graphics programs to
talk to it as well.

I even ran a java one the other day - think it was called Jpredict.

Anyways

predict (from a shell) will let you track in a text screen.

predict -s (from a shell) runs it in server mode - lets you talk to port
1210


#!/usr/bin/perl -w
use CGI;
use Socket;
use GD;
$x=0;
$y=0;

my $port = 1210;
my ($predict_server, $satellite);

#
# ISS
#

$satellite ="ISS";
$predict_server = "localhost";
my ($d1, $d2, $d3, $d4, $rawserver) = gethostbyname($predict_server);
my $serveraddr = pack("Sna4x8", 2, $port, $rawserver);
my $prototype = getprotobyname('udp');
socket(SOCKET,2,SOCK_DGRAM,$prototype) || die("No Socket\n");
$| = 1;  # no buffering
$SIG{ALRM} = \&time_out;
alarm(10);  # Force exit if no response from server
send(SOCKET, "GET_SAT $satellite\0" , 0 , $serveraddr) or die("UDP send
failed $!\n");
my $server_response = '';  # required by recv function
recv(SOCKET, $server_response, 100, 0) or die "UDP recv failed $!\n";
my ($name, $lat, $lon, $az, $el, $aos_seconds, $foot) = split /\n/,
$server_response;
#print $lat." ".$lon."\n";
my $aos_time_date = gmtime($aos_seconds);
close(SOCKET);

----------------------------------------------------------------------------
Andrew Rich VK4TEC
vk4tec at people.net.au <mailto:vk4tec at people.net.au>
http://www.tech-software.net




-----Original Message-----
From: aprssig-bounces at lists.tapr.org
[mailto:aprssig-bounces at lists.tapr.org]On Behalf Of James Jolin
Sent: Thursday, 8 November 2007 9:45 AM
To: TAPR APRS Mailing List
Subject: [aprssig] Predict


Anyone on this list know how to get Predict to run on linux?  I have
made a "shortcut" and when I click on it nothing happens.  I see Andrew
Rich has it running so I know it works.
Jim WA9ARB


_______________________________________________
aprssig mailing list
aprssig at lists.tapr.org
https://lists.tapr.org/cgi-bin/mailman/listinfo/aprssig





More information about the aprssig mailing list