第二届“北斗杯”全国青少年科技创新大赛优秀作品
\\
Target_PositionObtained = true; }
4.3.3. 求救者及救援车的位置显示
程序中使用了一张救援现场的卫星地图,用以显示求救者及救援车位置,这需要根据求救者和救援车的经纬度信息,计算出其在地图上的对应位置,并使用矩形框进行指示。
绘制图形的子函数为:
private void DisplayPoint(Latitude ns, Longitude we, Color ColorChosen)
{
Graphics Painter; Pen Drawer;
Rectangle Rect; Int32 EdgeLength; Point CenterPoint; Point LeftTopPoint; Size RectangleSize;
Int32 PictureBoxHeight; Int32 PictureBoxWidth;
Painter = Graphics.FromImage(Map); Drawer = new Pen(ColorChosen, 5);
PictureBoxHeight = pictureBox_Map.Size.Height; PictureBoxWidth = pictureBox_Map.Size.Width;
CenterPoint = new Point((Int16)(PictureBoxWidth * (we.Value - WestBound.Value) / (EastBound.Value - WestBound.Value)),
(Int16)(PictureBoxHeight * (1 - (ns.Value - SouthBound.Value) / (NorthBound.Value - SouthBound.Value))));
EdgeLength = 10;
RectangleSize = new Size(EdgeLength, EdgeLength);
LeftTopPoint = new Point(CenterPoint.X - EdgeLength / 2, CenterPoint.Y - EdgeLength / 2);
Rect = new Rectangle(LeftTopPoint, RectangleSize); Painter.DrawRectangle(Drawer, Rect); pictureBox_Map.Image = (Image)Map; } 5 系统测试 5.1. 求救模块测试
按下求救按钮(如图标注)后,GSM模块成功将GPS获得的坐标等有效信息发送至上位机。上位机显示坐标信息,等待救援人员进一步处理。
中学组一等奖作品
独立测试:
47
第二届“北斗杯”全国青少年科技创新大赛优秀作品
上位机:
中学组一等奖作品
5.2. 车体控制测试 方向控制:
49
第二届“北斗杯”全国青少年科技创新大赛优秀作品
速度控制:
5.3. 无线摄像头 无线距离:50米
无线距离:30米