diff options
| author | hibby <d@vehibberd.com> | 2018-02-16 15:18:44 +0000 |
|---|---|---|
| committer | hibby <d@vehibberd.com> | 2018-02-16 15:18:44 +0000 |
| commit | 368f5331a7641772aa7e0cd1feea57d09a394a36 (patch) | |
| tree | b421ac60cc6eb726896ea268ea24e47fc4ce7c88 /lib/fix_contest_msg.f90 | |
| parent | 71c717edc92fa771c857b3c2e5ed65f523f68f90 (diff) | |
| parent | 37f727ac0746fd85504aa46c1f023c09b3eff33a (diff) | |
Update upstream source from tag 'upstream/1.8.0+repack'
Update to upstream version '1.8.0+repack'
with Debian dir a83ef78cb70a32d1211871fdc08f3ffa295e45a8
Diffstat (limited to 'lib/fix_contest_msg.f90')
| -rw-r--r-- | lib/fix_contest_msg.f90 | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/lib/fix_contest_msg.f90 b/lib/fix_contest_msg.f90 new file mode 100644 index 00000000..8c0345e8 --- /dev/null +++ b/lib/fix_contest_msg.f90 @@ -0,0 +1,32 @@ +subroutine fix_contest_msg(mygrid,msg) + +! If distance from mygrid to grid1 is more thsn 10000 km, change "grid1" +! to "R grid2" where grid2 is the antipodes of grid1. + + character*6 mygrid + character*22 msg + character*6 g1,g2 + logical isgrid + + isgrid(g1)=g1(1:1).ge.'A' .and. g1(1:1).le.'R' .and. g1(2:2).ge.'A' .and. & + g1(2:2).le.'R' .and. g1(3:3).ge.'0' .and. g1(3:3).le.'9' .and. & + g1(4:4).ge.'0' .and. g1(4:4).le.'9' .and. g1(1:4).ne.'RR73' + + n=len(trim(msg)) + if(n.lt.4) return + + g1=msg(n-3:n)//' ' + if(isgrid(g1)) then + call azdist(mygrid,g1,0.d0,nAz,nEl,nDmiles,nDkm,nHotAz,nHotABetter) + if(ndkm.gt.10000) then + call grid2deg(g1,dlong,dlat) + dlong=dlong+180.0 + if(dlong.gt.180.0) dlong=dlong-360.0 + dlat=-dlat + call deg2grid(dlong,dlat,g2) + msg=msg(1:n-4)//'R '//g2(1:4) + endif + endif + + return +end subroutine fix_contest_msg |
