SonTek
ADP Software Manual Version 6.42 (November 1, 2000)
28
APPENDIX B. Correcting for Vessel Motion Using GPS Position Data
The ADP real-time data collection, when run with the “ADPSA –p” command line option,
allows integration of GPS position with ADP velocity data. Good quality differential GPS
position data can be used to compensate velocity data measured from a moving vessel to
compute the absolute current.
This appendix provides the algorithms to calculate vessel motion from GPS data, and to remove
vessel motion from ADP velocity data. These algorithms are used for the display of absolute
velocity data in the real-time software (see sections 2.4 and 2.5), and for the output of absolute
velocity data in ASCII format using the data conversion software (see SECTION 3).
GPS position and time data is recorded at the beginning and end of each profile. Calculating
vessel motion based upon GPS data is done using the following steps.
• Convert latitude, longitude, and height (assumed to be 0) to an earth-centered, earth-fixed
XYZ coordinate system.
• Calculate the position change in the XYZ coordinate system from position data at the
beginning and end of the profile.
• Convert the change in the XYZ coordinate system to a position change in the local ENU
(East-North-Up) coordinate system based on latitude and longitude.
• Calculate vessel motion (east and north components) from the change in ENU position and
the change in GPS time.
ADP velocity data (relative to the instrument) is compensated for vessel speed using the
following steps.
• Rotate ADP velocity data from magnetic East-North to geographic East-North using the
magnetic variation.
• Subtract vessel speed from ADP velocity.
The following C language code performs these steps. This is included (in a slightly different
format) with the ADP software as part of the data conversion software source code.
typedef struct
{
long Utc; /* Universal time of position fix (GPS sec) */
double Lat; /* In degrees */
double Lon; /* In degrees */
} GpsPosType;
GpsPosType StartGpsPos;
GpsPosType EndGpsPos;
float GpsVnorth;
float GpsVeast;
/*===========================================================*/
/* LlhXyz */
/* Given the lat, lon and height of point on earth this */
/* function computes the earth centered coordinates for */
/* that point. */
/* Notes: Heights must be in m. x,y,z are returned in m */
/* */
#define dtr 0.1745329251994330E-1 /* Degrees to radians */