Пример #1
0
 private int addFrameToList(AS_GUI_data.frame_s frame)
 {
     if (checkFrameId(frame.id) == -1)
     {
         fr_list.Add(frame);
         return 0;
     }
     else
     {
         return -1;
     }
 }
Пример #2
0
 private GMapOverlay addBuoyMarker(AS_GUI_data.buoy_s buoy, GMapOverlay markersOverlay)
 {
     // add markers to overlay
     PointLatLng bx = new PointLatLng(buoy.body.center.lat, buoy.body.center.lon);
     GMarkerGoogle marker = new GMarkerGoogle(bx, GMarkerGoogleType.blue_small);
     markersOverlay.Markers.Add(marker);
     return markersOverlay;
 }
Пример #3
0
        private GMapOverlay addFrameOverlay(AS_GUI_data.frame_s frame, GMapOverlay markersOverlay)
        {
            // add overlay
            gMapControl1.Overlays.Add(markersOverlay);

            foreach (AS_GUI_data.buoy_s buoy in frame.buoys)
            {
                // add buoy markers
                markersOverlay = addBuoyMarker(buoy, markersOverlay);

                // TODO: add polygons to visualize buoy body

            }
            return markersOverlay;
        }
Пример #4
0
 private GMapOverlay addWaypointMarker(AS_GUI_data.waypoint_s wp, GMapOverlay markersOverlay)
 {
     // add markers to overlay
     PointLatLng wpx = new PointLatLng(wp.lat, wp.lon);
     GMarkerGoogle marker = new GMarkerGoogle(wpx, GMarkerGoogleType.yellow_small);
     markersOverlay.Markers.Add(marker);
     return markersOverlay;
 }
Пример #5
0
 private GMapOverlay addObstacleMarker(AS_GUI_data.obstacle_s ob, GMapOverlay markersOverlay)
 {
     // add markers to overlay
     PointLatLng obx = new PointLatLng(ob.center.lat, ob.center.lon);
     GMarkerGoogle marker = new GMarkerGoogle(obx, GMarkerGoogleType.red_small);
     markersOverlay.Markers.Add(marker);
     return markersOverlay;
 }
Пример #6
0
 private TreeNode createFrameTn(AS_GUI_data.frame_s fr)
 {
     TreeNode tn = new TreeNode(fr.name);
     TreeNode sub_tn1 = new TreeNode("ID: " + fr.id.ToString());
     TreeNode sub_tn2 = new TreeNode("Buoys");
     foreach (AS_GUI_data.buoy_s buoy in fr.buoys)
     {
         // create buoy treenodes
         sub_tn2.Nodes.Add(createBuoyTn(buoy));
     }
     tn.Nodes.Add(sub_tn1);
     tn.Nodes.Add(sub_tn2);
     return tn;
 }
Пример #7
0
 private TreeNode createBuoyTn(AS_GUI_data.buoy_s buoy)
 {
     TreeNode tn = new TreeNode(buoy.name);
     TreeNode sub_tn1 = new TreeNode("Latitude: " + buoy.body.center.lat.ToString("F5"));
     tn.Nodes.Add(sub_tn1);
     TreeNode sub_tn2 = new TreeNode("Longitude: " + buoy.body.center.lon.ToString("F5"));
     tn.Nodes.Add(sub_tn2);
     TreeNode sub_tn3 = new TreeNode("Radius: " + buoy.body.rad.ToString("F2"));
     tn.Nodes.Add(sub_tn3);
     TreeNode sub_tn4 = new TreeNode("Rotation: " + buoy.rot.ToString());
     tn.Nodes.Add(sub_tn4);
     return tn;
 }
Пример #8
0
 private TreeNode createObTn(AS_GUI_data.obstacle_s ob)
 {
     TreeNode tn = new TreeNode(ob.name);
     TreeNode sub_tn1 = new TreeNode("Latitude: " + ob.center.lat.ToString("F5"));
     tn.Nodes.Add(sub_tn1);
     TreeNode sub_tn2 = new TreeNode("Longitude: " + ob.center.lon.ToString("F5"));
     tn.Nodes.Add(sub_tn2);
     TreeNode sub_tn3 = new TreeNode("Radius: " + ob.rad.ToString("F2"));
     tn.Nodes.Add(sub_tn3);
     return tn;
 }
Пример #9
0
        /* ---------------------------------------------------
         * ----- PRIVATE FUNCTIONS ( HELPER FUNCTIONS ) ------
         * --------------------------------------------------- */

        private TreeNode createWpTn(AS_GUI_data.waypoint_s wp)
        {
            TreeNode tn = new TreeNode(wp.name);
            TreeNode sub_tn1 = new TreeNode("Latitude: " + wp.lat.ToString("F5"));
            tn.Nodes.Add(sub_tn1);
            TreeNode sub_tn2 = new TreeNode("Longitude: " + wp.lon.ToString("F5"));
            tn.Nodes.Add(sub_tn2);
            return tn;
        }
Пример #10
0
        private void addFrameToControls(AS_GUI_data.frame_s fr)
        {
                
            // add treenode
            tv_dataBrowser.Nodes.Add(createFrameTn(fr));

            // add overlay
            markersOverlay = addFrameOverlay(fr, markersOverlay);
        }