RCube
Rcube Rest Server calculates sail routes based on Grib files and sailing boat polar files
Loading...
Searching...
No Matches
polar.h File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

void bestVmg (double tws, PolMat *mat, double *vmgAngle, double *vmgSpeed)
 return VMG: angle and speed at TWS: pres
 
void bestVmgBack (double tws, PolMat *mat, double *vmgAngle, double *vmgSpeed)
 return VMG back: angle and speed at TWS: vent arriere
 
bool readPolar (const char *fileName, PolMat *mat, PolMat *sailPolMat, char *errMessage, size_t maxLen)
 Launch readPolarCsv or readPolarJson according to type.
 
char * polToStr (const PolMat *mat, char *str, size_t maxLen)
 write polar information in string
 
char * polToStrJson (bool report, const char *fileName, const char *objName, char *out, size_t maxLen)
 write polar information in string Json format
 

Function Documentation

◆ bestVmg()

void bestVmg ( double  tws,
PolMat mat,
double *  vmgAngle,
double *  vmgSpeed 
)
extern

return VMG: angle and speed at TWS: pres

Definition at line 163 of file polar.c.

References DEG_TO_RAD, findPolar(), PolMat::nLine, and PolMat::t.

Here is the call graph for this function:

◆ bestVmgBack()

void bestVmgBack ( double  tws,
PolMat mat,
double *  vmgAngle,
double *  vmgSpeed 
)
extern

return VMG back: angle and speed at TWS: vent arriere

Definition at line 178 of file polar.c.

References DEG_TO_RAD, findPolar(), PolMat::nLine, and PolMat::t.

Here is the call graph for this function:

◆ polToStr()

char * polToStr ( const PolMat mat,
char *  str,
size_t  maxLen 
)
extern

write polar information in string

Definition at line 193 of file polar.c.

References g_strlcat, MAX_SIZE_LINE, PolMat::maxAll, PolMat::nCol, PolMat::nLine, PolMat::nSail, and PolMat::t.

Referenced by optionManage().

Here is the caller graph for this function:

◆ polToStrJson()

char * polToStrJson ( bool  report,
const char *  fileName,
const char *  objName,
char *  out,
size_t  maxLen 
)
extern

write polar information in string Json format

Definition at line 419 of file polar.c.

References buildRootName(), PolMat::fromJson, g_strlcat, PolMat::jsonHeader, MAX_SIZE_FILE_NAME, MAX_SIZE_LINE, MAX_SIZE_TEXT, PolMat::maxAll, PolMat::name, PolMat::nCol, PolMat::nLine, PolMat::nSail, polarCheck(), readPolar(), PolMat::t, and PolMat::tSail.

Referenced by launchAction().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ readPolar()

bool readPolar ( const char *  fileName,
PolMat mat,
PolMat sailPolMat,
char *  errMessage,
size_t  maxLen 
)
extern

Launch readPolarCsv or readPolarJson according to type.

Definition at line 388 of file polar.c.

References g_str_has_suffix(), MAX_SIZE_LINE, MAX_SIZE_NAME, PolMat::maxAll, PolMat::name, newFileNameSuffix(), PolMat::nSail, readPolarCsv(), readPolarJson(), sailName, sailNameSize, sailPolMat, and PolMat::tSail.

Referenced by checkParamAndUpdate(), initContext(), and polToStrJson().

Here is the call graph for this function:
Here is the caller graph for this function: