nmpHomePos (Function)

Top  Previous  Next

Architecture:

X32 / NX32 / NX32L

Firmware version:

2.80 / 1.00.00

Nav. API level:

2


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
   ...
   //Show dialog
   IF nmpHomePos(lat := lat, lon := lon) = 0 THEN
      navStopSet(id := 60latitude := latlongitude := lontext := "Home");
   END_IF;
   ...
END;
END_PROGRAM;