Ignore:
Timestamp:
05/22/20 20:01:40 (5 years ago)
Author:
jdquinn
Message:

CHG: MATLAB -> Python translation; fixed syntax bug from previous commit.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • TabularUnified issm/trunk-jpl/src/m/coordsystems/flaglatlongradius.m

    r24817 r24901  
    1 function indices=flaglatlongradius(lat,long,lat0,long0,radius)
     1function indices=flaglatlongradius(lat,long,lat0,long0,radius) % {{{
    22%FLAGLATLONGRADIUS - given a vector of lat,long, and a circle of radius degrees around lat0,long0,
    33%                    return the indices into lat,long that are within this circle.
    4 %                    lat and long should be between -90 and 90, and -180 and +180 respectively. 
     4%                    lat and long should be between -90 and 90, and -180 and +180 respectively.
    55
    6         distance=sqrt( (lat-lat0).^2+ (long-long0).^2);
    7        
    86        %three cases, depending on whether our circle goes past the -180 +180 longitude line:
    97        if (long0-radius)<=-180,
     
    1513        distance=sqrt( (lat-lat0).^2+ (long-long0).^2);
    1614        indices=find(distance<=radius);
     15% }}}
Note: See TracChangeset for help on using the changeset viewer.