Skip to main content
Open topic with navigation CAPL Functions » J1939 » GNSS NL » GNSSAddWpRel

GNSSAddWpRel

Valid for: CANoe DE • CANoe4SW DE

Function Syntax

dword GNSSAddWpRel( double latLength, double lonLength, double altLength )

Description

This function inserts a new waypoint at the end of the waypoint list. The new point is derived by adding the path differences and the last waypoint to be inserted. The unit of the parameters depends on the system of measurement units selected with the GNSSSetUnits function.

Parameters

  • latLength: difference in length along the latitude in reference to the last waypoint to be inserted (in m or yd)
    • positive value: eastward
    • negative value: westward
  • lonLength: difference in length along the longitude in reference to the last waypoint to be inserted (in m or yd)
    • positive value: northward
    • negative value: southward
  • altLength: difference in altitude in terms of the last waypoint to be inserted (in m or yd)

Return Values

error code

Example

// set a waypoint
GNSSAddWp( 48.46, 9.11, 255 );

// add a new waypoint 200 yd easterly of the last waypoint
GNSSSetUnits( 1 );
GNSSAddWpRel( 200.0, 0.0, 0.0 );