![Phân tích tư tưởng của nhân dân qua đoạn thơ: Những người vợ nhớ chồng… Những cuộc đời đã hóa sông núi ta trong Đất nước của Nguyễn Khoa Điềm](https://timtailieu.net/upload/document/136415/phan-tich-tu-tuong-cua-nhan-dan-qua-doan-tho-039-039-nhung-nguoi-vo-nho-chong-nhung-cuoc-doi-da-hoa-song-nui-ta-039-039-trong-dat-nuoc-cua-nguyen-khoa-136415.jpg)
CODE MÔ PHỎNG HIỂN THỊ MỤC TIÊU RADAR TRÊN MÀN HÌNH PC
Số trang: 51
Loại file: doc
Dung lượng: 479.00 KB
Lượt xem: 8
Lượt tải: 0
Xem trước 0 trang đầu tiên của tài liệu này:
Thông tin tài liệu:
TÀI LIỆU THAM KHẢO CODE MÔ PHỎNG HIỂN THỊ MỤC TIÊU RADAR TRÊN MÀN HÌNH PC using System;using System.Collections;using System.Collections.Generic;using System.Drawing;using System.Drawing.Design;using System.Drawing.Drawing2D;using System.Drawing.Imaging;using System.Drawing.Text;using System.Windows.Forms;using System.Threading;using System.ComponentModel;using System.Windows;
Nội dung trích xuất từ tài liệu:
CODE MÔ PHỎNG HIỂN THỊ MỤC TIÊU RADAR TRÊN MÀN HÌNH PC CODE MÔ PHỎNG HIỂN THỊ MỤC TIÊU RADAR TRÊN MÀN HÌNH PCForm1using System;using System.Collections;using System.Collections.Generic;using System.Drawing;using System.Drawing.Design;using System.Drawing.Drawing2D;using System.Drawing.Imaging;using System.Drawing.Text;using System.Windows.Forms;using System.Threading;using System.ComponentModel;using System.Windows;namespace Radar{ public partial class MainForm : Form { Radar _radar; Coordinate td1 = new Coordinate(1,400, 400, 4000, 1000, abc); Coordinate td2 = new Coordinate(2, 200, 200, 4000, 1000, abc); List qd1 = new List(); System.Windows.Forms.Timer t = new System.Windows.Forms.Timer(); int speed = 400; public static List listTarget = new List(); public static List listTenlua = new List(); public MainForm() { InitializeComponent();// internal item update timer t.Interval = 500; t.Tick += new EventHandler(t_Tick); t.Enabled = true; backgroundWorker1.DoWork+=new System.ComponentModel.DoWorkEventHandler(backgroundWorker1_DoWork);}void backgroundWorker1_DoWork(object sender, DoWorkEventArgs e){ System.Media.SoundPlayer myPlayer = new System.Media.SoundPlayer(); myPlayer.SoundLocation = @c:sound1.wav; myPlayer.Play();}//update vi tri cac May bay trong khoang thoi gian = t.Intervalvoid t_Tick(object sender, EventArgs e){ double max_angle = _radar.maxAngle * 0.0174532925d; if (listTarget.Count == 0) { lvTarget.Items.Clear(); cbTarget.Items.Clear(); cbTarget.Text = ; } else { //lvTarget.Items.Clear(); cbTarget.Items.Clear(); // select which of the three items to update foreach (FlyingItem item in listTarget) { //khoang cach di duoc cua muc tieu trong 1 s double s = item._current.velocity * 1000 / (3600000 * 3);//toa do tuong doi giua diem di va diem den double x = item._to.X - item._current.X; double y = item._to.Y - item._current.Y; double chenhlech_kc = Math.Sqrt(x * x + y * y); double gocngang = Math.Acos(x / chenhlech_kc); //doi sang do. gocngang = gocngang / 0.0174532925d; if (y < 0) { gocngang = 360d - gocngang; } //doi sang radian de tinh sin va cos gocngang *= 0.0174532925d; double z = item._to.Z - item._current.Z; double gocdung = Math.Asin(z / Math.Sqrt(z * z + chenhlech_kc * chenhlech_kc)); //toa do muc tieu sau 1s double z1 = item._current.Z + (s * Math.Sin(gocdung)); double chenhlech_kc1 = (float)(s * Math.Abs(Math.Cos(gocdung))); double x1 = item._current.X + chenhlech_kc1 * Math.Cos(gocngang); double y1 = item._current.Y + chenhlech_kc1 * Math.Sin(gocngang); Coordinate current = new Coordinate(item._current.stt, x1, y1, z1, item._current.velocity,abc); //gan diem nay thanh diem bat dau item._current = current; if (z >= 0) { item._current = current; if (z1 >= item._to.Z) { for (int k = 0; k < item.airline.Count; k++) { Coordinate td = item.airline[k]; if (td1.stt == item._to.stt) item._to = item.airline[k + 1]; else {} } } else { } } else { item._current = current; if (z1 Radar.getAzimuth(current) && _radar._az - 20 < Radar.getAzimuth(current)&& Radar.getRange(current) item._current.Z) {bool Flag = true;for (int j = 0; j < lvTarget.Items.Count; j++){ if (lvTarget.Items[j].Text.Trim() == item.ID.ToString().Trim()) { ListViewItem lvItem = lvTarget.Items[j]; lvItem.Text = item.ID.ToString(); lvItem.SubItems[1].Text = (item._category); lvItem.SubItems[2].Text = (Radar.getAzimuth(item._current).ToString()); int rg = (int)Radar.getRange(item._current); lvItem.SubItems[3].Text = (rg.ToString()); lvItem.SubI ...
Nội dung trích xuất từ tài liệu:
CODE MÔ PHỎNG HIỂN THỊ MỤC TIÊU RADAR TRÊN MÀN HÌNH PC CODE MÔ PHỎNG HIỂN THỊ MỤC TIÊU RADAR TRÊN MÀN HÌNH PCForm1using System;using System.Collections;using System.Collections.Generic;using System.Drawing;using System.Drawing.Design;using System.Drawing.Drawing2D;using System.Drawing.Imaging;using System.Drawing.Text;using System.Windows.Forms;using System.Threading;using System.ComponentModel;using System.Windows;namespace Radar{ public partial class MainForm : Form { Radar _radar; Coordinate td1 = new Coordinate(1,400, 400, 4000, 1000, abc); Coordinate td2 = new Coordinate(2, 200, 200, 4000, 1000, abc); List qd1 = new List(); System.Windows.Forms.Timer t = new System.Windows.Forms.Timer(); int speed = 400; public static List listTarget = new List(); public static List listTenlua = new List(); public MainForm() { InitializeComponent();// internal item update timer t.Interval = 500; t.Tick += new EventHandler(t_Tick); t.Enabled = true; backgroundWorker1.DoWork+=new System.ComponentModel.DoWorkEventHandler(backgroundWorker1_DoWork);}void backgroundWorker1_DoWork(object sender, DoWorkEventArgs e){ System.Media.SoundPlayer myPlayer = new System.Media.SoundPlayer(); myPlayer.SoundLocation = @c:sound1.wav; myPlayer.Play();}//update vi tri cac May bay trong khoang thoi gian = t.Intervalvoid t_Tick(object sender, EventArgs e){ double max_angle = _radar.maxAngle * 0.0174532925d; if (listTarget.Count == 0) { lvTarget.Items.Clear(); cbTarget.Items.Clear(); cbTarget.Text = ; } else { //lvTarget.Items.Clear(); cbTarget.Items.Clear(); // select which of the three items to update foreach (FlyingItem item in listTarget) { //khoang cach di duoc cua muc tieu trong 1 s double s = item._current.velocity * 1000 / (3600000 * 3);//toa do tuong doi giua diem di va diem den double x = item._to.X - item._current.X; double y = item._to.Y - item._current.Y; double chenhlech_kc = Math.Sqrt(x * x + y * y); double gocngang = Math.Acos(x / chenhlech_kc); //doi sang do. gocngang = gocngang / 0.0174532925d; if (y < 0) { gocngang = 360d - gocngang; } //doi sang radian de tinh sin va cos gocngang *= 0.0174532925d; double z = item._to.Z - item._current.Z; double gocdung = Math.Asin(z / Math.Sqrt(z * z + chenhlech_kc * chenhlech_kc)); //toa do muc tieu sau 1s double z1 = item._current.Z + (s * Math.Sin(gocdung)); double chenhlech_kc1 = (float)(s * Math.Abs(Math.Cos(gocdung))); double x1 = item._current.X + chenhlech_kc1 * Math.Cos(gocngang); double y1 = item._current.Y + chenhlech_kc1 * Math.Sin(gocngang); Coordinate current = new Coordinate(item._current.stt, x1, y1, z1, item._current.velocity,abc); //gan diem nay thanh diem bat dau item._current = current; if (z >= 0) { item._current = current; if (z1 >= item._to.Z) { for (int k = 0; k < item.airline.Count; k++) { Coordinate td = item.airline[k]; if (td1.stt == item._to.stt) item._to = item.airline[k + 1]; else {} } } else { } } else { item._current = current; if (z1 Radar.getAzimuth(current) && _radar._az - 20 < Radar.getAzimuth(current)&& Radar.getRange(current) item._current.Z) {bool Flag = true;for (int j = 0; j < lvTarget.Items.Count; j++){ if (lvTarget.Items[j].Text.Trim() == item.ID.ToString().Trim()) { ListViewItem lvItem = lvTarget.Items[j]; lvItem.Text = item.ID.ToString(); lvItem.SubItems[1].Text = (item._category); lvItem.SubItems[2].Text = (Radar.getAzimuth(item._current).ToString()); int rg = (int)Radar.getRange(item._current); lvItem.SubItems[3].Text = (rg.ToString()); lvItem.SubI ...
Tìm kiếm theo từ khóa liên quan:
lập trình máy tính code lập trình màn hình PC code mô phỏng hiển thi trên rada hiển thị mục tiêuTài liệu liên quan:
-
Bài giảng Tin học lớp 11 bài 1: Giới thiệu ngôn ngữ lập trình C#
15 trang 249 0 0 -
15 trang 202 0 0
-
65 trang 176 0 0
-
Bài giảng Công nghệ phần mềm - Chương 2: Quy trình xây dựng phần mềm
36 trang 166 0 0 -
69 trang 159 0 0
-
142 trang 130 0 0
-
3 trang 120 0 0
-
Giáo trình Kỹ thuật vi điều khiển
121 trang 114 0 0 -
Giáo trình cơ sở CAD/CAM trong thiết kế và chế tạo máy_3
20 trang 106 0 0 -
78 trang 103 0 0