|
RCube
Rcube Rest Server calculates sail routes based on Grib files and sailing boat polar files
|

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 | |
| Pp * | isocArray |
| global variables | |
| IsoDesc * | isoDesc |
| int | nIsoc |
| int | maxNIsoc |
| Pp | lastClosest |
| ChooseDeparture | chooseDeparture |
| HistoryRouteList | historyRoute |
| SailRoute | route |
| store sail route calculated in engine.c by routing | |
|
extern |
launch all competitors
Definition at line 1331 of file engine.c.
References competitors, Zone::dataDate, Zone::dataTime, Competitor::dist, Competitor::duration, SailRoute::duration, EXIST_SOLUTION, g_atomic_int_get(), g_atomic_int_set(), g_strlcpy, Pp::lat, Competitor::lat, Pp::lon, Competitor::lon, MAX_SIZE_DATE, CompetitorsList::n, Competitor::name, newDate(), NO_SOLUTION, orthoDist(), par, Par::pDest, Par::pOr, CompetitorsList::ret, SailRoute::ret, route, ROUTING_STOPPED, routingLaunch(), CompetitorsList::runIndex, saveRoute(), Par::startTimeInHours, STOPPED, Competitor::strETA, CompetitorsList::t, and zone.

|
extern |
choose best time to reach pDest in minimum time
Definition at line 1269 of file engine.c.
References ChooseDeparture::bestCount, ChooseDeparture::bestTime, chooseDeparture, ChooseDeparture::count, SailRoute::duration, EXIST_SOLUTION, g_atomic_int_get(), g_atomic_int_set(), MAX_N_INTERVAL, MAX_UNREACHABLE, ChooseDeparture::maxDuration, ChooseDeparture::minDuration, NIL, NO_SOLUTION, par, ChooseDeparture::ret, SailRoute::ret, route, ROUTING_STOPPED, routingLaunch(), Par::startTimeInHours, STOPPED, ChooseDeparture::t, ChooseDeparture::tBegin, ChooseDeparture::tEnd, ChooseDeparture::tInterval, and ChooseDeparture::tStop.

|
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.
|
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().


|
extern |
free space for history route
Definition at line 405 of file engine.c.
References historyRoute, HistoryRouteList::n, and HistoryRouteList::r.
|
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.

|
extern |
log one CSV line report.
n is the number of competitors
Definition at line 1370 of file engine.c.
References Zone::dataDate, Zone::dataTime, SailRoute::destinationReached, Par::dispDms, SailRoute::duration, g_path_get_basename(), Par::gribFileName, lastClosest, Pp::lat, latToStr(), Par::logFileName, Pp::lon, lonToStr(), MAX_SIZE_DATE, MAX_SIZE_LINE, MAX_SIZE_NAME, WayPointList::n, newDate(), SailPoint::oCap, orthoDist(), par, Par::pDest, Par::polarFileName, Par::pOr, route, Par::startTimeInHours, SailRoute::t, Par::tStep, wayPoints, and zone.

|
extern |
copy route in a string true if enough space, false if truncated
Definition at line 627 of file engine.c.
References SailPoint::amure, SailRoute::avrTws, SailRoute::competitorIndex, competitors, SailRoute::dataDate, SailRoute::dataTime, Par::dispDms, SailRoute::duration, durationToStr(), fAwaAws(), fSailName(), fTwa(), SailPoint::g, g_strlcat, g_strlcpy, SailRoute::isocTimeStep, SailPoint::lat, latToStr(), SailPoint::lCap, SailPoint::lon, lonToStr(), MAX_SIZE_DATE, MAX_SIZE_LINE, MAX_SIZE_NAME, SailRoute::maxTws, SailPoint::motor, SailRoute::motorDist, motorTribordBabord(), MS_TO_KN, SailRoute::n, Competitor::name, SailRoute::nAmureChange, newDate(), SailRoute::nSailChange, SailPoint::oCap, SailPoint::od, par, SailRoute::polarFileName, route, SailPoint::sail, SMALL_SIZE, SailPoint::sog, SailPoint::stamina, Par::startTimeInHours, CompetitorsList::t, SailRoute::t, SailPoint::time, SailPoint::toIndexWp, SailRoute::totDist, SailPoint::twd, SailPoint::tws, and SailPoint::w.
Referenced by optionManage().


|
extern |
launch routing with parameters
Definition at line 1192 of file engine.c.
References Pp::amure, IsoDesc::bestVmc, IsoDesc::biggestOrthoVmc, SailRoute::calculationTime, checkArrival(), IsoDesc::closest, SailRoute::competitorIndex, competitors, SailRoute::destinationReached, Pp::father, IsoDesc::first, IsoDesc::focalLat, IsoDesc::focalLon, g_atomic_int_set(), Pp::id, initRouting(), isocArray, isoDesc, lastClosest, SailRoute::lastStepDuration, SailRoute::lastStepWpDuration, Pp::lat, WayPoint::lat, Pp::lon, WayPoint::lon, MAX_SIZE_ISOC, MILLION, WayPointList::n, Competitor::name, nIsoc, SailRoute::nWayPoints, par, Par::pDest, pId, Par::pOr, SailRoute::ret, route, routing(), ROUTING_ERROR, CompetitorsList::runIndex, IsoDesc::size, Par::startTimeInHours, statRoute(), storeRoute(), CompetitorsList::t, WayPointList::t, IsoDesc::toIndexWp, Par::tStep, and wayPoints.
Referenced by allCompetitors(), bestTimeDeparture(), launchAction(), and optionManage().


|
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().

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().


|
extern |
Definition at line 42 of file engine.c.
Referenced by bestTimeDeparture().
|
extern |
Definition at line 40 of file engine.c.
Referenced by freeHistoryRoute(), and saveRoute().
|
extern |
global variables
Definition at line 32 of file engine.c.
Referenced by checkArrival(), dumpIsocToFile(), findFather(), findFirst(), initRouting(), isochronesToStrCatJson(), main(), replicate(), routing(), routingLaunch(), and storeRoute().
|
extern |
Definition at line 33 of file engine.c.
Referenced by checkArrival(), dumpIsocToFile(), findFirst(), forwardSectorOptimize(), initRouting(), isochronesToStrCatJson(), isoDescToStr(), isoDescToStrCatJson(), main(), replicate(), routeToJson(), routing(), routingLaunch(), and storeRoute().
|
extern |
Definition at line 36 of file engine.c.
Referenced by initRouting(), logReport(), routing(), and routingLaunch().
|
extern |
Definition at line 34 of file engine.c.
Referenced by initRouting(), and routing().
|
extern |
Definition at line 35 of file engine.c.
Referenced by dumpIsocToFile(), findFirst(), forwardSectorOptimize(), initContext(), initRouting(), initSector(), isochronesToStrCatJson(), isoDescToStr(), isoDescToStrCatJson(), optimize(), routing(), routingLaunch(), and storeRoute().
|
extern |
store sail route calculated in engine.c by routing
Definition at line 39 of file engine.c.
Referenced by allCompetitors(), bestTimeDeparture(), calcDuration(), checkArrival(), checkRoute(), exportRouteToGpx(), initContext(), initRouting(), launchAction(), logReport(), main(), optionManage(), routeToJson(), routeToStr(), routing(), routingLaunch(), saveRoute(), statRoute(), and storeRoute().