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

Go to the source code of this file.

Functions

bool storeRoute (SailRoute *route, const Pp *pOr, const Pp *pDest)
 store route response false if error
 
bool isoDescToStr (char *str, size_t maxLen)
 copy isoc Descriptors in a string true if enough space, false if truncated
 
bool routeToStr (const SailRoute *route, char *str, size_t maxLen, char *footer, size_t maxLenFooter)
 copy route in a string true if enough space, false if truncated
 
void * routingLaunch ()
 launch routing with parameters
 
void * bestTimeDeparture ()
 choose best time to reach pDest in minimum time
 
void * allCompetitors ()
 launch all competitors
 
void freeHistoryRoute ()
 free space for history route
 
void logReport (int n)
 log one CSV line report.
 
void saveRoute (SailRoute *route)
 store current route in history
 
bool exportRouteToGpx (const SailRoute *route, const char *filename)
 export route with GPX format
 
bool dumpIsocToFile (const char *fileName)
 write in CSV file Isochrones
 

Variables

PpisocArray
 global variables
 
IsoDescisoDesc
 
int nIsoc
 
int maxNIsoc
 
Pp lastClosest
 
ChooseDeparture chooseDeparture
 
HistoryRouteList historyRoute
 
SailRoute route
 store sail route calculated in engine.c by routing
 

Function Documentation

◆ allCompetitors()

◆ bestTimeDeparture()

◆ dumpIsocToFile()

bool dumpIsocToFile ( const char *  fileName)
extern

write in CSV file Isochrones

Definition at line 356 of file engine.c.

References Pp::amure, Pp::dd, Pp::father, Pp::id, isocArray, isoDesc, Pp::lat, Pp::lon, MAX_SIZE_ISOC, Pp::motor, nIsoc, Pp::sail, IsoDesc::size, Pp::toIndexWp, and Pp::vmc.

◆ exportRouteToGpx()

bool exportRouteToGpx ( const SailRoute route,
const char *  filename 
)
extern

export route with GPX format

Definition at line 1420 of file engine.c.

References SailRoute::dataDate, SailRoute::dataTime, Pp::lat, SailPoint::lat, Pp::lon, SailPoint::lon, MAX_SIZE_DATE, SailRoute::n, newDate(), SailPoint::oCap, par, Par::pDest, PROG_NAME, route, SailPoint::sog, Par::startTimeInHours, SailRoute::t, and SailPoint::time.

Referenced by launchAction().

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

◆ freeHistoryRoute()

void freeHistoryRoute ( )
extern

free space for history route

Definition at line 405 of file engine.c.

References historyRoute, HistoryRouteList::n, and HistoryRouteList::r.

◆ isoDescToStr()

bool isoDescToStr ( char *  str,
size_t  maxLen 
)
extern

copy isoc Descriptors in a string true if enough space, false if truncated

Definition at line 330 of file engine.c.

References Par::dispDms, g_strlcat, g_strlcpy, isoDesc, latToStr(), lonToStr(), MAX_SIZE_LINE, nIsoc, and par.

Here is the call graph for this function:

◆ logReport()

◆ routeToStr()

◆ routingLaunch()

◆ saveRoute()

void saveRoute ( SailRoute route)
extern

store current route in history

Definition at line 378 of file engine.c.

References historyRoute, MAX_N_HISTORY, HistoryRouteList::n, SailRoute::nIsoc, HistoryRouteList::r, route, and SailRoute::t.

Referenced by allCompetitors().

Here is the caller graph for this function:

◆ storeRoute()

bool storeRoute ( SailRoute route,
const Pp pOr,
const Pp pDest 
)
extern

store route response false if error

Definition at line 561 of file engine.c.

References Pp::amure, SailPoint::amure, Pp::father, SailPoint::father, findFather(), Pp::id, SailPoint::id, isocArray, isoDesc, Pp::lat, SailPoint::lat, Pp::lon, SailPoint::lon, lonCanonize(), MAX_SIZE_ISOC, Pp::motor, SailPoint::motor, SailRoute::n, nIsoc, SailRoute::nIsoc, SailRoute::nWayPoints, route, Pp::sail, SailPoint::sail, IsoDesc::size, SailRoute::t, Pp::toIndexWp, and SailPoint::toIndexWp.

Referenced by routingLaunch().

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

Variable Documentation

◆ chooseDeparture

ChooseDeparture chooseDeparture
extern

Definition at line 42 of file engine.c.

Referenced by bestTimeDeparture().

◆ historyRoute

HistoryRouteList historyRoute
extern

Definition at line 40 of file engine.c.

Referenced by freeHistoryRoute(), and saveRoute().

◆ isocArray

Pp* isocArray
extern

◆ isoDesc

◆ lastClosest

Pp lastClosest
extern

Definition at line 36 of file engine.c.

Referenced by initRouting(), logReport(), routing(), and routingLaunch().

◆ maxNIsoc

int maxNIsoc
extern

Definition at line 34 of file engine.c.

Referenced by initRouting(), and routing().

◆ nIsoc

◆ route