2 # show the station details
4 # Copyright (c) 1998 - Dirk Koopman G1TLH
6 # Modifications by Iain Philipps G0RDI, 07-Dec-1998
9 my ($self, $line) = @_;
10 my @f = split /\s+/, uc $line;
16 return (1, $self->msg('e6')) if ($self->priv < 5);
17 my @calls = DXUser::get_all_calls();
18 foreach $call (@calls) {
19 my $ref = DXUser->get_current($call);
22 my $long = $ref->long;
23 my $sort = $ref->sort || "";
24 my $name = $ref->name || "";
25 my $qth = $ref->qth || "";
26 my $homenode = $ref->homenode || "";
27 my $qra = $ref->qra || "";
28 my $latlong = DXBearing::lltos($lat, $long) if $lat && $long;
29 $latlong = "" unless $latlong;
31 push @out, sprintf "%-9s %s %-12.12s %-27.27s %-9s %s %s", $call, $sort, $name, $qth, $homenode, $latlong, $qra;
35 my $ref = DXUser->get_current($call);
37 my $name = $ref->name;
40 my $long = $ref->long;
41 my $node = $ref->node;
42 my $homenode = $ref->homenode;
43 my $lastin = $ref->lastin;
44 my $latlong = DXBearing::lltos($lat, $long) if $lat || $long;
45 my $last = DXUtil::cldatetime($lastin) if $ref->lastin;
47 $qra = DXBearing::lltoqra($lat, $long) if !$qra && ($lat || $long);
49 my ($dx, $bearing, $miles);
51 my ($hlat, $hlong) = ($self->user->lat, $self->user->long);
52 ($hlat, $hlong) = DXBearing::qratoll($self->user->qra) if $self->user->qra && !$hlat && !$hlong;
53 if (!$hlat && !$hlong) {
54 $from = "From $main::mycall";
55 $hlat = $main::mylatitude;
56 $hlong = $main::mylongitude;
58 ($bearing, $dx) = DXBearing::bdist($hlat, $hlong, $lat, $long);
59 $miles = $dx * 0.62133785;
62 my $cref = DXCluster->get($call);
63 my $seek = $cref->mynode->call if $cref;
66 push @out, "User : $call (at $seek)";
68 push @out, "User : $call";
70 push @out, "Name : $name" if $name;
71 push @out, "Last Connect : $last" if $last;
72 push @out, "QTH : $qth" if $qth;
73 push @out, "Location : $latlong ($qra)" if $latlong || $qra ;
74 push @out, sprintf("Heading : %.0f Deg %.0f Mi. %.0f Km.", $bearing, $miles, $dx) if $latlong;
75 push @out, "Home Node : $homenode" if $homenode;
77 push @out, $self->msg('usernf', $call);