Class to handle bathymetry information and distance to coast.
|copyright:||Copyright 2013 Ifremer / Cersat.|
|license:||Released under GPL v3 license, see license.|
GreatCircle(rmajor, rminor, lon1, lat1, lon2, lat2)¶
formula for perfect sphere from Ed Williams’ ‘Aviation Formulary’ (http://williams.best.vwh.net/avform.htm)
code for ellipsoid posted to GMT mailing list by Jim Leven in Dec 1999
Contact: Jeff Whitaker <firstname.lastname@example.org>
Define a great circle by specifying: rmajor - radius of major axis of ellipsoid rminor - radius of minor axis of ellipsoid. lon1 - starting longitude of great circle lat1 - starting latitude lon2 - ending longitude lat2 - ending latitude All must be given in degrees.
Instance variables: distance - distance along great circle in radians. lon1,lat1,lon2,lat2 - start and end points (in radians).
compute arrays of npoints equally spaced intermediate points along the great circle.
input parameter npoints is the number of points to compute.
Returns lons, lats (lists with longitudes and latitudes of intermediate points in degrees).
For example npoints=10 will return arrays lons,lats of 10 equally spaced points along the great circle.
vinc_dist(f, a, phi1, lembda1, phi2, lembda2)¶
Returns the distance between two geographic points on the ellipsoid and the forward and reverse azimuths between these points. lats, longs and azimuths are in radians, distance in metres
Returns ( s, alpha12, alpha21 ) as a tuple
vinc_pt(f, a, phi1, lembda1, alpha12, s)¶
Returns the lat and long of projected point and reverse azimuth given a reference point and a distance and azimuth to project. lats, longs and azimuths are passed in decimal degrees
Returns ( phi2, lambda2, alpha21 ) as a tuple
Created on 29 mars 2012