2020-06-16 15:43:36 +02:00
|
|
|
$NetBSD: patch-predict.c,v 1.3 2020/06/16 13:43:36 mef Exp $
|
ham/predict: add new package for version 2.2.3
predict is a curses based satellite tracking/orbital prediction program
PREDICT provides real-time satellite tracking and orbital prediction
information to users and client applications in a variety of ways:
Through the system console
Through the command line
Through a network socket
Through the generation of audio speech
Data such as a spacecraft's sub-satellite point, azimuth and elevation
headings, Doppler shift, path loss, slant range, orbital altitude,
orbital velocity, footprint diameter, orbital phase (mean anomaly),
squint angle, eclipse depth, the time and date of the next AOS (or LOS
of the current pass), orbit number, and sunlight and visibility
information are provided on a real-time basis. PREDICT can also track
(or predict the position of) the Sun and Moon. PREDICT also has the
ability to control AZ/EL antenna rotators to maintain accurate
orientation in the direction of communication satellites. As an aid in
locating and tracking satellites through optical means, PREDICT can
articulate tracking coordinates and visibility information as plain
speech.
2018-06-04 09:18:47 +02:00
|
|
|
|
|
|
|
sundry fixes to server mode:
|
|
|
|
provide default port if getservbyname fails
|
|
|
|
provide default proto if getprotobyname fails
|
|
|
|
fix inexplicable incorrect listen call
|
|
|
|
remove reference to exended ascii symbol for degrees
|
|
|
|
|
|
|
|
--- predict.c.orig 2006-05-14 23:19:56.000000000 +0000
|
|
|
|
+++ predict.c
|
|
|
|
@@ -1984,6 +1984,7 @@ int passivesock(char *service, char *pro
|
|
|
|
|
|
|
|
struct servent *pse;
|
|
|
|
struct protoent *ppe;
|
|
|
|
+ struct protoent ppedef = { 0, 0, 17 }; // udp
|
|
|
|
struct sockaddr_in sin;
|
|
|
|
int sd, type;
|
|
|
|
|
|
|
|
@@ -1996,14 +1997,12 @@ int passivesock(char *service, char *pro
|
|
|
|
|
|
|
|
else if ((sin.sin_port=htons((unsigned short)atoi(service)))==0)
|
|
|
|
{
|
|
|
|
- bailout("Can't get service");
|
|
|
|
- exit(-1);
|
|
|
|
+ sin.sin_port=htons(1210);
|
|
|
|
}
|
|
|
|
|
|
|
|
if ((ppe=getprotobyname(protocol))==0)
|
|
|
|
{
|
|
|
|
- bailout("Can't get protocol");
|
|
|
|
- exit(-1);
|
|
|
|
+ ppe = &ppedef;
|
|
|
|
}
|
|
|
|
|
|
|
|
if (strcmp(protocol,"udp")==0)
|
|
|
|
@@ -2025,7 +2024,7 @@ int passivesock(char *service, char *pro
|
|
|
|
exit(-1);
|
|
|
|
}
|
|
|
|
|
|
|
|
- if ((type=SOCK_STREAM && listen(s,qlen))<0)
|
|
|
|
+ if (type==SOCK_STREAM && listen(sd,qlen)<0)
|
|
|
|
{
|
|
|
|
bailout("Listen fail");
|
|
|
|
exit(-1);
|
|
|
|
@@ -5002,7 +5001,7 @@ char speak;
|
|
|
|
mvprintw(7+tshift,29,"%0.f ",(3600.0*sat_vel)*km2mi);
|
|
|
|
mvprintw(8+tshift,29,"%0.f ",3600.0*sat_vel);
|
|
|
|
|
|
|
|
- mvprintw(18+bshift,3,"%+6.2f%c ",eclipse_depth/deg2rad,176);
|
|
|
|
+ mvprintw(18+bshift,3,"%+6.2f ",eclipse_depth/deg2rad);
|
|
|
|
mvprintw(18+bshift,20,"%5.1f",256.0*(phase/twopi));
|
|
|
|
mvprintw(18+bshift,37,"%s",ephem);
|
|
|
|
|