tropo.c
Go to the documentation of this file.
00001 /*
00002  * Copyright (C) 2012 Swift Navigation Inc.
00003  * Contact: Fergus Noble <fergus@swift-nav.com>
00004  *
00005  * This source is subject to the license found in the file 'LICENSE' which must
00006  * be be distributed together with this source. All other rights reserved.
00007  *
00008  * THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND,
00009  * EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED
00010  * WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A PARTICULAR PURPOSE.
00011  */
00012 
00013 #include <math.h>
00014 
00015 /* Simple Black model, inspired by GPSTk SimpleTropModel class. */
00016 
00017 double dry_zenith_delay(void)
00018 {
00019   return 2.235486646978727;
00020 }
00021 
00022 double dry_mapping_function(double elevation)
00023 {
00024   double d = cos(elevation);
00025   d /= 1.001012704615527;
00026   return (1.0 / sqrt(1.0 - d*d));
00027 }
00028 
00029 double wet_zenith_delay(void)
00030 {
00031   return 0.122382715318184;
00032 }
00033 
00034 double wet_mapping_function(double elevation)
00035 {
00036   double d = cos(elevation);
00037   d /= 1.000282213715744;
00038   return (1.0 / sqrt(1.0 - d*d));
00039 }
00040 
00041 double tropo_correction(double elevation)
00042 {
00043   if (elevation < 0)
00044     return 0;
00045 
00046   return (dry_zenith_delay() * dry_mapping_function(elevation)
00047         + wet_zenith_delay() * wet_mapping_function(elevation));
00048 }
00049 


swiftnav
Author(s):
autogenerated on Sat Jun 8 2019 18:56:16