STFishFinder API  API version 0.0.0, Documentation version 3 -PRELIMINARY-
Conversion Functions

These functions provide a convenient facility for converting data values from one set of units to another. More...

Functions

FF_Error_t STFF::ConvertDepth (FF_DepthUnits_t fromUnits, FF_DepthUnits_t toUnits, double input, double *pOutput)
 Convert a depth value from one set of units (feet, meters, or fathoms) to another. More...
 
FF_Error_t STFF::ConvertSpeed (FF_SpeedUnits_t fromUnits, FF_SpeedUnits_t toUnits, double input, double *pOutput)
 Convert a speed value from one set of units (knots, miles per hour, or kilometers per hour) to another. More...
 
FF_Error_t STFF::ConvertTemperature (FF_TemperatureUnits_t fromUnits, FF_TemperatureUnits_t toUnits, double input, double *pOutput)
 Convert a temperature value from one set of units (degrees Celsius or degrees Fahrenheit) to the other. More...
 

Detailed Description

These functions provide a convenient facility for converting data values from one set of units to another.

For example, the STFF::ConvertSpeed function will convert a speed in knots into its equivalent in miles per hour or kilometers per hour.

These are non-member functions that reside in the STFF namespace.

Function Documentation

STFF::ConvertDepth ( FF_DepthUnits_t  fromUnits,
FF_DepthUnits_t  toUnits,
double  input,
double *  pOutput 
)

#include <STFF-Utility.h>

Convert a depth value from one set of units (feet, meters, or fathoms) to another.

Note
If the input value is in a fraction of the fromUnits parameter (e.g. hundredths of a foot), then the output value will be in the same fraction of the toUnits parameter (e.g. hundredths of a meter).
Parameters
[in]fromUnitsUnits corresponding to the input parameter
[in]toUnitsUnits corresponding to the pOutput parameter
[in]inputThe value to be converted
[out]pOutputPointer to the location where the converted value will be stored
Return values
FF_ERR_NO_ERRORif the conversion succeeded
FF_ERR_ARGUMENT_OUT_OF_RANGEif fromUnits, toUnits, or input contain illegal values
FF_ERR_INVALID_POINTERif pOutput is a null pointer
See also
FF_DepthUnits_t
STFF::ConvertSpeed ( FF_SpeedUnits_t  fromUnits,
FF_SpeedUnits_t  toUnits,
double  input,
double *  pOutput 
)

#include <STFF-Utility.h>

Convert a speed value from one set of units (knots, miles per hour, or kilometers per hour) to another.

Note that if the input value is in a fraction of the fromUnits parameter (e.g. hundredths of a knot), then the output value will be in the same fraction of the toUnits parameter (e.g. hundredths of a mph).

Parameters
[in]fromUnitsUnits corresponding to the input parameter
[in]toUnitsUnits corresponding to the pOutput parameter
[in]inputThe value to be converted
[out]pOutputPointer to the location where the converted value will be stored
Return values
FF_ERR_NO_ERRORif the conversion succeeded
FF_ERR_ARGUMENT_OUT_OF_RANGEif fromUnits, toUnits, or input contain illegal values
FF_ERR_INVALID_POINTERif pOutput is a null pointer
See also
FF_SpeedUnits_t
STFF::ConvertTemperature ( FF_TemperatureUnits_t  fromUnits,
FF_TemperatureUnits_t  toUnits,
double  input,
double *  pOutput 
)

#include <STFF-Utility.h>

Convert a temperature value from one set of units (degrees Celsius or degrees Fahrenheit) to the other.

Note that if the input value is in a fraction of the fromUnits parameter (e.g. hundredths of a degree C), then the output value will be in the same fraction of the toUnits parameter (e.g. hundredths of a degree F).

Parameters
[in]fromUnitsUnits corresponding to the input parameter
[in]toUnitsUnits corresponding to the pOutput parameter
[in]inputThe value to be converted
[out]pOutputPointer to the location where the converted value will be stored
Return values
FF_ERR_NO_ERRORif the conversion succeeded
FF_ERR_ARGUMENT_OUT_OF_RANGEif fromUnits, toUnits, or input contain illegal values
FF_ERR_INVALID_POINTERif pOutput is a null pointer
See also
FF_TemperatureUnits_t