general/cotrans/
hdz2geo.pro
procedure: hdz2geo Purpose: Coordinate transformation between HDZ coordinates & GEO coordinates HDZ is defined as: H = horizontal field strength, in the plane formed by Z and GEO graphic north D = field strength in the Z x X direction in nT Z = downward field strength H should be a projection onto a basis vector pointing north from station in nT D should be a projection onto a basis vector perpendicular to H in the horizontal plane. Total field strength should be sqrt(H^2+D^2+Z^2) not sqrt(H^2+Z^2) D must be in nT not degrees GEO is defined as: X = Vector parallel to vector pointing outward at the intersection of the equatorial plane and the 0 degree longitudinal meridean(Greenwich Meridean) Y = Z x X Z = Vector parallel to orbital Axis of Earth Pointing northward. inputs: data_in: Name of input tplot variable to be transformed, or Nx3 array of data for transformation. If no tplot variable is specific latitude and longitude must be set. data_out: Name of tplot variable in which to store output. If this is a named variable and not a string, output data will instead be returned in variable. latitude: latitude of the HDZ station, must be set if data_in is not tplot variable, or latitude and longitude not stored in dlimit.data_att or dlimit.cdf.vatt longitude: longitude of the HDZ station, must be set if data_in is not tplot variable, or latitude and longitude not stored in dlimit.data_att or dlimit.cdf.vatt geo2hdz: If set, performs inverse transformation from GEO to HDZ error: Set to named variable that will return 1 if an error occurs and 0 otherwise rotation_matrix: Returns the rotation matrix that will be used to transform keywords: /SSE2GSE inverse transformation /IGNORE_DLIMITS: Dlimits normally used to determine if coordinate system is correct, to decide if position needs offset, or to stop incorrect transforms. This option will stop this behavior. Examples: hdz2geo,hdz_arr_in,geo_arr_out,latitude=60.4,longitude=173.6 hdz2geo,'in_tvar_name_hdz','out_tvar_name_geo' hdz2geo,'in_tvar_name_geo','out_tvar_name_hdz',/geo2hdz ;inverse transformation Notes: #1 HDZ coordinates only make sense relative to a location, assumedly a ground station(gmag) #2 Specific latitude and longitude keywords must be set if: (1) data_in is not a tplot variable name -OR- (2) tplot variable named by data_in does not specific site_latitude & site_longitude in dlimits #3 If latitude or longitude keywords are set, these values will be used, not dlimit values. #4 This transformation is a first order approximation. It treats the earth as if it is a true sphere, ignoring distortions due to the fact that the earth is actually an oblate spheroid. Written by Patrick Cruce(pcruce@igpp.ucla.edu) $LastChangedBy: pcruce $ $LastChangedDate: 2010-03-29 15:27:35 -0700 (Mon, 29 Mar 2010) $ $LastChangedRevision: 7445 $ $URL: svn+ssh://thmsvn@ambrosia.ssl.berkeley.edu/repos/spdsoft/trunk/general/cotrans/hdz2geo.pro $
Routines
Routines from hdz2geo.pro
Routine details
File attributes
Modification date: | Thu Feb 13 16:43:36 2014 |
Lines: | 101 |