head 1.4; access; symbols; locks; strict; comment @# @; 1.4 date 2002.09.07.01.50.40; author curt; state Exp; branches; next 1.3; 1.3 date 2002.08.31.19.01.57; author curt; state Exp; branches; next 1.2; 1.2 date 2002.08.31.18.54.03; author curt; state Exp; branches; next 1.1; 1.1 date 2002.02.15.17.22.00; author curt; state Exp; branches; next ; desc @@ 1.4 log @Updated doxygen docs. @ text @
Main Page Class Hierarchy Compound List File List Compound Members File Members

# sg_geodesy.hxx

Go to the documentation of this file.

    00001
    00007 // See below for the complete original LaRCsim comments.
    00008 //
    00009 // $Id: sg_geodesy.hxx,v 1.2 2001/03/25 01:42:41 curt Exp $
    00010
    00011
    00012 #ifndef _SG_GEODESY_HXX
    00013 #define _SG_GEODESY_HXX
    00014
    00015
    00016 #ifndef __cplusplus
    00017 # error This library requires C++
    00018 #endif
    00019
    00020
    00021 #include <simgear/math/point3d.hxx>
    00022 #include <simgear/math/polar3d.hxx>
    00023
    00024
    00034 void sgGeocToGeod( double lat_geoc, double radius, double
    00035                    *lat_geod, double *alt, double *sea_level_r );
    00036
    00037
    00046 void sgGeodToGeoc( double lat_geod, double alt, double *sl_radius,
    00047                       double *lat_geoc );
    00048
    00049
    00056 inline Point3D sgGeodToCart(const Point3D& geod) {
    00057     double gc_lon, gc_lat, sl_radius;
    00058
    00059     // printf("A geodetic point is (%.2f, %.2f, %.2f)\n",
    00060     //        geod[0], geod[1], geod[2]);
    00061
    00062     gc_lon = geod.lon();
    00063     sgGeodToGeoc(geod.lat(), geod.radius(), &sl_radius, &gc_lat);
    00064
    00065     // printf("A geocentric point is (%.2f, %.2f, %.2f)\n", gc_lon,
    00066     //        gc_lat, sl_radius+geod[2]);
    00067
    00068     Point3D pp = Point3D( gc_lon, gc_lat, sl_radius + geod.radius());
    00069     return sgPolarToCart3d(pp);
    00070 }
    00071
    00072
    00085 int geo_direct_wgs_84 ( double alt, double lat1, double lon1, double az1,
    00086                         double s, double *lat2, double *lon2,  double *az2 );
    00087
    00088
    00089 // given alt, lat1, lon1, lat2, lon2, calculate starting and ending
    00090 // az1, az2 and distance (s).  Lat, lon, and azimuth are in degrees.
    00091 // distance in meters
    00092 int geo_inverse_wgs_84( double alt, double lat1, double lon1, double lat2,
    00093                         double lon2, double *az1, double *az2, double *s );
    00094
    00095
    00096 /***************************************************************************
    00097
    00098         TITLE:  ls_geodesy
    00099
    00100 ----------------------------------------------------------------------------
    00101
    00102         FUNCTION:       Converts geocentric coordinates to geodetic positions
    00103
    00104 ----------------------------------------------------------------------------
    00105
    00106         MODULE STATUS:  developmental
    00107
    00108 ----------------------------------------------------------------------------
    00109
    00110         GENEALOGY:      Written as part of LaRCSim project by E. B. Jackson
    00111
    00112 ----------------------------------------------------------------------------
    00113
    00114         DESIGNED BY:    E. B. Jackson
    00115
    00116         CODED BY:       E. B. Jackson
    00117
    00118         MAINTAINED BY:  E. B. Jackson
    00119
    00120 ----------------------------------------------------------------------------
    00121
    00122         MODIFICATION HISTORY:
    00123
    00124         DATE    PURPOSE                                         BY
    00125
    00126         930208  Modified to avoid singularity near polar region.        EBJ
    00127         930602  Moved backwards calcs here from ls_step.                EBJ
    00128         931214  Changed erroneous Latitude and Altitude variables to
    00129                 *lat_geod and *alt in routine ls_geoc_to_geod.          EBJ
    00130         940111  Changed header files from old ls_eom.h style to ls_types,
    00131                 and ls_constants.  Also replaced old DATA type with new
    00132                 SCALAR type.                                            EBJ
    00133
    00134         CURRENT RCS HEADER:
    00135
    00136 $Header: /h/curt/CVS/SimGear-0.0/SimGear/simgear/math/sg_geodesy.hxx,v 1.2 2001/03/25 01:42:41 curt Exp $
    00137
    00138  * Revision 1.5  1994/01/11  18:47:05  bjax
    00139  * Changed include files to use types and constants, not ls_eom.h
    00140  * Also changed DATA type to SCALAR type.
    00141  *
    00142  * Revision 1.4  1993/12/14  21:06:47  bjax
    00143  * Removed global variable references Altitude and Latitude.   EBJ
    00144  *
    00145  * Revision 1.3  1993/06/02  15:03:40  bjax
    00146  * Made new subroutine for calculating geodetic to geocentric; changed name
    00147  * of forward conversion routine from ls_geodesy to ls_geoc_to_geod.
    00148  *
    00149
    00150 ----------------------------------------------------------------------------
    00151
    00152         REFERENCES:
    00153
    00154                 [ 1]    Stevens, Brian L.; and Lewis, Frank L.: "Aircraft
    00155                         Control and Simulation", Wiley and Sons, 1992.
    00156                         ISBN 0-471-61397-5
    00157
    00158
    00159 ----------------------------------------------------------------------------
    00160
    00161         CALLED BY:      ls_aux
    00162
    00163 ----------------------------------------------------------------------------
    00164
    00165         CALLS TO:
    00166
    00167 ----------------------------------------------------------------------------
    00168
    00169         INPUTS:
    00170                 lat_geoc        Geocentric latitude, radians, + = North
    00171                 radius          C.G. radius to earth center, ft
    00172
    00173 ----------------------------------------------------------------------------
    00174
    00175         OUTPUTS:
    00176                 lat_geod        Geodetic latitude, radians, + = North
    00177                 alt             C.G. altitude above mean sea level, ft
    00178                 sea_level_r     radius from earth center to sea level at
    00179                                 local vertical (surface normal) of C.G.
    00180
    00181 --------------------------------------------------------------------------*/
    00182
    00183
    00184 #endif // _SG_GEODESY_HXX

@ 1.3 log @Oops, try again. @ text @d153 1 a153 1