navigation.c File Reference


Detailed Description

GNSS core 'c' function library: navigation functions.

Author:
Glenn D. MacGougan (GDM)
Date:
2007-11-29
Since:
2005-08-23
"LICENSE INFORMATION"
Copyright (c) 2007, refer to 'author' doxygen tags
All rights reserved.

Redistribution and use in source and binary forms, with or without modification, are permitted provided the following conditions are met:

THIS SOFTWARE IS PROVIDED BY THE CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

Definition in file navigation.c.

#include <math.h>
#include "constants.h"
#include "geodesy.h"
#include "navigation.h"

Go to the source code of this file.

Functions

void NAVIGATION_ComputeDerivativesOf_Range_WithRespectTo_XYZ (const double x, const double y, const double z, const double satX, const double satY, const double satZ, double *dPdx, double *dPdy, double *dPdz, double *range)
 Computes the derivative of the pseudorange with respect to X, Y, Z. Also computes the user to satellite range for convenience.
void NAVIGATION_ComputeDerivativesOf_Range_WithRespectToLatitudeLongitudeHeight (const double latitude, const double longitude, const double height, const double satX, const double satY, const double satZ, double *dlat, double *dlon, double *dhgt, double *range)
 Computes the derivative of the pseudorange with respect to latitude, longitude, and height/ Also computes the user to satellite range for convenience.
int NAVIGATION_PerformClosedFormPositionSolution_FromPseuodrangeMeasurements (double p1, double p2, double p3, double p4, double prc_satclk1, double prc_satclk2, double prc_satclk3, double prc_satclk4, double x1, double x2, double x3, double x4, double y1, double y2, double y3, double y4, double z1, double z2, double z3, double z4, double *latitude, double *longitude, double *height, double *rx_clock_bias)
 Compute a closed form position solution using four raw pseudoranges.


Function Documentation

void NAVIGATION_ComputeDerivativesOf_Range_WithRespectTo_XYZ ( const double  x,
const double  y,
const double  z,
const double  satX,
const double  satY,
const double  satZ,
double *  dPdx,
double *  dPdy,
double *  dPdz,
double *  range 
)

Computes the derivative of the pseudorange with respect to X, Y, Z. Also computes the user to satellite range for convenience.

Author:
Glenn D. MacGougan (GDM)
Date:
2005-08-23
Since:
2005-08-23
Parameters:
x  User X coordinate WGS84 ECEF [m]
y  User Y coordinate WGS84 ECEF [m]
z  User Z coordinate WGS84 ECEF [m]
satX  Satellite X coordinate WGS84 ECEF [m]
satY  Satellite Y coordinate WGS84 ECEF [m]
satZ  Satellite Z coordinate WGS84 ECEF [m]
dPdx  Derivative of P wrt X []
dPdy  Derivative of P wrt Y []
dPdz  Derivative of P wrt Z []
range  computed user to satellite range [m]

Definition at line 42 of file navigation.c.

void NAVIGATION_ComputeDerivativesOf_Range_WithRespectToLatitudeLongitudeHeight ( const double  latitude,
const double  longitude,
const double  height,
const double  satX,
const double  satY,
const double  satZ,
double *  dlat,
double *  dlon,
double *  dhgt,
double *  range 
)

Computes the derivative of the pseudorange with respect to latitude, longitude, and height/ Also computes the user to satellite range for convenience.

Author:
Glenn D. MacGougan (GDM)
Date:
2005-08-23
Since:
2005-08-23
Parameters:
latitude  User geodetic latitude [rad]
longitude  User geodetic longtiude [rad]
height  User geodetic height [m]
satX  Satellite X coordinate WGS84 ECEF [m]
satY  Satellite Y coordinate WGS84 ECEF [m]
satZ  Satellite Z coordinate WGS84 ECEF [m]
dlat  d(P)/d(lat) but not in units of [m/rad], [m/m]
dlon  d(P)/d(lon) but not in units of [m/rad], [m/m]
dhgt  d(P)/d(hgt) [m/m]
range  computed user to satellite range [m]

Definition at line 73 of file navigation.c.

int NAVIGATION_PerformClosedFormPositionSolution_FromPseuodrangeMeasurements ( double  p1,
double  p2,
double  p3,
double  p4,
double  prc_satclk1,
double  prc_satclk2,
double  prc_satclk3,
double  prc_satclk4,
double  x1,
double  x2,
double  x3,
double  x4,
double  y1,
double  y2,
double  y3,
double  y4,
double  z1,
double  z2,
double  z3,
double  z4,
double *  latitude,
double *  longitude,
double *  height,
double *  rx_clock_bias 
)

Compute a closed form position solution using four raw pseudoranges.

Author:
Glenn D. MacGougan (GDM)
Date:
2005-08-23
Since:
2005-08-23
Returns:
TRUE(1) if successful, FALSE(0) otherwise.
Remarks:
(1) The satellite clock corrections in meters are required for each pseudorange
(2) This function was written for easy portability into Matlab
REFERENCES
[1] Mezentsev, O. and J. Collin (2004). A Closed Form Solution Of Non-Linear GPS Pseudorange Equations. White paper proof - not published.
Parameters:
p1  1st raw pseudorange measurement [m]
p2  2nd raw pseudorange measurement [m]
p3  3rd raw pseudorange measurement [m]
p4  4th raw pseudorange measurement [m]
prc_satclk1  1st satellite clock corrections for psuedoranges [m]
prc_satclk2  2nd satellite clock corrections for psuedoranges [m]
prc_satclk3  3rd satellite clock corrections for psuedoranges [m]
prc_satclk4  4th satellite clock corrections for psuedoranges [m]
x1  1st satellite X coordinates, WGS84 ECEF [m]
x2  2nd satellite X coordinates, WGS84 ECEF [m]
x3  3rd satellite X coordinates, WGS84 ECEF [m]
x4  4th satellite X coordinates, WGS84 ECEF [m]
y1  1st satellite Y coordinates, WGS84 ECEF [m]
y2  2nd satellite Y coordinates, WGS84 ECEF [m]
y3  3rd satellite Y coordinates, WGS84 ECEF [m]
y4  4th satellite Y coordinates, WGS84 ECEF [m]
z1  1st satellite Z coordinates, WGS84 ECEF [m]
z2  2nd satellite Z coordinates, WGS84 ECEF [m]
z3  3rd satellite Z coordinates, WGS84 ECEF [m]
z4  4th satellite Z coordinates, WGS84 ECEF [m]
latitude  The computed geodetic latitude [rad]
longitude  The computed geodetic longitude [rad]
height  The computed geodetic height [m]
rx_clock_bias  The computed receiver clock bias [m]

Definition at line 150 of file navigation.c.