/*************************************************************************** geometry.h - Simple coordinate classes ------------------- begin : Fri Jul 25 2003 copyright : (C) 2003 by Andrew O'Neill,HiRes Grad Student email : oneill@phys.columbia.edu ************************************************************************/ /* This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #ifndef GMF_GEOMETRY_H #define GMF_GEOMETRY_H #include #include "aon_debug.h" #include "aon_physconstants.h" #include "aon_vector.h" #include using namespace std; // These are all void functions so that they all have the same syntax // FUNCTION: EllipToCatesian // INPUT Phi, Lamda, H : Latitude, Longitude, height // OUTPUT XYZ : a geocentric cartesian coordinate void EllipToCartesian (const double& Phi, const double& Lambda, const double& H, Vector3D& XYZ); // FUNCTION: CartesianToEllipsoid // INPUT XYZ : a geocentric cartesian coordinate // OUTPUT Phi, Lambda, H : Latitude, Longitude, height void CartesianToEllip (const Vector3D& XYZ, double& Phi, double& Lambda, double& Height); // FUNCTION: TopoCartToCartesian // INPUT East, North, Up : local cartesian coords wth respect to local // horizontal // Origin : geocentric cartesian coord of origin of ENU system // Eta, Xi: deflections from geoid vertical due to ??? // OUTPUT XYZ : a geocentric cartesian coordinate void TopoCartToCartesian (const double& East, const double& North, const double& Up, const Vector3D& Origin, const double& Eta, const double& Xi, Vector3D& XYZ); // This simply rotates a vector from local East, North, Up // at latitude and logitude Phi, Lambda with respect to XYZ=(0,0,0) // into a cartesian vector XYZ void ENUToXYZ (const double& East, const double& North, const double& Up, const double& Phi, const double& Lambda, Vector3D& XYZ); // FUNCTION: CartesianToTopoCart // INPUT XYZ : a geocentric cartesian coordinate // Origin : geocentric cartesian coord of origin of ENU system // OUTPUT East, North, Up : local cartesian coords wth respect to local // horizontal void CartesianToTopoCart (const Vector3D& XYZ, const Vector3D& Origin, double& East, double& North, double& Up); // FUNCTION: TopoPolarToCartesian // INPUT Zenith, Azimuth, Range : local polar coords wth respect to local // horizontal // Origin : geocentric cartesian coord of origin of ENU system // Eta, Xi: deflections from geoid vertical due to ??? // OUTPUT XYZ : a geocentric cartesian coordinate void TopoPolarToCartesian (const double& Zenith, const double& Azimuth, const double& Range, const Vector3D& Origin, const double& Eta, const double& Xi, Vector3D& XYZ); // FUNCTION: CartesianToTopoPolar // INPUT XYZ : a geocentric cartesian coordinate // Origin : geocentric cartesian coord of origin of ENU system // OUTPUT Zenith, Azimuth, Range : local polar coords wth respect to local // horizontal void CartesianToTopoPolar (const Vector3D& XYZ, const Vector3D& Origin, double& Zenith, double& Azimuth, double& Range); void CartesianToTopoCart(const Vector3D& XYZ, const Vector3D& Origin, double& East, double& North, double& Up); void XYZToENU (const Vector3D& XYZ, const double& Phi, const double& Lambda, double& East, double& North, double& Up); /////////////////////////////////////////////////////////////////////////// // OUTPUT /////////////////////////////////////////////////////////////////////////// #endif