WGS84 nach Topex Ellipsoid: Unterschied zwischen den Versionen
Aus Wiki
Chris (Diskussion | Beiträge) |
Chris (Diskussion | Beiträge) |
||
| Zeile 4: | Zeile 4: | ||
double f_tp = 1 / 298.257; | double f_tp = 1 / 298.257; | ||
double r = (a_wgs84 - a_tp + (a_tp * f_tp - a_wgs84 * f_wgs84) * sin(lat_20Hz / 1000000.0)*sin(lat_20Hz / 1000000.0)); | double r = (a_wgs84 - a_tp + (a_tp * f_tp - a_wgs84 * f_wgs84) * sin(lat_20Hz / 1000000.0)*sin(lat_20Hz / 1000000.0)); | ||
| + | |||
| + | In Python: | ||
| + | |||
| + | WGS84 <-> Topex Ellipsoid | ||
| + | |||
| + | def wgs84_to_topex(lon,lat): | ||
| + | lon = float(lon) | ||
| + | lat = float(lat) | ||
| + | a_wgs84 = 6378137.0; | ||
| + | f_wgs84 = 1 / 298.257223563; | ||
| + | a_tp = 6378136.3; | ||
| + | f_tp = 1 / 298.257; | ||
| + | r = (a_wgs84 - a_tp + (a_tp * f_tp - a_wgs84 * f_wgs84) * np.sin(lat / 1000000.0)*np.sin(lat / 1000000.0)) | ||
| + | return r | ||
| + | |||
| + | def topex_to_wgs84(lon,lat): | ||
| + | lon = float(lon) | ||
| + | lat = float(lat) | ||
| + | a_wgs84 = 6378137.0; | ||
| + | f_wgs84 = 1 / 298.257223563; | ||
| + | a_tp = 6378136.3; | ||
| + | f_tp = 1 / 298.257; | ||
| + | r = (a_tp - a_wgs84 + (a_wgs84 * f_wgs84- a_tp * f_tp) * np.sin(lat / 1000000.0)*np.sin(lat / 1000000.0)) | ||
| + | return r | ||
Version vom 18. Juni 2013, 12:11 Uhr
double a_wgs84 = 6378137.0; double f_wgs84 = 1 / 298.257223563; double a_tp = 6378136.3; double f_tp = 1 / 298.257; double r = (a_wgs84 - a_tp + (a_tp * f_tp - a_wgs84 * f_wgs84) * sin(lat_20Hz / 1000000.0)*sin(lat_20Hz / 1000000.0));
In Python:
WGS84 <-> Topex Ellipsoid
def wgs84_to_topex(lon,lat):
lon = float(lon)
lat = float(lat) a_wgs84 = 6378137.0; f_wgs84 = 1 / 298.257223563; a_tp = 6378136.3; f_tp = 1 / 298.257; r = (a_wgs84 - a_tp + (a_tp * f_tp - a_wgs84 * f_wgs84) * np.sin(lat / 1000000.0)*np.sin(lat / 1000000.0)) return r
def topex_to_wgs84(lon,lat): lon = float(lon) lat = float(lat) a_wgs84 = 6378137.0; f_wgs84 = 1 / 298.257223563; a_tp = 6378136.3; f_tp = 1 / 298.257; r = (a_tp - a_wgs84 + (a_wgs84 * f_wgs84- a_tp * f_tp) * np.sin(lat / 1000000.0)*np.sin(lat / 1000000.0)) return r