convhelp.hpp

Go to the documentation of this file.
00001 #pragma ident "$Id: convhelp.hpp 70 2006-08-01 18:36:21Z ehagen $"
00002 
00003 
00004 
00010 #ifndef GPSTK_CONVHELP_HPP
00011 #define GPSTK_CONVHELP_HPP
00012 
00013 //============================================================================
00014 //
00015 //  This file is part of GPSTk, the GPS Toolkit.
00016 //
00017 //  The GPSTk is free software; you can redistribute it and/or modify
00018 //  it under the terms of the GNU Lesser General Public License as published
00019 //  by the Free Software Foundation; either version 2.1 of the License, or
00020 //  any later version.
00021 //
00022 //  The GPSTk is distributed in the hope that it will be useful,
00023 //  but WITHOUT ANY WARRANTY; without even the implied warranty of
00024 //  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00025 //  GNU Lesser General Public License for more details.
00026 //
00027 //  You should have received a copy of the GNU Lesser General Public
00028 //  License along with GPSTk; if not, write to the Free Software Foundation,
00029 //  Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00030 //  
00031 //  Copyright 2004, The University of Texas at Austin
00032 //
00033 //============================================================================
00034 
00035 //============================================================================
00036 //
00037 //This software developed by Applied Research Laboratories at the University of
00038 //Texas at Austin, under contract to an agency or agencies within the U.S. 
00039 //Department of Defense. The U.S. Government retains all rights to use,
00040 //duplicate, distribute, disclose, or release this software. 
00041 //
00042 //Pursuant to DoD Directive 523024 
00043 //
00044 // DISTRIBUTION STATEMENT A: This software has been approved for public 
00045 //                           release, distribution is unlimited.
00046 //
00047 //=============================================================================
00048 
00049 
00050 
00051 
00052 
00053 
00054 #include "GeoidModel.hpp"
00055 
00056 namespace gpstk
00057 {
00060 
00069    inline double cycles2meters(double phase, double freq, GeoidModel& geoid)
00070    {
00071       return geoid.c()/freq * phase;
00072    }
00073    
00082    inline double meters2cycles(double range, double freq, GeoidModel& geoid)
00083    {
00084       return freq/geoid.c() * range;
00085    }
00086    
00093    inline double cel2far(double c)
00094    {
00095       return 9.0 / 5.0 * c + 32;
00096    }
00097    
00104    inline double far2cel(double f)
00105    {
00106       return 5.0 / 9.0 * (f - 32);
00107    }
00108    
00115    inline double mb2hg(double mb)
00116    {
00117       return mb / 33.8638815789;
00118    }
00119    
00126    inline double hg2mb(double hg)
00127    {
00128       return hg * 33.8638815789;
00129    }
00130 
00132 
00133 } // namespace
00134 
00135 #endif

Generated on Wed Feb 8 03:30:58 2012 for GPS ToolKit Software Library by  doxygen 1.3.9.1