This function will read the coordinates of the home position specified in the menu of Sygic.
This can be used for driving to home without having to define the location on the RTCU.
Input:
None.
Output:
lat : DINT
Latitude of the home position in semicircle format.
lon : DINT
Longitude of the home position in semicircle format.
Returns: INT
0
|
- Success.
|
-1
|
- Navigation interface is not opened.
|
-2
|
- Error communicating with navigation device.
|
-4
|
- Failed to retrieve position.
|
-11
|
- This is not supported by the device (e.g. the device is not an NMP device).
|
-12
|
- Navigation interface is busy.
|
Declaration:
FUNCTION nmpHomePos : INT;
VAR_INPUT
lat : ACCESS INT;
lon : ACCESS INT;
END_VAR;
Example:
INCLUDE rtcu.inc
PROGRAM test;
VAR
lat : DINT;
lon : DINT;
END_VAR;
BEGIN
...
IF nmpHomePos(lat := lat, lon := lon) = 0 THEN
navStopSet(id := 60, latitude := lat, longitude := lon, text := "Home");
END_IF;
...
END;
END_PROGRAM;
|