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

Go to the source code of this file.

Functions

double zoneTimeDiff (const Zone *zone1, const Zone *zone0)
 return difference in hours between two zones (current zone and Wind zone)
 
void findWindGrib (double lat, double lon, double t, double *u, double *v, double *gust, double *w, double *twd, double *tws)
 use findflow to get wind and waves
 
double findRainGrib (double lat, double lon, double t)
 
double findPressureGrib (double lat, double lon, double t)
 
void findCurrentGrib (double lat, double lon, double t, double *uCurr, double *vCurr, double *tcd, double *tcs)
 use findflow to get current
 
char * gribToStr (const Zone *zone, char *str, size_t maxLen)
 write Grib information in string
 
void printGrib (const Zone *zone, const FlowP *gribData)
 print Grib u v ... for all lat lon time information
 
bool checkGribInfoToStr (int type, Zone *zone, char *buffer, size_t maxLen)
 check Grib information and write (add) report in the buffer return false if something wrong

 
bool checkGribToStr (bool hasCurrentGrib, char *buffer, size_t maxLen)
 check Grib information and write report in the buffer return false if something wrong

 
char * gribToStrJson (const char *fileName, char *out, size_t maxLen)
 write grib meta information in string
 
float * buildUVGWarray (const Zone *zone, const char *initialOfNames, const FlowP *gribData, size_t *outNValues)
 return array of outNvalues floats n = nTimeStamp * nbLat * nbLon * nShortNames values = [u1, v0, g0, w0, u1, v1, g1, w1, ...] g, w are optionnal
 
bool uvPresentGrib (const Zone *zone)
 true if u and v (or uCurr, vCurr) are in zone
 
bool isPresentGrib (const Zone *zone, const char *name)
 true if shortname in zone
 

Function Documentation

◆ buildUVGWarray()

float * buildUVGWarray ( const Zone zone,
const char *  initialOfNames,
const FlowP gribData,
size_t *  outNValues 
)
extern

return array of outNvalues floats n = nTimeStamp * nbLat * nbLon * nShortNames values = [u1, v0, g0, w0, u1, v1, g1, w1, ...] g, w are optionnal

Definition at line 33 of file r3grib.c.

References FlowP::g, Zone::nbLat, Zone::nbLon, Zone::nTimeStamp, FlowP::u, FlowP::v, FlowP::w, and zone.

Referenced by launchAction().

Here is the caller graph for this function:

◆ checkGribInfoToStr()

bool checkGribInfoToStr ( int  type,
Zone zone,
char *  buffer,
size_t  maxLen 
)
extern

◆ checkGribToStr()

bool checkGribToStr ( bool  hasCurrentGrib,
char *  buffer,
size_t  maxLen 
)
extern

check Grib information and write report in the buffer return false if something wrong

Definition at line 316 of file r3grib.c.

References checkGribInfoToStr(), CURRENT, currentZone, g_strlcat, geoIntersectGrib(), MAX_SIZE_LINE, Zone::nbLat, timeIntersectGrib(), WIND, and zone.

Referenced by launchAction(), and optionManage().

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

◆ findCurrentGrib()

void findCurrentGrib ( double  lat,
double  lon,
double  t,
double *  uCurr,
double *  vCurr,
double *  tcd,
double *  tcs 
)
extern

use findflow to get current

Definition at line 507 of file r3grib.c.

References Par::constCurrentD, Par::constCurrentS, CURRENT, currentZone, DEG_TO_RAD, findFlow(), fTwd(), fTws(), KN_TO_MS, Zone::nTimeStamp, par, tGribData, and Zone::timeStamp.

Referenced by buildNextIsochrone().

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

◆ findPressureGrib()

double findPressureGrib ( double  lat,
double  lon,
double  t 
)
extern

◆ findRainGrib()

double findRainGrib ( double  lat,
double  lon,
double  t 
)
extern

◆ findWindGrib()

void findWindGrib ( double  lat,
double  lon,
double  t,
double *  u,
double *  v,
double *  gust,
double *  w,
double *  twd,
double *  tws 
)
extern

use findflow to get wind and waves

Definition at line 488 of file r3grib.c.

References Par::constWave, Par::constWindTwd, Par::constWindTws, DEG_TO_RAD, findFlow(), fTwd(), fTws(), KN_TO_MS, par, tGribData, WIND, and zone.

Referenced by buildNextIsochrone(), goalP(), infoCoordToJson(), simpleGoalP(), and statRoute().

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

◆ gribToStr()

char * gribToStr ( const Zone zone,
char *  str,
size_t  maxLen 
)
extern

◆ gribToStrJson()

char * gribToStrJson ( const char *  fileName,
char *  out,
size_t  maxLen 
)
extern

◆ isPresentGrib()

bool isPresentGrib ( const Zone zone,
const char *  name 
)
extern

true if shortname in zone

Definition at line 169 of file r3grib.c.

References name, Zone::nShortName, Zone::shortName, and zone.

Referenced by buildInitialOfShortNameList().

Here is the caller graph for this function:

◆ printGrib()

void printGrib ( const Zone zone,
const FlowP gribData 
)
extern

print Grib u v ... for all lat lon time information

Definition at line 69 of file r3grib.c.

References Zone::nbLat, Zone::nbLon, Zone::nTimeStamp, Zone::timeStamp, and zone.

Referenced by optionManage().

Here is the caller graph for this function:

◆ uvPresentGrib()

bool uvPresentGrib ( const Zone zone)
extern

true if u and v (or uCurr, vCurr) are in zone

Definition at line 155 of file r3grib.c.

References Zone::nShortName, Zone::shortName, and zone.

Referenced by buildInitialOfShortNameList(), and checkGribInfoToStr().

Here is the caller graph for this function:

◆ zoneTimeDiff()

double zoneTimeDiff ( const Zone zone1,
const Zone zone0 
)
extern

return difference in hours between two zones (current zone and Wind zone)

Definition at line 19 of file r3grib.c.

References Zone::dataDate, Zone::dataTime, gribDateTimeToEpoch(), and Zone::wellDefined.

Referenced by initRouting().

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