00001 00003 // // 00004 // UNCLASSIFIED UNCLASSIFIED UNCLASSIFIED UNCLASSIFIED // 00005 // // 00006 // Description of this module: // 00007 // Utility software that interpolates EGM 2008 geoid // 00008 // heights from one of NGA's reformatted geoid height grids. // 00009 // // 00010 // This interpolator uses Area of Interest (AOI) // 00011 // geoid height grids, not the worldwide geoid height grid. // 00012 // // 00013 // This interpolator does not load an Area of Interest (AOI) // 00014 // geoid height grid until a user first requests a geoid height. // 00015 // The interpolator then loads an AOI grid centered near the point of // 00016 // interest, and it interpolates local geoid height from the AOI grid. // 00017 // This interpolator re-uses the AOI grid until a subsequent point of // 00018 // interest lies outside the AOI. The interpolator then loads a // 00019 // new AOI grid centered at the new horizontal location of interest. // 00020 // // 00021 // This interpolator gives exactly the same results as // 00022 // the companion egm2008_full_grid_package's interpolator. // 00023 // However, the AOI interpolator requires far less computer memory. // 00024 // // 00025 // Revision History: // 00026 // Date Name Description // 00027 // ----------- ------------ ----------------------------------------------// 00028 // 19 Nov 2010 RD Craig Release // 00029 // 11 Feb 2011 RD Craig Updates following code review // 00030 // // 00032 00033 #ifndef EGM2008_AOI_GRID_PACKAGE_H 00034 #define EGM2008_AOI_GRID_PACKAGE_H 00035 00036 // This file declares a C++ class 00037 // that interpolates EGM 2008 geoid heights from a 00038 // reformatted version of NGA's worldwide geoid height grids. 00039 00040 #include "DtccApi.h" 00041 #include "egm2008_geoid_grid.h" 00042 00043 namespace MSP 00044 { 00045 00046 class MSP_DTCC_API Egm2008AoiGrid : public Egm2008GeoidGrid { 00047 00048 protected: 00049 00050 // _maxAoiColIndex: The AOI grid's maximum column index; 00051 // this is referenced to the worldwide grid. 00052 00053 int _maxAoiColIndex; 00054 00055 // _minAoiColIndex: The AOI grid's minimum column index; 00056 // this is referenced to the worldwide grid. 00057 00058 int _minAoiColIndex; 00059 00060 // _maxAoiRowIndex: The AOI grid's maximum row index; 00061 // this is referenced to the worldwide grid. 00062 00063 int _maxAoiRowIndex; 00064 00065 // _minAoiRowIndex: The AOI grid's minimum row index; 00066 // this is referenced to the worldwide grid. 00067 00068 int _minAoiRowIndex; 00069 00070 // nAoiCols: The number of columns in the AOI grid. 00071 00072 int _nAoiCols; 00073 00074 // nAoiRows: The number of rows in the AOI grid. 00075 00076 int _nAoiRows; 00077 00078 // nomAoiCols: Nominal number of columns in the AOI 00079 // grid; actual number is latitude dependent. 00080 00081 int _nomAoiCols; 00082 00083 // nomAoiRows: Nominal number of rows in the AOI grid. 00084 00085 int _nomAoiRows; 00086 00087 // heightGrid: A pointer to a 00088 // one-dimensional array containing a 00089 // part of the reformatted geoid-height grid. 00090 00091 float* _heightGrid; 00092 00093 public: 00094 00095 // Basic functions ..... 00096 00097 Egm2008AoiGrid( void ); 00098 00099 Egm2008AoiGrid( const Egm2008AoiGrid& oldGrid ); 00100 00101 ~Egm2008AoiGrid( void ); 00102 00103 Egm2008AoiGrid& 00104 operator = ( const Egm2008AoiGrid& oldGrid ); 00105 00106 // User functions ..... 00107 00108 // geoidHeight: A function that interpolates 00109 // local geoid height (meters) from 00110 // a reformatted EGM 2008 geoid height grid; 00111 // this function uses bi-cubic spline interpolation. 00112 00113 virtual int 00114 geoidHeight( 00115 int wSize, // input 00116 double latitude, // input 00117 double longitude, // input 00118 double& gHeight ); // output 00119 00120 protected: 00121 00122 // geoidHeight: A function that interpolates 00123 // local geoid height (meters) from 00124 // a reformatted EGM 2008 geoid height grid; 00125 // this function uses bilinear interpolation. 00126 00127 virtual int 00128 geoidHeight( 00129 double latitude, // input 00130 double longitude, // input 00131 double& gHeight ); // output 00132 00133 // loadAoiParms: A function that loads an AOI grid's 00134 // parameters relative to an input worldwide grid. 00135 00136 int 00137 loadAoiParms( 00138 int i0, int j0 ); 00139 00140 // loadGrid: A function that loads an AOI grid from 00141 // a reformatted EGM 2008 worldwide geoid height grid. 00142 00143 int 00144 loadGrid( void ); 00145 00146 // loadGridMetadata: A function that loads worldwide EGM 2008 00147 // grid metadata from a reformatted worldwide grid file. 00148 00149 int 00150 loadGridMetadata( void ); 00151 00152 }; // End of Egm2008AoiGrid class declaration 00153 00154 } // End of namespace block 00155 00156 #endif 00157 00159 // UNCLASSIFIED UNCLASSIFIED UNCLASSIFIED UNCLASSIFIED // 00161