| 
									
										
										
										
											2017-07-27 18:57:53 +00:00
										 |  |  | subroutine fix_contest_msg(mygrid,msg)
 | 
					
						
							| 
									
										
										
										
											2016-12-17 21:18:47 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2017-07-27 18:57:53 +00:00
										 |  |  | ! If distance from mygrid to grid1 is more thsn 10000 km, change "grid1"
 | 
					
						
							|  |  |  | ! to "R grid2" where grid2 is the antipodes of grid1.
 | 
					
						
							| 
									
										
										
										
											2016-12-17 21:18:47 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2017-07-27 18:57:53 +00:00
										 |  |  |   character*6 mygrid
 | 
					
						
							| 
									
										
										
										
											2016-12-18 02:46:04 +00:00
										 |  |  |   character*22 msg
 | 
					
						
							| 
									
										
										
										
											2016-12-17 21:18:47 +00:00
										 |  |  |   character*6 g1,g2
 | 
					
						
							|  |  |  |   logical isgrid
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2017-07-27 20:17:30 +00:00
										 |  |  |   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'
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2016-12-18 02:46:04 +00:00
										 |  |  |   n=len(trim(msg))
 | 
					
						
							| 
									
										
										
										
											2017-07-09 17:46:02 +00:00
										 |  |  |   if(n.lt.4) return
 | 
					
						
							| 
									
										
										
										
											2017-07-27 18:57:53 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2016-12-18 02:46:04 +00:00
										 |  |  |   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)
 | 
					
						
							| 
									
										
										
										
											2016-12-17 21:18:47 +00:00
										 |  |  |      endif
 | 
					
						
							|  |  |  |   endif
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |   return
 | 
					
						
							|  |  |  | end subroutine fix_contest_msg
 |