ionosphere.h

Go to the documentation of this file.
00001 /**
00002 \file    ionosphere.h
00003 \brief   GNSS core 'c' function library: GPS ionospheric calculations.
00004 \author  Glenn D. MacGougan (GDM)
00005 \date    2007-11-29
00006 \since   2005-08-14
00007 
00008 \remarks
00009 - Get better klobuchar (alpha and beta parameters from:
00010 http://www.aiub.unibe.ch/ionosphere/ \n
00011 ftp://ftp.unibe.ch/aiub/CODE/ \n
00012 http://www.aiub.unibe.ch/download/CODE/ \n
00013 e.g. Download CGIM3280.07N from ftp://ftp.unibe.ch/aiub/CODE/2007/ 
00014 for 2007-11-29.
00015 
00016 \b "LICENSE INFORMATION" \n
00017 Copyright (c) 2007, refer to 'author' doxygen tags \n
00018 All rights reserved. \n
00019 
00020 Redistribution and use in source and binary forms, with or without
00021 modification, are permitted provided the following conditions are met: \n
00022 
00023 - Redistributions of source code must retain the above copyright
00024   notice, this list of conditions and the following disclaimer. \n
00025 - Redistributions in binary form must reproduce the above copyright
00026   notice, this list of conditions and the following disclaimer in the
00027   documentation and/or other materials provided with the distribution. \n
00028 - The name(s) of the contributor(s) may not be used to endorse or promote 
00029   products derived from this software without specific prior written 
00030   permission. \n
00031 
00032 THIS SOFTWARE IS PROVIDED BY THE CONTRIBUTORS ``AS IS'' AND ANY EXPRESS 
00033 OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
00034 WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
00035 DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
00036 INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
00037 (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 
00038 SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 
00039 CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 
00040 LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 
00041 OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 
00042 SUCH DAMAGE.
00043 */
00044 
00045 #ifndef _C_IONOSPHERE_H_
00046 #define _C_IONOSPHERE_H_
00047 
00048 #ifdef __cplusplus
00049 extern "C" {
00050 #endif
00051 
00052 #include "basictypes.h"
00053 
00054 /**
00055 \brief Given the user geodetic position, GPS time of week, the azimuth and elevation to the satellite
00056 in question, and the alpha and beta Klobuchar terms, compute the ionospheric delay for this
00057 satellite.
00058 
00059 \author   Glenn D. MacGougan (GDM)
00060 \date     2007-11-29
00061 \since    2005-08-14
00062 
00063 \remarks
00064 - The ionospheric correction is referred to the L1 frequency; if the user is operating on the
00065   L2 frequency, the correction term must be multiplied by \n
00066   (f_L1/f_L2)^2 = (1575.42/1227.6)^2 = (77/60)^2 = 1.64694444...
00067 
00068 \b REFERENCES \n
00069 - GPS ICD 200C, pp. 126-128
00070 */
00071 BOOL IONOSPHERE_GetL1KlobucharCorrection(   
00072   const double  alpha0,     //!< coefficients of a cubic equation representing the amplitude of the vertical delay [s]
00073   const double  alpha1,     //!< coefficients of a cubic equation representing the amplitude of the vertical delay [s/semi-circle]
00074   const double  alpha2,     //!< coefficients of a cubic equation representing the amplitude of the vertical delay [s/semi-circle^2]
00075   const double  alpha3,     //!< coefficients of a cubic equation representing the amplitude of the vertical delay [s/semi-circle^3]  
00076   const double  beta0,      //!< coefficients of a cubic equation representing the period of the model [s]
00077   const double  beta1,      //!< coefficients of a cubic equation representing the period of the model [s/semi-circle]
00078   const double  beta2,      //!< coefficients of a cubic equation representing the period of the model [s/semi-circle^2]
00079   const double  beta3,      //!< coefficients of a cubic equation representing the period of the model [s/semi-circle^3]
00080   const double  latitude,   //!< user geodetic latitude  [rad]
00081   const double  longitude,  //!< user geodetic longitude [rad]
00082   const double  elevation,  //!< elevation angle between the user and the satellite [rad]
00083   const double  azimuth,    //!< azimuth angle between the user and the satellite, measured clockwise positive from the true North [rad]   
00084   const double  gpstow,     //!< receiver computed gps time of week [s]
00085   double* ionospheric_delay //!< computed ionospheric correction [m]
00086   );
00087 
00088 #ifdef __cplusplus
00089 }
00090 #endif
00091 
00092 
00093 #endif // _C_IONOSPHERE_H_