Ignore:
Timestamp:
20.03.2013 13:08:40 (6 years ago)
Author:
marcus
Message:

fixed zero division bug in computation of relative locations, this bug was in a very old routine, only detected on Suse 11.4, x86_64


(internal: r418 | klaus | 2013-03-06 16:38:59 +0100 (Wed, 06 Mar 2013) | 1 line)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • SH_SHM/trunk/source/earthloc.c

    r341 r916  
    9696 
    9797        /* executable code */ 
     98 
     99        /* check for equality */ 
     100        as = fabs(slat-elat) + fabs(slon-elon); 
     101        if  (as < 1.0e-5)  { 
     102                *distance = 0.0; 
     103                *azim = 0.0; 
     104                *bazim = 0.0; 
     105                return; 
     106        } /*endif*/ 
    98107 
    99108        mb_geocr( slon, slat, &as, &bs, &cs ); 
Note: See TracChangeset for help on using the changeset viewer.