mirror of
https://github.com/saitohirga/WSJT-X.git
synced 2024-11-12 07:06:17 -05:00
Protect against locator at antipodes causing undefined azimuth.
git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@7376 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
This commit is contained in:
parent
e21f69b5e9
commit
6977ecbbdf
@ -49,11 +49,9 @@ subroutine azdist(grid1,grid2,utch,nAz,nEl,nDmiles,nDkm,nHotAz,nHotABetter)
|
||||
HotABetter=.true.
|
||||
go to 900
|
||||
endif
|
||||
|
||||
call grid2deg(MyGrid,dlong1,dlat1)
|
||||
call grid2deg(HisGrid,dlong2,dlat2)
|
||||
eps=1.e-6
|
||||
if(abs(dlat1-dlat2).lt.eps .and. abs(dlong1-dlong2).lt.eps) then
|
||||
Az=0.
|
||||
Dmiles=0.
|
||||
Dkm=0.0
|
||||
@ -61,11 +59,17 @@ subroutine azdist(grid1,grid2,utch,nAz,nEl,nDmiles,nDkm,nHotAz,nHotABetter)
|
||||
HotA=0.
|
||||
HotB=0.
|
||||
HotABetter=.true.
|
||||
if(abs(dlat1-dlat2).lt.eps .and. abs(dlong1-dlong2).lt.eps) go to 900
|
||||
|
||||
difflong=mod(dlong1-dlong2+720.0,360.0)
|
||||
if(abs(dlat1+dlat2).lt.eps .and. abs(difflong-180.0).lt.eps) then
|
||||
! Antipodes
|
||||
Dkm=20400
|
||||
go to 900
|
||||
else
|
||||
call geodist(dlat1,dlong1,dlat2,dlong2,Az,Baz,Dkm)
|
||||
endif
|
||||
|
||||
call geodist(dlat1,dlong1,dlat2,dlong2,Az,Baz,Dkm)
|
||||
|
||||
ndkm=Dkm/100
|
||||
j=ndkm-4
|
||||
if(j.lt.1) j=1
|
||||
|
Loading…
Reference in New Issue
Block a user