Main Page | File List | Globals | Related Pages

datum.c

00001 /****************************************************************************/
00002 /*                                                                          */
00003 /* ./gps/datum.c   -   Definition of Datum and Ellipsoid                    */
00004 /*                                                                          */
00005 /* This file is part of gpstrans - a program to communicate with garmin gps */
00006 /* Parts are taken from John F. Waers (jfwaers@csn.net) program MacGPS.     */
00007 /*                                                                          */
00008 /*                                                                          */
00009 /*    Copyright (c) 1995 by Carsten Tschach (tschach@zedat.fu-berlin.de)    */
00010 /*                                                                          */
00011 /* Permission  to use, copy,  modify, and distribute  this software and its */
00012 /* documentation for non-commercial purpose, is hereby granted without fee, */
00013 /* providing that the  copyright notice  appear in all copies and that both */
00014 /* the  copyright notice and  this permission  notice appear in  supporting */
00015 /* documentation.  I make no representations about  the suitability of this */
00016 /* software  for any  purpose.  It is  provides "as is" without  express or */
00017 /* implid warranty.                                                         */
00018 /*                                                                          */
00019 /****************************************************************************/
00020 
00021 /* $Id: datum.c,v 1.7 2003/09/22 21:29:30 clavelei Exp $ */
00022 
00023 /* $Log: datum.c,v $
00024  * Revision 1.7  2003/09/22 21:29:30  clavelei
00025  * Added "Potsdam Rauenberg"
00026  *
00027  * Revision 1.6  2002/05/24 19:27:54  clavelei
00028  * Changed : nDatums and WGS84Index moved to latlong.h
00029  *
00030  * Revision 1.5  2000/05/14 21:11:03  clavelei
00031  * Modification NTF France, ajout 2eme Pulkovo 1942 et ellipsoide Clarke 1880 IGN
00032  *
00033  * Revision 1.4  2000/01/16 14:21:12  clavelei
00034  * Ajout NTF France
00035  *
00036  * Revision 1.3  1999/10/27 20:32:35  clavelei
00037  * Rapatriement de WGS84Index, ajout de "Tananarive Obs 1925".
00038  * */
00039 
00040 /****************************************************************************/
00041 /*                                                                          */
00042 /* ellipsoid: index into the gEllipsoid[] array, in which                   */
00043 /*                                                                          */
00044 /*     a:          ellipsoid semimajor axis                                 */
00045 /*     invf:       inverse of the ellipsoid flattening f                    */
00046 /*     dx, dy, dz: ellipsoid center with respect to WGS84 ellipsoid center  */
00047 /*                                                                          */
00048 /*     x axis is the prime meridian                                         */
00049 /*     y axis is 90 degrees east longitude                                  */
00050 /*     z axis is the axis of rotation of the ellipsoid                      */
00051 /*                                                                          */
00052 /* The following values for dx, dy and dz were extracted from the output of */
00053 /* the GARMIN PCX5 program. The output also includes values for da and df,  */
00054 /* the difference between the reference ellipsoid and the WGS84 ellipsoid   */
00055 /* semi-major axis and flattening, respectively. These are replaced by the  */
00056 /* data contained in the structure array gEllipsoid[], which was obtained   */
00057 /* from the Defence Mapping Agency document number TR8350.2, "Department of */
00058 /* Defense World Geodetic System 1984."                                     */
00059 /*                                                                          */
00060 /****************************************************************************/
00061 
00062 #include "latlong.h"
00063 
00064 
00065 // unsigned short nDatums = 106;               /* nombre d'entrees dans gDatum -> latlong.h */
00066 // unsigned short WGS84Index = 104;       /* index de WGS84  -> latlong.h */
00067 
00068 struct DATUM const gDatum[] = {        /* format : nom, index ellipsoide, dx, dy, dz */
00069     {"Adindan", 5, -162, -12, 206},
00070     {"Afgooye", 15, -43, -163, 45},
00071     {"Ain el Abd 1970", 14, -150, -251, -2},
00072     {"Anna 1 Astro 1965", 2, -491, -22, 435},
00073     {"Arc 1950", 5, -143, -90, -294},
00074     {"Arc 1960", 5, -160, -8, -300},
00075     {"Ascension Island `58", 14, -207, 107, 52},
00076     {"Astro B4 Sorol Atoll", 14, 114, -116, -333},
00077     {"Astro Beacon \"E\"", 14, 145, 75, -272},
00078     {"Astro DOS 71/4", 14, -320, 550, -494},
00079     {"Astronomic Stn `52", 14, 124, -234, -25},
00080     {"Australian Geod `66", 2, -133, -48, 148},
00081     {"Australian Geod `84", 2, -134, -48, 149},
00082     {"Bellevue (IGN)", 14, -127, -769, 472},
00083     {"Bermuda 1957", 4, -73, 213, 296},
00084     {"Bogota Observatory", 14, 307, 304, -318},
00085     {"Campo Inchauspe", 14, -148, 136, 90},
00086     {"Canton Astro 1966", 14, 298, -304, -375},
00087     {"Cape", 5, -136, -108, -292},
00088     {"Cape Canaveral", 4, -2, 150, 181},
00089     {"Carthage", 5, -263, 6, 431},
00090     {"CH-1903", 3, 674, 15, 405},
00091     {"Chatham 1971", 14, 175, -38, 113},
00092     {"Chua Astro", 14, -134, 229, -29},
00093     {"Corrego Alegre", 14, -206, 172, -6},
00094     {"Djakarta (Batavia)", 3, -377, 681, -50},
00095     {"DOS 1968", 14, 230, -199, -752},
00096     {"Easter Island 1967", 14, 211, 147, 111},
00097     {"European 1950", 14, -87, -98, -121},
00098     {"European 1979", 14, -86, -98, -119},
00099     {"Finland Hayford", 14, -78, -231, -97},
00100     {"Gandajika Base", 14, -133, -321, 50},
00101     {"Geodetic Datum `49", 14, 84, -22, 209},
00102     {"Guam 1963", 4, -100, -248, 259},
00103     {"GUX 1 Astro", 14, 252, -209, -751},
00104     {"Hjorsey 1955", 14, -73, 46, -86},
00105     {"Hong Kong 1963", 14, -156, -271, -189},
00106     {"Indian Bangladesh", 6, 289, 734, 257},
00107     {"Indian Thailand", 6, 214, 836, 303},
00108     {"Ireland 1965", 1, 506, -122, 611},
00109     {"ISTS 073 Astro `69", 14, 208, -435, -229},
00110     {"Johnston Island", 14, 191, -77, -204},
00111     {"Kandawala", 6, -97, 787, 86},
00112     {"Kerguelen Island", 14, 145, -187, 103},
00113     {"Kertau 1948", 7, -11, 851, 5},
00114     {"L.C. 5 Astro", 4, 42, 124, 147},
00115     {"Liberia 1964", 5, -90, 40, 88},
00116     {"Luzon Mindanao", 4, -133, -79, -72},
00117     {"Luzon Philippines", 4, -133, -77, -51},
00118     {"Mahe 1971", 5, 41, -220, -134},
00119     {"Marco Astro", 14, -289, -124, 60},
00120     {"Massawa", 3, 639, 405, 60},
00121     {"Merchich", 5, 31, 146, 47},
00122     {"Midway Astro 1961", 14, 912, -58, 1227},
00123     {"Minna", 5, -92, -93, 122},
00124     {"NAD27 Alaska", 4, -5, 135, 172},
00125     {"NAD27 Bahamas", 4, -4, 154, 178},
00126     {"NAD27 Canada", 4, -10, 158, 187},
00127     {"NAD27 Canal Zone", 4, 0, 125, 201},
00128     {"NAD27 Caribbean", 4, -7, 152, 178},
00129     {"NAD27 Central", 4, 0, 125, 194},
00130     {"NAD27 CONUS", 4, -8, 160, 176},
00131     {"NAD27 Cuba", 4, -9, 152, 178},
00132     {"NAD27 Greenland", 4, 11, 114, 195},
00133     {"NAD27 Mexico", 4, -12, 130, 190},
00134     {"NAD27 San Salvador", 4, 1, 140, 165},
00135     {"NAD83", 11, 0, 0, 0},
00136     {"Nahrwn Masirah Ilnd", 5, -247, -148, 369},
00137     {"Nahrwn Saudi Arbia", 5, -231, -196, 482},
00138     {"Nahrwn United Arab", 5, -249, -156, 381},
00139     {"Naparima BWI", 14, -2, 374, 172},
00140     {"NTF France", 23, -168, -60, 320},
00141     {"Observatorio 1966", 14, -425, -169, 81},
00142     {"Old Egyptian", 12, -130, 110, -13},
00143     {"Old Hawaiian", 4, 61, -285, -181},
00144     {"Oman", 5, -346, -1, 224},
00145     {"Ord Srvy Grt Britn", 0, 375, -111, 431},
00146     {"Pico De Las Nieves", 14, -307, -92, 127},
00147     {"Pitcairn Astro 1967", 14, 185, 165, 42},
00148     {"Potsdam Rauenberg", 3, 606, 23, 413},
00149     {"Prov So Amrican `56", 14, -288, 175, -376},
00150     {"Prov So Chilean `63", 14, 16, 196, 93},
00151     {"Puerto Rico", 4, 11, 72, -101},
00152     {"Pulkovo 1942 (1)", 15, 25, -141, -79},
00153     {"Pulkovo 1942 (2)", 15, 28, -130, -95},
00154     {"Qatar National", 14, -128, -283, 22},
00155     {"Qornoq", 14, 164, 138, -189},
00156     {"Reunion", 14, 94, -948, -1262},
00157     {"Rome 1940", 14, -225, -65, 9},
00158     {"RT 90", 3, 498, -36, 568},
00159     {"Santo (DOS)", 14, 170, 42, 84},
00160     {"Sao Braz", 14, -203, 141, 53},
00161     {"Sapper Hill 1943", 14, -355, 16, 74},
00162     {"Schwarzeck", 21, 616, 97, -251},
00163     {"South American `69", 16, -57, 1, -41},
00164     {"South Asia", 8, 7, -10, -26},
00165     {"Southeast Base", 14, -499, -249, 314},
00166     {"Southwest Base", 14, -104, 167, -38},
00167     {"Tananarive Obs 1925", 14, -189, -242, -91},
00168     {"Timbalai 1948", 6, -689, 691, -46},
00169     {"Tokyo", 3, -128, 481, 664},
00170     {"Tristan Astro 1968", 14, -632, 438, -609},
00171     {"Viti Levu 1916", 5, 51, 391, -36},
00172     {"Wake-Eniwetok `60", 13, 101, 52, -39},
00173     {"WGS 72", 19, 0, 0, 5},
00174     {"WGS 84", 20, 0, 0, 0},
00175     {"Zanderij", 14, -265, 120, -358}
00176 };
00177 
00178 
00179 struct ELLIPSOID const gEllipsoid[] = {
00180     {"Airy 1830", 6377563.396, 299.3249646},
00181     {"Modified Airy", 6377340.189, 299.3249646},
00182     {"Australian National", 6378160.0, 298.25},
00183     {"Bessel 1841", 6377397.155, 299.1528128},
00184     {"Clarke 1866", 6378206.4, 294.9786982},
00185     {"Clarke 1880", 6378249.145, 293.465},
00186     {"Everest (India 1830)", 6377276.345, 300.8017},
00187     {"Everest (1948)", 6377304.063, 300.8017},
00188     {"Modified Fischer 1960", 6378155.0, 298.3},
00189     {"Everest (Pakistan)", 6377309.613, 300.8017},
00190     {"Indonesian 1974", 6378160.0, 298.247},
00191     {"GRS 80", 6378137.0, 298.257222101},
00192     {"Helmert 1906", 6378200.0, 298.3},
00193     {"Hough 1960", 6378270.0, 297.0},
00194     {"International 1924", 6378388.0, 297.0},
00195     {"Krassovsky 1940", 6378245.0, 298.3},
00196     {"South American 1969", 6378160.0, 298.25},
00197     {"Everest (Malaysia 1969)", 6377295.664, 300.8017},
00198     {"Everest (Sabah Sarawak)", 6377298.556, 300.8017},
00199     {"WGS 72", 6378135.0, 298.26},
00200     {"WGS 84", 6378137.0, 298.257223563},
00201     {"Bessel 1841 (Namibia)", 6377483.865, 299.1528128},
00202     {"Everest (India 1956)", 6377301.243, 300.8017},
00203     {"Clarke 1880 IGN", 6378249.2, 293.466021293629}
00204 };

Generated on Sun Aug 29 11:00:40 2004 for GPilotS by doxygen 1.3.4