Horizontal Navigation System
Simple navigation system HNS.
It is a functional monitor with several modes for displaying waypoints:
Az ref mode - standard operating mode of the system, displays waypoints relative to transport.
Geo mode - mode that is activated by the "Az ref mode off" button, identical to "Map mode" but without displaying the map.
Map mode - map display mode on the monitor.
In Geo mode and Map mode waypoints are displayed the same way.
There is a function for selecting a waypoint using the corresponding buttons.
AUTO mode automatically switches to the next waypoint when the vehicle is 50 meters away from the current point.
The system can be easily combined with other systems, such as an autopilot, or upgraded to include target display.
Composite output have:
1 number channel - X coordinate selected waypoint;
2 number channel - Y coordinate selected waypoint;
3 number channel- map Zoom;
1 bool channel - Map mode;
2 bool channel - Geo mode.
To display points relative to the vehicle(Az ref mode), i use:
imX,imY = map.mapToScreen(posX, posY, zoom, W, H, wp.X, wp.Y)
dx = imX-W/2 dy = imY-H/2
kaz = az + math.atan(dx,dy)
dist=math.sqrt(dx*dx+dy*dy)
mX=W/2+math.sin(kaz)*dist mY=H/2+math.cos(kaz)*dist --waypoint coordinates on monitor
[hr]
Thank for using