C2xSetRouteStartPoint
CAPL Functions » Car2x » C2xSetRouteStartPoint Valid for: CANoe DEFunction Syntax
long C2xSetRouteStartPoint(char* routeName, double latitude, double longitude, double heading)// form 1long C2xSetRouteStartPoint(char* routeName, char* stationName, double latitude, double longitude, double heading)// form 2
Description
If the current scenario is running, it must be stopped via C2xStopScenario() function call or by stopping scenario in Scenario Manager window.Form 1
All stations positioned on the route specified by routeName are moved such that the position of StartOffset = 0 is located at the projection of the geographical position given in latitude and longitude parameters on the route. The following condition must be met:- There is a part of the route which direction does not differ more than 90 degrees from the direction specified in the heading parameter.
Form 2
All stations positioned on the route specified by routeName are moved such that the station specified by stationName is located at the projection of the geographical position given in latitude and longitude parameters on the route. The following conditions must be met:- The station specified by stationName is located on the route specified by routeName.
- There is a part of the route which direction does not differ more than 90 degrees from the direction specified in the heading parameter.
Parameters
- routeName: Name of the route
- stationName (form 2): Name of the scenario station
- latitude: Actual geographical latitude of the station
- longitude: Actual geographical longitude of the station
- heading: Actual geographical heading of the station
Return Values
- 1: Success
- -1: Specified route and/or station name do not exist in the scenario.
- -2: Station(s) cannot be moved because current scenario is still running.
- -3: Start point of route cannot be changed, because the given position is too far away or the offset of the station(s) is larger than the remaining route length.