Nav-Soft an OpenSource Software GNSS company.


Home > GPS Theory > Tropospheric Delay Theory > GPS Tropospheric Delay Calculation

GPS Tropospheric Delay Calculation.

Here we go through the code that derives the correction to the pseudorange due to the passage of the Satellite RF signal through the 3 layers of the troposphere.

We begin, as is usual practice, by defining several variables that will be used during the calculation.


double   tropo_model(int chan)
{
GNSS_structPVT *rpvt;
double  f_theta,
        theta,
        N_s=324.8,
        N_1,
        delta_N,
        Const,
        delta_R,
        delta_R1,
        delta_R2,
        delta_R3,
        alt,
        range_err,
        llh_pos[4];

        rpvt = &rx_pos.pvt;
        theta = rx_meas[chan].sat_pos.elevation;

        if(theta < PI/2.0)
        {
                f_theta = 1/(sin(theta)+(0.00143/(tan(theta)+0.0455)));
        }
        else f_theta = 1.0;

We start the calculation by transforming the GPS receiver position in cartesian (xyz) co-ordinates to the latitude, longitude and height co-ordinates.

        llh_pos[1] = rpvt->x;
        llh_pos[2] = rpvt->y;
        llh_pos[3] = rpvt->z;
        ecef_to_llh(llh_pos);
        alt = llh_pos[3];
        if(alt < 0.0) alt = 0.0;

        rx_pos.latitude = llh_pos[1];
        rx_pos.longitude = llh_pos[2];
        rx_pos.height = alt;
//      printf("Altitude is %f metres above sea level\n",alt);
        alt /=1000.0;
        delta_N = -7.32*exp(0.005577*N_s);

The tropospheric correction has 3 components depending on the height above sea level of the receiver. The first component , R1, is for RF signals below 1.0 kilometer in height, the second component is between 1.0 and 9.0 kilometers and the third component is for above 9.0 kilometers. The actual pseudorange correction is the sum of the components for the areas of the troposphere through which the RF Satellite signal passes.

        if(alt <= 1.0)
        {
                delta_R1 = N_s +0.5*delta_N;
                delta_R1 -= N_s*alt +0.5*delta_N*pow(alt,2);
                delta_R2 = 1430.0;
                delta_R3 = 732.0;

                delta_R = delta_R1 + delta_R2 + delta_R3;
                delta_R /= 1000.0;
        }
        else if(alt > 1.0 && alt<= 9.0)
        {
                N_1 = N_s + delta_N;
                Const = -8.0*N_1/log(N_1/105);
                delta_R2 = Const*exp(0.125*(1.0 - 9.0)*log(N_1/105));
                delta_R2 -= Const*exp(0.125*(1.0 - alt)*log(N_1/105));
                delta_R3 = 732.0;

                delta_R = delta_R2 + delta_R3;
                delta_R /= 1000.0;
        }
        else if(alt > 9.0 && alt <=20186.8)
        {
                delta_R3 = -105.0/0.1424*exp(-0.1424*(20186.8 - 9.0));
                delta_R3 -= -105.0/0.1424*exp(-0.1424*(alt - 9.0));
                delta_R = delta_R3/1000.0;
        }
        else delta_R = 0.0;

Lastly we multiply by a factor to account for the increased length travelled through the troposphere due to the satellite not being directly overheard but at a smaller elevation angle then 90 degrees.

        range_err = f_theta*delta_R;
//      printf("Sat %d Tropospheric range error is %lf m\n",
//              rx_meas[chan].id,range_err);

        rx_meas[chan].corrections.prcTropoDry = range_err;

        return(range_err);

}
© 2018

Back to Top of Page