Skip navigation

Windows dynamic link library

To ease the task of integrating tidal predictions and offshore data sets into existing software, the Applications Group have developed a Dynamic Link Library (DLL). The library can be used by any Windows based application requiring offshore tidal predictions. To get an elevation or current prediction for a given location at a given time, call the routine in the DLL and pass it the location, date and time for which the prediction is required. The routine will extract the relevant harmonic constituents and make the calculation to produce a sea level and depth averaged current speed and direction.

Notes on the DLL
The DLL contains two main routines: DoPrediction and DoSeriesPrediction. The prototype for these is given below:

Function DoPrediction
    Input: latdeg,latmin,longdeg,longmin (integer)
           dd,mm,yyyy,hr,mn,sc (integer)
           datum (integer)
   Output: z,u,v,mag,dir (integer)
  Returns: ErrorCode (integer)

Function DoSeriesPrediction
    Input: latdeg,latmin,longdeg,longmin (integer)
           dd,mm,yyyy,hr,mn,sc (integer)
           datum (integer)
           numpreds (integer)
           interval (integer)
   Output: z,mag,dir (seriesarray)
  Returns: ErrorCode (integer)

The parameters are:

latdeg, latmin : Latitude (degrees and minutes) for which the prediction is required.
longdeg,longmin : Longitude (degrees and minutes) for which the prediction is required.
dd,mm,yyyy : Date for which the prediction is required.
hr,mn,sc : Time for which the prediction is required.
datum : The datum shift to be added to the prediction to correct from Mean Sea Level to the required datum.
numpreds : The number of predictions required at the specified interval from the start date and time.
interval : Time interval for series prediction.
z,u,v,mag,dir : The calculated values.

DoPrediction returns a single value for the specified location and time.

DoSeriesPrediction returns an array of integers with the first numpreds filled with the results of the prediction.

All values passed in and out of the routine are 2-byte integer values since they provide maximum compatibility across languages and platforms.

Offshore Elevation And Current Prediction
If you are a software developer and you have a requirement for the computation of offshore tidal elevations and currents, then the Applications Group have developed a Windows DLL that may meet your requirements. You don't need to understand the maths of how the computations are done or the formats of the underlying data sets. You simply need to call one of the routines in the DLL specifying the location and the date/time you are interested in, and the DLL will give you the sea level and tidal current.

back a page Top of page Email webmaster