|
RCube
Rcube Rest Server calculates sail routes based on Grib files and sailing boat polar files
|
#include <float.h>#include <stdio.h>#include <stdlib.h>#include <string.h>#include <stdbool.h>#include <sys/stat.h>#include <sys/time.h>#include <time.h>#include <math.h>#include "r3types.h"#include "glibwrapper.h"#include "inline.h"#include "r3util.h"#include "grib.h"
Go to the source code of this file.
Data Structures | |
| struct | Sector |
Macros | |
| #define | MAX_N_INTERVAL 1000 |
| \Engine tws = True Wind Speed twd = True Wind Direction twa = True Wind Angle - the angle of the boat to the wind sog = Speed over Ground of the boat cog = Course over Ground of the boat | |
| #define | LIMIT 1 |
| #define | MIN_VMC_RATIO 0.5 |
| #define | MAX_N_HISTORY 20 |
| #define | MAX_UNREACHABLE 0 |
| #define | MIN_DT 0.1 |
Functions | |
| static double | distSegmentWithFoot (double latX, double lonX, double latA, double lonA, double latB, double lonB, double *latH, double *lonH) |
| return distance (nm) from point X do segment [AB]. | |
| static int | findFirst (int nIsoc) |
| find first point in isochrone. | |
| static void | initSector (int nIsoc, int nMax) |
| initialization of sector | |
| static int | forwardSectorOptimize (const Pp *pOr, const Pp *pDest, int nIsoc, const Pp *isoList, int isoLen, Pp *optIsoc) |
| reduce the size of Isolist note influence of parameters par.nSector, par.jFactor and par.kFactor make new isochrone optIsoc return the length of this isochrone side effect: update isoDesc | |
| static int | optimize (const Pp *pOr, const Pp *pDest, int nIsoc, int algo, const Pp *isoList, int isoLen, Pp *optIsoc) |
| choice of algorithm used to reduce the size of Isolist | |
| static int | buildNextIsochrone (const Pp *pOr, const Pp *pDest, const Pp *isoList, int isoLen, double t, double dt, Pp *newList, double *bestVmc, double *biggestOrthoVmc) |
| build the new list describing the next isochrone, starting from isoList returns length of the newlist built or -1 if error | |
| static int | findFather (int ptId, int i, int lIsoc) |
| find father of point in previous isochrone | |
| bool | isoDescToStr (char *str, size_t maxLen) |
| copy isoc Descriptors in a string true if enough space, false if truncated | |
| bool | dumpIsocToFile (const char *fileName) |
| write in CSV file Isochrones | |
| void | saveRoute (SailRoute *route) |
| store current route in history | |
| void | freeHistoryRoute () |
| free space for history route | |
| static double | calcDuration (SailRoute *route) |
| return the total duration of the route, taking into acount last steps duration | |
| static void | statRoute (SailRoute *route) |
| add additionnal information to the route | |
| bool | storeRoute (SailRoute *route, const Pp *pOr, const Pp *pDest) |
| store route response false if error | |
| static char * | motorTribordBabord (bool motor, int amure, char *str, size_t maxLen) |
| produce string that says if Motor, Tribord, Babord | |
| 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 | |
| static bool | simpleGoalP (const Pp *pA, const Pp *pDest, double t, double dt, double *timeTo, double *distance, bool *motor, int *amure, int *sail) |
| return true if pDest can be reached from pA - in less time than dt timeTo give the time to get to pDest motor true if goal reached with motor current not considered for this last step penalty not considered because may bug | |
| static bool | simpleGoal (Pp *pDest, Pp *isoList, int len, double t, double dt, double *lastStepDuration, bool *motor, int *amure) |
| true if goal can be reached directly in dt from isochrone update isoDesc side effect : pDest.father can be modified ! | |
| static bool | goalP (const Pp *pA, const Pp *pB, const Pp *pDest, double t, double dt, double *timeTo, double *distance, bool *motor, int *amure, int *sail, bool *bestFirst) |
| return closest index point to pDest in Isoc, and this point | |
| static bool | goal (Pp *pDest, Pp *isoList, int len, double t, double dt, double *lastStepDuration, bool *motor, int *amure) |
| true if goal can be reached directly in dt from isochrone update isoDesc side effect : pDest.father can be modified ! | |
| static int | fClosest (const Pp *isoc, int n, const Pp *pDest, Pp *closest) |
| return closest index point to pDest in Isoc, and this point | |
| static void | replicate (int n) |
| when no wind, build next isochrone as a replica of previous isochrone Manage carefully id and father fields | |
| static int | routing (Pp *pOr, Pp *pDest, int toIndexWp, double t, double dt, double *lastStepDuration) |
| find optimal routing from p0 to pDest using grib file and polar return number of steps to reach pDest, NIL if unreached, -1 if problem, -2 if stopped by user, 0 reserved for not terminated return also lastStepDuration if destination reached (0 if unreached) side effects: nIsoc, maxNIsoc, pOrToPDestCog, isoDesc, isocArray, route pOr and pDest modified | |
| static void | initRouting (void) |
| global variable initialization for routing | |
| static void | checkArrival (SailRoute *route, Pp *pDest) |
| check arrival between pDest and segments [pPrev-pCurr] and [pCurr-pNext] pFoot0 is the projection of pDest on [pPrev-pCurr] pFoot1 is the projection of pDest on [pCurr-pNext] produces in Json distance informations: dSeg0: pPrev-pCurr dSeg1: pCurr-pNext dPrev: pDest-pPrev dNext: pDest-pNext dCurr: pDest-pCurr dFoot0: pDest-pFoot0 dFoot1: pDest-pFoot1 When destination is reached, pDest = par.pDest When destination is unreached, pDest is the arrival point on last isochrone and pDest = pCurr = pFoot0 = pFoot1 | |
| void * | routingLaunch () |
| launch routing with parameters | |
| void * | bestTimeDeparture () |
| choose best time to reach pDest in minimum time | |
| void * | allCompetitors () |
| launch all competitors | |
| void | logReport (int n) |
| log one CSV line report. | |
| bool | exportRouteToGpx (const SailRoute *route, const char *fileName) |
| export route with GPX format | |
Variables | |
| Pp * | isocArray = NULL |
| global variables | |
| IsoDesc * | isoDesc = NULL |
| int | maxNIsoc = 0 |
| int | nIsoc = 0 |
| Pp | lastClosest |
| SailRoute | route |
| store sail route calculated in engine.c by routing | |
| HistoryRouteList | historyRoute = { .n = 0, .r = NULL } |
| ChooseDeparture | chooseDeparture |
| static double | pOrToPDestCog = 0.0 |
| static global variable. | |
| static int | pId = 1 |
| static double | tDeltaCurrent = 0.0 |
| Sector | sector [2][MAX_N_SECTORS] |
| #define MAX_N_INTERVAL 1000 |
| void * allCompetitors | ( | ) |
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.

| void * bestTimeDeparture | ( | ) |
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.

|
static |
build the new list describing the next isochrone, starting from isoList returns length of the newlist built or -1 if error
Definition at line 218 of file engine.c.
References Par::allwaysSea, Pp::amure, BABORD, Par::cogStep, Par::constWindTws, Zone::dataDate, Zone::dataTime, Par::dayEfficiency, Pp::dd, DEG_TO_RAD, Pp::father, findCurrentGrib(), findPolar(), findWindGrib(), fTwa(), Pp::id, isDay(), isInZone(), isSeaTolerant(), Pp::lat, Pp::lon, MAX, MAX_SIZE_ISOC, maxSpeedInPolarAt(), Par::maxWind, MIN_DT, Pp::motor, Par::motorSpeed, MS_TO_KN, Par::nightEfficiency, orthoCap(), orthoDist(), Pp::orthoVmc, par, Par::penalty0, Par::penalty1, Par::penalty2, pId, polMat, pOrToPDestCog, Par::rangeCog, Pp::sail, sailPolMat, tDeltaCurrent, Par::threshold, tIsSea, Pp::toIndexWp, TRIBORD, Pp::vmc, wavePolMat, Par::withCurrent, Par::withWaves, Par::xWind, and zone.
Referenced by routing().


|
static |
return the total duration of the route, taking into acount last steps duration
Definition at line 412 of file engine.c.
References SailRoute::lastStepDuration, SailRoute::lastStepWpDuration, SailRoute::n, SailRoute::nWayPoints, par, route, and Par::tStep.
Referenced by statRoute().

check arrival between pDest and segments [pPrev-pCurr] and [pCurr-pNext] pFoot0 is the projection of pDest on [pPrev-pCurr] pFoot1 is the projection of pDest on [pCurr-pNext] produces in Json distance informations: dSeg0: pPrev-pCurr dSeg1: pCurr-pNext dPrev: pDest-pPrev dNext: pDest-pNext dCurr: pDest-pCurr dFoot0: pDest-pFoot0 dFoot1: pDest-pFoot1 When destination is reached, pDest = par.pDest When destination is unreached, pDest is the arrival point on last isochrone and pDest = pCurr = pFoot0 = pFoot1
Definition at line 1142 of file engine.c.
References SailRoute::destinationReached, distSegmentWithFoot(), Pp::father, findFather(), Pp::id, isocArray, isoDesc, SailRoute::lastPointInfo, Pp::lat, Pp::lon, MAX_SIZE_ISOC, SailRoute::nIsoc, orthoDist(), route, and IsoDesc::size.
Referenced by routingLaunch().


|
inlinestatic |
return distance (nm) from point X do segment [AB].
Meaning to foot H, orthogonal projection of X on [AB]
Definition at line 58 of file engine.c.
References CLAMP, and DEG_TO_RAD.
Referenced by checkArrival(), and goalP().

| bool dumpIsocToFile | ( | const char * | fileName | ) |
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.
| bool exportRouteToGpx | ( | const SailRoute * | route, |
| const char * | fileName | ||
| ) |
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().


|
static |
find father of point in previous isochrone
Definition at line 317 of file engine.c.
References isocArray, and MAX_SIZE_ISOC.
Referenced by checkArrival(), and storeRoute().

|
inlinestatic |
find first point in isochrone.
Useful for drawAllIsochrones
Definition at line 91 of file engine.c.
References DEG_TO_RAD, isocArray, isoDesc, Pp::lat, Pp::lon, MAX_SIZE_ISOC, nIsoc, and IsoDesc::size.
Referenced by routing().

|
inlinestatic |
reduce the size of Isolist note influence of parameters par.nSector, par.jFactor and par.kFactor make new isochrone optIsoc return the length of this isochrone side effect: update isoDesc
Definition at line 123 of file engine.c.
References IsoDesc::bestVmc, IsoDesc::biggestOrthoVmc, Pp::dd, DEG_TO_RAD, IsoDesc::focalLat, IsoDesc::focalLon, initSector(), isoDesc, Par::jFactor, Par::kFactor, Pp::lat, LIMIT, Pp::lon, MIN_VMC_RATIO, nIsoc, Sector::nPt, Par::nSectors, orthoCap(), Sector::orthoVmc, Pp::orthoVmc, par, pOrToPDestCog, sector, Sector::vmc, and Pp::vmc.
Referenced by optimize().


| void freeHistoryRoute | ( | ) |
free space for history route
Definition at line 405 of file engine.c.
References historyRoute, HistoryRouteList::n, and HistoryRouteList::r.
|
inlinestatic |
true if goal can be reached directly in dt from isochrone update isoDesc side effect : pDest.father can be modified !
Definition at line 889 of file engine.c.
References Par::allwaysSea, Pp::amure, Pp::father, goalP(), Pp::id, isSeaTolerant(), Pp::lat, Pp::lon, Pp::motor, par, Pp::sail, and tIsSea.

|
inlinestatic |
return closest index point to pDest in Isoc, and this point
return true if pDest can be reached from segment [pA pB] - in less time than dt timeTo give the time to get to pDest motor true if goal reached with motor bestFirst true if pA is the best, false if pB is best current not considered for this last step penalty not considered because may bug
Definition at line 811 of file engine.c.
References BABORD, Zone::dataDate, Zone::dataTime, Par::dayEfficiency, DEG_TO_RAD, distSegmentWithFoot(), findPolar(), findWindGrib(), fTwa(), isDay(), Pp::lat, Pp::lon, maxSpeedInPolarAt(), Par::motorSpeed, Par::nightEfficiency, orthoDist(), par, polMat, RAD_TO_DEG, sailPolMat, Par::threshold, TRIBORD, wavePolMat, Par::withWaves, Par::xWind, and zone.
Referenced by goal(), and routing().


|
static |
global variable initialization for routing
Definition at line 1109 of file engine.c.
References currentZone, SailRoute::destinationReached, Pp::father, g_atomic_int_set(), Pp::id, isocArray, isoDesc, lastClosest, maxNIsoc, nIsoc, par, Par::pDest, pId, Par::pOr, pOrToPDestCog, SailRoute::ret, route, ROUTING_RUNNING, sector, tDeltaCurrent, zone, and zoneTimeDiff().
Referenced by routingLaunch().


|
inlinestatic |
| bool isoDescToStr | ( | char * | str, |
| size_t | maxLen | ||
| ) |
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.

| void logReport | ( | int | n | ) |
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.

|
static |
produce string that says if Motor, Tribord, Babord
Definition at line 615 of file engine.c.
References g_strlcpy, and TRIBORD.
Referenced by routeToStr().

|
inlinestatic |
choice of algorithm used to reduce the size of Isolist
Definition at line 205 of file engine.c.
References forwardSectorOptimize(), and nIsoc.
Referenced by routing().


|
static |
when no wind, build next isochrone as a replica of previous isochrone Manage carefully id and father fields
Definition at line 943 of file engine.c.
References Pp::id, isocArray, isoDesc, MAX_SIZE_ISOC, and IsoDesc::size.
Referenced by routing().

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


|
static |
find optimal routing from p0 to pDest using grib file and polar return number of steps to reach pDest, NIL if unreached, -1 if problem, -2 if stopped by user, 0 reserved for not terminated return also lastStepDuration if destination reached (0 if unreached) side effects: nIsoc, maxNIsoc, pOrToPDestCog, isoDesc, isocArray, route pOr and pDest modified
Definition at line 966 of file engine.c.
References Pp::amure, buildNextIsochrone(), IsoDesc::closest, competitors, Pp::dd, directCap(), Pp::father, fClosest(), findFirst(), IsoDesc::first, IsoDesc::focalLat, IsoDesc::focalLon, g_atomic_int_get(), goalP(), Pp::id, initSector(), isocArray, isoDesc, lastClosest, Pp::lat, Pp::lon, MAX_N_ISOC, MAX_SIZE_ISOC, maxNIsoc, Pp::motor, Competitor::name, NIL, nIsoc, Par::nSectors, Zone::nTimeStamp, Par::opt, optimize(), orthoDist(), par, pOrToPDestCog, replicate(), SailRoute::ret, route, ROUTING_STOPPED, CompetitorsList::runIndex, Pp::sail, simpleGoal(), IsoDesc::size, CompetitorsList::t, SailRoute::t, Zone::timeStamp, Pp::toIndexWp, IsoDesc::toIndexWp, Pp::vmc, and zone.
Referenced by routingLaunch().


| void * routingLaunch | ( | ) |
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().


| void saveRoute | ( | SailRoute * | route | ) |
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().

|
inlinestatic |
true if goal can be reached directly in dt from isochrone update isoDesc side effect : pDest.father can be modified !
Definition at line 772 of file engine.c.
References Par::allwaysSea, Pp::amure, Pp::father, Pp::id, isSea(), Pp::lat, Pp::lon, Pp::motor, par, Pp::sail, simpleGoalP(), and tIsSea.
Referenced by routing().


|
inlinestatic |
return true if pDest can be reached from pA - in less time than dt timeTo give the time to get to pDest motor true if goal reached with motor current not considered for this last step penalty not considered because may bug
Definition at line 712 of file engine.c.
References BABORD, Zone::dataDate, Zone::dataTime, Par::dayEfficiency, DEG_TO_RAD, findPolar(), findWindGrib(), fTwa(), isDay(), Pp::lat, Pp::lon, maxSpeedInPolarAt(), Par::motorSpeed, Par::nightEfficiency, orthoDist(), par, polMat, RAD_TO_DEG, sailPolMat, Par::threshold, TRIBORD, wavePolMat, Par::withWaves, Par::xWind, and zone.
Referenced by simpleGoal().


|
static |
add additionnal information to the route
Definition at line 422 of file engine.c.
References SailPoint::amure, SailRoute::avrGust, SailRoute::avrSog, SailRoute::avrTws, SailRoute::avrWave, BABORD, SailRoute::babordDist, calcDuration(), Zone::dataDate, SailRoute::dataDate, Zone::dataTime, SailRoute::dataTime, SailRoute::destinationReached, directCap(), SailRoute::duration, findWindGrib(), fPointLoss(), fTimeToRecupOnePoint(), SailPoint::g, g_path_get_basename(), g_strlcpy, SailRoute::isocTimeStep, SailRoute::lastStepDuration, SailRoute::lastStepWpDuration, Pp::lat, SailPoint::lat, SailPoint::lCap, SailPoint::ld, Pp::lon, SailPoint::lon, loxoDist(), MAX, SailRoute::maxGust, SailRoute::maxTws, SailRoute::maxWave, SailPoint::motor, SailRoute::motorDist, SailRoute::n, SailRoute::nAmureChange, SailRoute::nSailChange, SailRoute::nWayPoints, SailPoint::oCap, SailPoint::od, orthoCap(), orthoDist(), par, SailRoute::polarFileName, Par::polarFileName, route, SailPoint::sail, SailPoint::sog, SailPoint::stamina, STAMINA_FULL_PACK, STAMINA_SAIL, STAMINA_SHIP, STAMINA_TACK, Par::staminaVR, Par::startTimeInHours, SailRoute::t, SailPoint::time, SailPoint::toIndexWp, SailRoute::totDist, TRIBORD, SailRoute::tribordDist, Par::tStep, SailPoint::twd, SailPoint::tws, SailPoint::u, SailPoint::v, SailPoint::w, and zone.
Referenced by routingLaunch().


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


| ChooseDeparture chooseDeparture |
Definition at line 42 of file engine.c.
Referenced by bestTimeDeparture().
| HistoryRouteList historyRoute = { .n = 0, .r = NULL } |
Definition at line 40 of file engine.c.
Referenced by freeHistoryRoute(), and saveRoute().
| Pp* isocArray = NULL |
global variables
Definition at line 32 of file engine.c.
Referenced by checkArrival(), dumpIsocToFile(), findFather(), findFirst(), initRouting(), isochronesToStrCatJson(), main(), replicate(), routing(), routingLaunch(), and storeRoute().
| IsoDesc* isoDesc = NULL |
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().
| Pp lastClosest |
Definition at line 36 of file engine.c.
Referenced by initRouting(), logReport(), routing(), and routingLaunch().
| int maxNIsoc = 0 |
Definition at line 34 of file engine.c.
Referenced by initRouting(), and routing().
| int nIsoc = 0 |
Definition at line 35 of file engine.c.
Referenced by dumpIsocToFile(), findFirst(), forwardSectorOptimize(), initContext(), initRouting(), initSector(), isochronesToStrCatJson(), isoDescToStr(), isoDescToStrCatJson(), optimize(), routing(), routingLaunch(), and storeRoute().
|
static |
Definition at line 46 of file engine.c.
Referenced by buildNextIsochrone(), initRouting(), and routingLaunch().
|
static |
static global variable.
If linking issue, remove static
Definition at line 45 of file engine.c.
Referenced by buildNextIsochrone(), forwardSectorOptimize(), initRouting(), and routing().
| SailRoute route |
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().
| Sector sector[2][MAX_N_SECTORS] |
Definition at line 55 of file engine.c.
Referenced by forwardSectorOptimize(), initRouting(), and initSector().
|
static |
Definition at line 47 of file engine.c.
Referenced by buildNextIsochrone(), and initRouting().