Navigation SDK Documentation |
Functions for Navigation.
SDK_ERROR SDK_API SDK_GetNavigationSettings | ( | SDK_NavigationSettings * | pNavigationSettings | ) |
Retrieve the navigation settings.
[out] | pNavigationSettings | The structure will be filled with the current settings. |
SDK_ERROR SDK_API SDK_SetNavigationSettings | ( | const SDK_NavigationSettings * | pNavigationSettings | ) |
Set the navigation settings.
Note that some changes don't have effect unless a navigation is initiated by calling SDK_CalculateTour(), SDK_LoadRoute() or SDK_CalculateViaRoute().
[in] | pNavigationSettings | New settings. One may use SDK_GetNavigationSettings() before calling SDK_SetNavigationSettings() to retrieve the default values. |
SDK_ERROR SDK_API SDK_GetGuidanceInformation | ( | const SDK_GPSData * | pGPSData, |
SDK_NavigationInformation * | pNavigationInformation, | ||
SDK_INT4 | forecast, | ||
SDK_ProgressCBFuncT | pCallBackFunc | ||
) |
Retrieve guidance information for a position on the current routing.
Guidance information is necessary to interpret actual routing data. Note that this call may change the currently open map within the Navigation SDK!
Due to the nature of "navigation" this call may take a while to return. Especially in the case of cross-border routing it may be more than one minute on certain devices if a reroute calculation has to be performed internally. So be prepared for this, e.g. by using the callback or application intrinsic methods. Don't forget that the SDK is not re-entrant, during this call there is no map rendering, etc. available!
[in] | pGPSData | object with actual GPS information. This argument must not be NULL! (as it was allowed in previous versions of the Navigation SDK) |
[out] | pNavigationInformation | Pointer to user supplied object that contains all relevant information of the actual routing. Filling either the GPSPosition or the GPSPositionMerc member is sufficient. |
[in] | forecast | Not yet implemented |
[in] | pCallBackFunc | Optional pointer to a callback method. Returns the actual status of the routing process. |
SDK_ERROR SDK_API SDK_SetManeuverGeneratorSettings | ( | const SDK_ManeuverGeneratorSettings * | pManeuverGeneratorSettings | ) |
Set the maneuver generator settings The maneuver generator has serveral options which can be set by this function. The options are:
[in] | pManeuverGeneratorSettings | settings to set. |
SDK_ERROR SDK_API SDK_GetManeuverGeneratorSettings | ( | SDK_ManeuverGeneratorSettings * | pManeuverGeneratorSettings | ) |
Get the maneuver generator settings The maneuver generator has serveral options which can be get by this function.
[in,out] | pManeuverGeneratorSettings | settings to retrive. |
SDK_ERROR SDK_API SDK_GetManeuverText | ( | const SDK_NavigationInformation * | pNavigationInformation, |
SDK_WCHAR_T * | pManeuverText, | ||
SDK_StringCBFuncT | pStringRetrieverCallBackFunc | ||
) |
Get the maneuver text This function builds and returns a string that can be used for navigation announcements. The navigation information given will be interpreted, decoded and a corresponding sentence will be built up. The generator only returns a text if the current maneuver situation should be spoken, multiple same outputs will be avoided. If the returned string is not empty, the announcement is valid and should be spoken or outputted by a player. The grammar and the localization of the strings is not done in the generator itself. The generator uses the callback function to retrieve the correct grammar and sentence portions from outside the SDK. This callback, which has to be implemented by the caller, must return the correct sentence for the given id. The callback itself is declared in SDKDef.h as "typedef const SDK_WCHAR_T * (SDK_API * SDK_StringCBFuncT)(SDK_INT4 id)". It will be called by the SDK with the ID for the needed string when building the annoncement text. The implementation of the callback must then return the correct sentences for the used language. This has the great advantage that no localization is needed in the generator, the grammar and sentences will all be declared in a separate place and the callee will return the correct portions of the sentence by the callback. The string IDs used for the sentences and the grammar can be found in SDKDef.h. There is also an example in NaviTest2 which shows the usage of this functionality and a header file with the needed String <-> ID mappings for english and german. We also have the mappings for several other languages, both for TTS and sound output.
There are two output types of the text:
[in] | pNavigationInformation | navigation information from which the announcement text will be generated. |
[out] | pManeuverText | the generated maneuver text in the previous set format. The buffer must be allocated by the user and should have a minimum size of 1024 chars. The function copies the resulting text into this buffer. |
[in] | pStringRetrieverCallBackFunc | a callback function to retrieve the correct localized sentences for the generator. |
SDK_ERROR SDK_API SDK_CheckIfTunnel | ( | const SDK_NavigationInformation * | pNavigationInformation, |
const SDK_GPSData * | pGPSData, | ||
SDK_BOOL * | pIsTunnel | ||
) |
Check if position in a tunnel.
Wether the given position is in a tunnel or not, the gps position extrapolator will be started or deactivated.
[in] | Pointer | |
[in] | object with actual GPS information. | |
[out] | Position is in Tunnel. Position was checked by positionvalidator. |
Retrieve route trace.
\param[out] pTrace Pointer to trace structure to be filled with trace for the current route. If there's no current route an error code is returned. \return Error code (\ref Errorcodes)
Retrieve remaining trace ahead of Route or complete tour.
That call must be matched with suitable calls to SDK_FreeRouteTrace() to avoid memory leaks.
[out] | pTrace | Pointer to trace structure to be filled with trace. |
[in] | onlyToNextStation | if true, trace ends at next station, else complete tourtrace will be generated. If there's no current route an error code is returned. |
Free route trace.
Free a route trace that was retrieved by SDK_GetRouteTraceAhead().
[in] | pTrace | Pointer to route trace structure which had been previously set by SDK_GetRouteTrace() |
SDK_ERROR SDK_API SDK_GetRouteTraces | ( | SDK_TraceExt ** | ppTraces, |
SDK_INT4 * | pNumberOfRouteTraces | ||
) |
Retrieve detailed route information of the first route trace part.
The trace of an A-B routing or the trace to the first station of a tour holds beside the trace points also information about different guidance kinds for this trace, like onroad and offroad parts. These trace parts will be returned as separate traces. You only need to call this function, if you want to get more detailed information about the first part of a trace. If you just need the trace itself, or all traces between the stations of a tour, use SDK_GetTourRouteTraces() instead.
That call must be matched with suitable calls to SDK_FreeRouteTraces() to avoid memory leaks.
[out] | ppTraces | Pointer to array of trace structures to be filled with the trace for the current route. |
[out] | pNumberOfRouteTraces | will be set to the number of route traces |
SDK_ERROR SDK_API SDK_GetTourRouteTraces | ( | SDK_TraceExt ** | ppTraces, |
SDK_INT4 * | pNumberOfRouteTraces | ||
) |
Retrieve the route traces of a whole tour.
If a tour was calculated, all traces between the different stations will be returned. If the calculation was a normal A-B routing, one trace will be returned. Attention: The GuidanceKind field of the SDK_TraceExt structure will always be set to SDK_gkSTANDARD. If you want more detailed information about the guidance kinds of the first trace of the tour/route, use SDK_GetRouteTraces() instead.
That call must be matched with suitable calls to SDK_FreeRouteTraces() to avoid memory leaks.
[out] | ppTraces | Pointer to array of trace structures to be filled with trace for the current route. |
[out] | pNumberOfRouteTraces | will be set to the number of route traces |
SDK_ERROR SDK_API SDK_FreeRouteTraces | ( | SDK_TraceExt * | pTraces, |
SDK_INT4 | NumberOfRouteTraces | ||
) |
Free route trace.
[in] | pTraces | Pointer to route traces retrieved by SDK_GetRouteTraces() |
[in] | NumberOfRouteTraces | Number of route traces supplied in pTraces pointer |
Start tracking mode.
The tracking mode should be used if there is no need for navigation any longer. Any internal data about navigation will be cleared. Calls to SDK_SetMapViewParameter() to adjust the map position result in setting the most suitable map, so there's always the best map available!. Since switching maps may not be always the intent of the user this mode can be switched off. There is no need to stop this mode prior to calculating a new route and starting navigation afterwards.
[in] | bEnable | If set to SDK_TRUE activate the map tracking mode, otherwise deactivate |
[in] | i | reserved for future applications. Use 0 for now. |
[in] | j | reserved for future applications. Use 0 for now. |
© PTV Group 2019 | Generated on Thu Mar 28 2019 02:27:02 for NavigationSDK by 1.8.8 |