I have been developing an Autopilot
application for some years but I am new to the Forums
so let me know if I am doing the wrong thing or communicating with the wrong area in OpenCPN
. A brief history
of my background is mentioned in thread “TCP/IP Help Required”.
I am now developing and bench testing some Autopilot
I wrote some 10 years ago. From an AP point of view I have some issues I would like to discuss regarding the output of route
data from OpenCPN.
The procedure to define and activate a route
if fine. The code to intercept the route from the current
ships position to the first waypoint (Wp) is fine also.
The following massage sequence will ill illustrate a problem for the AP:
19/11/2014 06:55:33: $GPRMC,085533.337,A,2810.208,S,15333.710,E,7.1,351 .2,191114,8.6,E*7A
19/11/2014 06:55:34: $ECRMB,A,0.024,L,,001,2810.167,S,15333.666,E,0.056 ,316.510,7.100,V*32
19/11/2014 06:55:34: $ECAPB,A,A,0.024,L,N,V,V,342.270,T,001,316.510,T,3 16.510,T*34
This massage sequence is typical of tracking data before approaching the To_Waypoint (ToWp).
19/11/2014 06:55:34: $GPRMC,085534.352,A,2810.206,S,15333.710,E,7.1,351 .2,191114,8.6,E*70
19/11/2014 06:55:35: $ECRMB,A,0.025,L,,001,2810.167,S,15333.666,E,0.054 ,315.062,7.100,A*25
19/11/2014 06:55:35: $ECAPB,A,A,0.025,L,N,A,V,342.270,T,001,315.062,T,3 15.062,T*22
This is the data stream at the end of a leg as the ship approaches the ToWp. The APB fields changes from “V,V” to “A,V” to indicate that the “Arrival Circle Entered”. Depending on circumstances this may not be early enough.
19/11/2014 06:55:35: $GPRMC,085535.365,A,2810.204,S,15333.709,E,7.1,351 .2,191114,8.6,E*7F
19/11/2014 06:55:36: $ECRMB,A,0.010,R,001,002,2810.096,S,15333.542,E,0. 183,306.363,7.100,V*19
19/11/2014 06:55:36: $ECAPB,A,A,0.010,R,N,V,V,303.093,T,002,306.363,T,3 06.363,T*24
It is not until this RMB is received that the Next_ Waypoint (NxWp) is defined.
From a navigation
and AP point of view this is too late to get the NxWp data. The transition from current
leg to the next can be very different dependent on data. Speed, turn rate, turn radius, set all have an influence.
I would prefer that the Route message RTE or a sequential list of Wp data WPL was transmitted. At the very least provide the NxWp data just after the leg data is transmitted. Amended data can be resent using the Wp ID as key.
It is the responsibility of the ECS to manage the route data and supply the AP with the data in a timely manner. It is the responsibility of the AP to use the data to manage the helm
to achieve an accurate navigation
I Think OpenCPN is a great electronic charting system and an AP will not go amiss.
Looking forward to hearing your feedback.