Xay dung chuong trinh tinh hieu chinh trong luc

96 128 0
Xay dung chuong trinh tinh hieu chinh trong luc

Đang tải... (xem toàn văn)

Tài liệu hạn chế xem trước, để xem đầy đủ mời bạn chọn Tải xuống

Thông tin tài liệu

Tác giả: Đặng Ngọc Danh Công trình đƣợc hoàn thành tại: Trƣờng Đại học Bách Khoa ĐHQGHCM Cán bộ hƣớng dẫn khoa học: TS. Lƣơng Bảo Bình Cán bộ chấm nhận xét 1: PGS.TS. Đào Xuân Lộc Cán bộ chấm nhận xét 2: TS. Đỗ Minh Tuấn Luận văn thạc sĩ đƣợc bảo vệ tại Trƣờng Đại học Bách Khoa, ĐHQG Tp.HCM ngày 16 tháng 08 năm 2018 Thành phần Hội đồng đánh giá luận văn thạc sĩ gồm: 1. PGS.TS. Nguyễn Ngọc Lâu 2. PGS.TS. Đào Xuân Lộc 3. TS. Đỗ Minh Tuấn 4. PGS.TS. Lê Trung Chơn 5. TS. Phan Thị Anh Thƣ Xác nhận của Chủ tịch Hội đồng đánh giá LV và Trƣởng Khoa quản lý chuyên ngành sau khi luận văn đã đƣợc sửa chữa.

ĐẠI HỌC QUỐC GIA TP.HCM TRƢỜNG ĐẠI HỌC BÁCH KHOA oOo - ĐẶNG NGỌC DANH TÊN ĐỀ TÀI: XÂY DỰNG CHƢƠNG TRÌNH TÍNH HIỆU CHỈNH TRỌNG LỰC Chuyên ngành: Kỹ thuật Trắc địa – Bản đồ Mã số: 60520503 LUẬN VĂN THẠC SĨ TP HỒ CHÍ MINH, 01 tháng năm 2018 Cơng trình đƣợc hồn thành tại: Trƣờng Đại học Bách Khoa - ĐHQG-HCM Cán hƣớng dẫn khoa học: TS Lƣơng Bảo Bình Cán chấm nhận xét 1: PGS.TS Đào Xuân Lộc Cán chấm nhận xét 2: TS Đỗ Minh Tuấn Luận văn thạc sĩ đƣợc bảo vệ Trƣờng Đại học Bách Khoa, ĐHQG Tp.HCM ngày 16 tháng 08 năm 2018 Thành phần Hội đồng đánh giá luận văn thạc sĩ gồm: PGS.TS Nguyễn Ngọc Lâu PGS.TS Đào Xuân Lộc TS Đỗ Minh Tuấn PGS.TS Lê Trung Chơn TS Phan Thị Anh Thƣ Xác nhận Chủ tịch Hội đồng đánh giá LV Trƣởng Khoa quản lý chuyên ngành sau luận văn đƣợc sửa chữa CHỦ TỊCH HỘI ĐỒNG TRƢỞNG KHOA ĐẠI HỌC QUỐC GIA TP.HỒ CHÍ MINH CỘNG HỊA XÃ HỘI CHỦ NGHĨA VIỆT NAM TRƢỜNG ĐẠI HỌC BÁCH KHOA Độc Lập – Tự Do – Hạnh Phúc NHIỆM VỤ LUẬN VĂN CAO HỌC Họ tên học viên : Đặng Ngọc Danh MSHV: 1570197 Ngày, tháng, năm sinh : 3/11/1987 Nơi sinh: Bình Thuận Chuyên ngành : Kỹ thuật Trắc địa – Bản đồ Mã số : 60520503 I TÊN ĐỀ TÀI: Xây dựng chƣơng trình tính hiệu chỉnh trọng lực II MỤC TIÊU NGHIÊN CỨU: Tìm hiểu sở lý thuyết trọng lực phƣơng pháp hiệu chỉnh trọng lực Xây dựng quy trình tính tốn hiệu chỉnh trọng lực bao gồm: hiệu chỉnh khoảng không (Free-air reduction), hiệu chỉnh Bouguer (Bouguer reduction), hiệu chỉnh địa hình (Terrain correction), hiệu chỉnh đẳng tĩnh địa hình (Topographic-Isostatic reduction) theo mơ hình Airy-Heiskanen hiệu chỉnh ảnh hƣởng gián tiếp (Indirect effect) Xây dựng chƣơng trình tính tốn xử lý số liệu đo trọng lực viết ngôn ngữ Matlab nhằm hiệu chỉnh trọng lực theo quy trình đƣa III NGÀY GIAO NHIỆM VỤ: 26/02/2018 IV NGÀY HOÀN THÀNH NHIỆM VỤ: 01/08/2018 V CÁN BỘ HƢỚNG DẪN: TS Lƣơng Bảo Bình Tp.HCM, ngày… tháng……năm 2018 CÁN BỘ HƢỚNG DẪN CHỦ NHIỆM BỘ MÔN ĐÀO TẠO TRƢỞNG KHOA LỜI CẢM ƠN Tôi xin gửi lời cảm ơn chân thành đến: - TS Lƣơng Bảo Bình trực tiếp hƣớng dẫn, góp ý giúp đỡ tơi suốt q trình thực luận văn - Các Thầy giảng dạy lớp Cao học Trắc địa - Bản đồ cung cấp cho kiến thức quý báu trình học tập Trƣờng Đại học Bách Khoa Tp.HCM - Ngƣời thân gia đình, bạn bè, đồng nghiệp giúp đỡ, động viên tạo điều kiện cho tơi hồn thành tốt luận văn Tp.HCM, ngày 01 tháng năm 2018 Đặng Ngọc Danh TÓM TẮT Luận văn tìm hiểu lý thuyết trọng lực phƣơng pháp hiệu chỉnh trọng lực bao gồm: hiệu chỉnh khoảng không, hiệu chỉnh Bouguer, hiệu chỉnh địa hình, hiệu chỉnh Prey, hiệu chỉnh đẳng tĩnh theo hai giả thuyết Pratt-Hayford Airy-Heiskanen, hiệu chỉnh ảnh hƣởng gián tiếp, hiệu chỉnh nghịch đảo Rudzki, hiệu chỉnh cô đặc Helmert Vấn đề đặt luận văn ứng dụng lý thuyết hiệu chỉnh trọng lực để tính tốn hiệu chỉnh cho giá trị trọng lực đo bề mặt đất gồm hiệu chỉnh: hiệu chỉnh khoảng không, hiệu chỉnh Bouguer, hiệu chỉnh địa hình, hiệu chỉnh đẳng tĩnh địa hình theo mơ hình Airy-Heiskanen hiệu chỉnh ảnh hƣởng gián tiếp Cuối tác giả xây dựng chƣơng trình tính toán phần mềm Matlab chạy thực nghiệm cho chƣơng trình xây dựng SUMMARY This thesis is to find out about the theory of gravity and gravity reduction methods includes: Free-air reduction, Bouguer reduction, Terrain correction, Prey reduction, Isostatic reduction addcording to two hypotheses of Pratt-Hayford and Airy-Heiskanen, the indirect effect, the inversion reduction of Rudzki, the condensation reduction of Helmert The question of this thesis is using the theory of gravity reduction to correct for the gavity values measured on the surface of the earth includes: Free-air reduction, Bouguer reduction, Terrain correction, Isostatic reduction addcording to hypothesis of Airy-Heiskanen, the indirect effect Finally, the author build up a calculation program by Matlab software and run experiments for program built up LỜI CAM ĐOAN Tôi xin cam đoan đề tài “Xây dựng chương trình tính Hiệu chỉnh trọng lực” TS Lƣơng Bảo Bình hƣớng dẫn cơng trình nghiên cứu riêng tơi Các số liệu, kết luận văn trung thực chƣa đƣợc cơng bố cơng trình khác Tác giả luận văn Đặng Ngọc Danh MỤC LỤC CHƢƠNG 1: MỞ ĐẦU 1.1 Lý chọn đề tài 1.2 Các nghiên cứu liên quan 1.2.1 Tình hình nghiên cứu giới 1.2.2 Tình hình nghiên cứu nƣớc 1.3 Mục tiêu nghiên cứu 1.4 Nội dung nghiên cứu 1.5 Phƣơng pháp nghiên cứu 1.6 Đối tƣợng phạm vi nghiên cứu 1.7 Ý nghĩa khoa học thực tiễn CHƢƠNG 2: CƠ SỞ LÝ THUYẾT VỀ TRỌNG LỰCHIỆU CHỈNH TRỌNG LỰC 2.1 Lực hấp dẫn hấp dẫn 2.2 Trọng lực dị thƣờng trọng lực 10 2.2.1 Trọng lực 10 2.2.2 Dị thƣờng trọng lực 14 2.3 Hiệu chỉnh trọng lực (Gravity Reduction) 16 2.3.1 Các công thức bổ trợ 17 2.3.1.1 P nằm khối trụ 17 2.3.1.2 P nằm mặt khối trụ 19 2.3.1.3 P nằm khối trụ 19 2.3.1.4 Đĩa tròn 20 2.3.1.5 Một phần vành khuyên 20 2.3.2 Hiệu chỉnh khoảng không (Free-air reduction) 21 2.3.3 Hiệu chỉnh Bouguer (Bouguer reduction) 22 2.3.3.1 Đĩa Bouguer 22 2.3.3.2 Hiệu chỉnh địa hình (Terrain correction) 23 2.3.3.3 Phƣơng pháp hợp 24 2.3.4 Các giả thuyết đẳng tĩnh 25 2.3.4.1 Mơ hình đẳng tĩnh theo giả thuyết Pratt - Hayford 25 2.3.4.2 Hệ thống Airy - Heiskanen 27 2.3.5 Hiệu chỉnh đẳng tĩnh địa hình (Topographic-isostatic reductions) 29 2.3.6 Hiệu chỉnh ảnh hƣởng gián tiếp (The indirect effect) 30 2.3.7 Một số hiệu chỉnh tham khảo 32 2.3.7.1 Hiệu chỉnh Prey (Prey reduction) 32 2.3.7.2 Hiệu chỉnh nghịch đảo Rudzki (The inversion reduction of Rudzki) 34 2.3.7.3 Hiệu chỉnh cô đặc Helmert (The condensation reduction of Helmert) 36 CHƢƠNG 3: XÂY DỰNG CHƢƠNG TRÌNH HIỆU CHỈNH TRỌNG LỰC 39 3.1 Khái quát chƣơng trình hiệu chỉnh trọng lực (Gravity Reduction) 39 3.2 Các bƣớc tính tốn chƣơng trình 40 3.2.2 Đối với liệu đầu vào dạng tọa độ vng góc phẳng 40 3.2.3 Đối với liệu đầu vào dạng tọa độ trắc địa 45 3.3 Xây dựng chƣơng trình tính 45 3.3.1 Thiết kế chƣơng trình 45 3.3.2 Tổ chức file liệu 50 3.3.2.1 Dữ liệu file DTM 50 3.3.2.2 Dữ liệu đo trọng lực 51 3.4 Tính tốn thực nghiệm 52 3.4.1 Kết tính tốn chƣơng trình 52 3.4.2 So sánh kết chƣơng trình với phần mềm Excel 58 CHƢƠNG 4: KẾT LUẬN 62 4.1 Các vấn đề đạt đƣợc 62 4.2 Khó khăn hạn chế 62 4.2.1 Khó khăn 62 4.2.2 Hạn chế 63 4.3 Hƣớng phát triển đề tài 63 CÁC TÀI LIỆU THAM KHẢO 64 LÝ LỊCH TRÍCH NGANG 65 PHỤ LỤC 66 LUẬN VĂN TỐT NGHIỆP THẠC SĨ HVTH: ĐẶNG NGỌC DANH CD(j,i)=sqrt((XT(i)-XD(j))^2+((YT(i)-YD(j))^2)); end end %Sap xep gia tri chieu dai tu lon den be CD=sort(CD); %Tim diem gan nhat for i=1:4*n*n*k for j=1:r if sqrt((XT(i)-XD(j))^2+((YT(i)-YD(j))^2))==CD(1,i); GN1(i,:)=[XD(j) YD(j) H(j)]; % Diem thu end if sqrt((XT(i)-XD(j))^2+((YT(i)-YD(j))^2))==CD(2,i); GN2(i,:)=[XD(j) YD(j) H(j)]; % Diem thu end if sqrt((XT(i)-XD(j))^2+((YT(i)-YD(j))^2))==CD(3,i); GN3(i,:)=[XD(j) YD(j) H(j)]; % Diem thu end end end % Tinh cao %Do cao noi suy cua tat ca cac diem tam for i=1:4*n*n*k % =size(XT,1) ht(i,1)=(GN1(i,3)*(1/CD(1,i))+GN2(i,3)*(1/CD(2,i))+GN3(i,3)*(1/CD(3,i)))/ (1/CD(1,i)+1/CD(2,i)+1/CD(3,i)); end % % Hieu chinh dia hinh At for i=1:k for j=1:4*n*n HH_gach(j,i)=abs(HHt(j,i)-Hp(i)); DD1(j,i)=sqrt(((XXt(j,i)-XP(i))^2+(YYt(j,i)-YP(i))^2)+((HHt(j,i)Hp(i))/2)^2); % Tinh hieu chinh dia hinh cho moi don vi khoi luong Delta m dAAt(j,i)=(G*ro0*(10^5)*((p*10^3)^2)*(HH_gach(j,i))^2)/(2*(DD1(j,i)^3)); end end % Tinh hieu chinh dia hinh AAt=sum(dAAt); % % Hieu chinh lop bu tru Ac % Tinh khoang cach tu diem luc den tam cac ROOT T=30000; t=4.45*HHt; % % Hieu chinh lop bu tru Ac for i=1:k for j=1:4*n*n % Tinh khoang cach tu diem luc den tam cac ROOT DD2(j,i)=sqrt(((XXt(j,i)-XP(i))^2+(YYt(j,i)YP(i))^2)+(HHt(j,i)+T+(t(j,i))/2)^2); % Tinh anh huong cua phan bu tru cho moi don vi KL Delta m dAAc(j,i)=((G*dro*((p*10^3)^2)*t(j,i)*(Hp(i)+T+(t(j,i))/2))*10^5)/(DD2(j, i)^3); end Trang 69 LUẬN VĂN TỐT NGHIỆP THẠC SĨ HVTH: ĐẶNG NGỌC DANH end AAc=sum(dAAc); % Ban kinh tinh toan bk=n*p*10^3; % (m) % % Anh huong gian tiep for i=1:k for j=1:4*n*n % Tinh UT (m2/s2) dung U0 dUUt(j,i)=pi*G*ro0*((HHt(j,i)^2)+HHt(j,i)*sqrt(bk^2+HHt(j,i)^2)+(bk^2)*log((HHt(j,i)+sqrt(bk^ 2+HHt(j,i)^2))/bk)); % Tinh Uc dung Ue dUUc(j,i)=pi*G*dro*(T^2-((t(j,i)+T)^2)T*sqrt(bk^2+T^2)+(t(j,i)+T)*sqrt(bk^2+(t(j,i)+T)^2)(bk^2)*log(+T+sqrt(bk^2+(+T)^2))+(bk^2)*log(t(j,i)+T+sqrt(bk^2+(t(j,i)+T) ^2))); end end UUt=sum(dUUt); UUc=sum(dUUc); % % Cac hieu chinh F=0.3086*Hp; Ab=0.1119*Hp; At=transpose(AAt); Ac=transpose(AAc); DELTA_N=(UUt'-UUc')./(y*10^-5); DELTA=+0.3086*DELTA_N; % (mgal) % % Cac di thuong % Di thuong khoang khong g0=g+F; delta_gF=g0-y; % Di thuong Bouguer don gian gB_dg=g-Ab+F; delta_gB_dg=gB_dg-y; % Di thuong Bouguer hoan chinh gB_hc=g-Ab+At+F; delta_gB_hc=gB_hc-y; % Di thuong Dang tinh dia hinh AT=Ab-At; gti=g-AT+Ac+F; delta_gti=gti-y; delta_gc=g-AT+Ac+F+DELTA-y; kq=1; if AH1==0 for i=1:k F(i)=0;delta_gF(i)=0; end end if AH2==0 for i=1:k Ab(i)=0;delta_gB_dg(i)=0; Trang 70 LUẬN VĂN TỐT NGHIỆP THẠC SĨ HVTH: ĐẶNG NGỌC DANH end end if AH3==0 for i=1:k At(i)=0;delta_gB_hc(i)=0; end end if AH4==0 for i=1:k Ac(i)=0;delta_gti(i)=0; end end if AH5==0 for i=1:k DELTA(i)=0;delta_gc(i)=0; end end end % Goi ham xuat ket qua anh huong if TD1==1 && kq==1 ketquatheo_XY(k,Xp,Yp,F,delta_gF,Ab,delta_gB_dg,At,delta_gB_hc,Ac,delta_g ti,DELTA,delta_gc) end if TD2==1 && kq==1 ketquatheo_BL(k,Xp,Yp,F,delta_gF,Ab,delta_gB_dg,At,delta_gB_hc,Ac,delta_g ti,DELTA,delta_gc) end % % ket thuc tinh toan va mo file msgbox('File Results.txt was saved in the current folder.','Information') GravityReduction.m function varargout = GravityReduction(varargin) % GravityReduction MATLAB code for GravityReduction.fig % GravityReduction, by itself, creates a new GravityReduction or raises the existing % singleton* % % H = GravityReduction returns the handle to a new GravityReduction or the handle to % the existing singleton* % % GravityReduction('CALLBACK',hObject,eventData,handles, ) calls the local % function named CALLBACK in GravityReduction.M with the given input arguments % % GravityReduction('Property','Value', ) creates a new GravityReduction or raises the % existing singleton* Starting from the left, property value pairs are Trang 71 LUẬN VĂN TỐT NGHIỆP THẠC SĨ HVTH: ĐẶNG NGỌC DANH % applied to the GUI before GravityReduction_OpeningFcn gets called An % unrecognized property name or invalid value makes property application % stop All inputs are passed to GravityReduction_OpeningFcn via varargin % % *See GUI Options on GUIDE's Tools menu Choose "GUI allows only one % instance to run (singleton)" % % See also: GUIDE, GUIDATA, GUIHANDLES % Edit the above text to modify the response to help GravityReduction % Last Modified by GUIDE v2.5 26-Jul-2018 09:51:41 % Begin initialization code - DO NOT EDIT gui_Singleton = 1; gui_State = struct('gui_Name', mfilename, 'gui_Singleton', gui_Singleton, 'gui_OpeningFcn', @GravityReduction_OpeningFcn, 'gui_OutputFcn', @GravityReduction_OutputFcn, 'gui_LayoutFcn', [] , 'gui_Callback', []); if nargin && ischar(varargin{1}) gui_State.gui_Callback = str2func(varargin{1}); end if nargout [varargout{1:nargout}] = gui_mainfcn(gui_State, varargin{:}); else gui_mainfcn(gui_State, varargin{:}); end % End initialization code - DO NOT EDIT % - Executes just before GravityReduction is made visible function GravityReduction_OpeningFcn(hObject, eventdata, handles, varargin) % This function has no output args, see OutputFcn % hObject handle to figure % eventdata reserved - to be defined in a future version of MATLAB % handles structure with handles and user data (see GUIDATA) % varargin command line arguments to GravityReduction (see VARARGIN) % Choose default handles.output = % Update handles guidata(hObject, command line output for GravityReduction hObject; structure handles); Trang 72 LUẬN VĂN TỐT NGHIỆP THẠC SĨ HVTH: ĐẶNG NGỌC DANH % UIWAIT makes GravityReduction wait for user response (see UIRESUME) % uiwait(handles.figure1); % - Outputs from this function are returned to the command line function varargout = GravityReduction_OutputFcn(hObject, eventdata, handles) % varargout cell array for returning output args (see VARARGOUT); % hObject handle to figure % eventdata reserved - to be defined in a future version of MATLAB % handles structure with handles and user data (see GUIDATA) % Get default command line output from handles structure varargout{1} = handles.output; % - Executes on selection change in popupmenu1 function popupmenu1_Callback(hObject, eventdata, handles) % hObject handle to popupmenu1 (see GCBO) % eventdata reserved - to be defined in a future version of MATLAB % handles structure with handles and user data (see GUIDATA) % Hints: contents = cellstr(get(hObject,'String')) returns popupmenu1 contents as cell array % contents{get(hObject,'Value')} returns selected item from popupmenu1 % - Executes during object creation, after setting all properties function popupmenu1_CreateFcn(hObject, eventdata, handles) % hObject handle to popupmenu1 (see GCBO) % eventdata reserved - to be defined in a future version of MATLAB % handles empty - handles not created until after all CreateFcns called % Hint: popupmenu controls usually have a white background on Windows % See ISPC and COMPUTER if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor')) set(hObject,'BackgroundColor','white'); end function duongdan1_Callback(hObject, eventdata, handles) % hObject handle to duongdan1 (see GCBO) % eventdata reserved - to be defined in a future version of MATLAB % handles structure with handles and user data (see GUIDATA) % Hints: get(hObject,'String') returns contents of duongdan1 as text % str2double(get(hObject,'String')) returns contents of duongdan1 as a double % - Executes during object creation, after setting all properties Trang 73 LUẬN VĂN TỐT NGHIỆP THẠC SĨ HVTH: ĐẶNG NGỌC DANH function duongdan1_CreateFcn(hObject, eventdata, handles) % hObject handle to duongdan1 (see GCBO) % eventdata reserved - to be defined in a future version of MATLAB % handles empty - handles not created until after all CreateFcns called % Hint: edit controls usually have a white background on Windows % See ISPC and COMPUTER if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor')) set(hObject,'BackgroundColor','white'); end % - Executes on button press in Chon_1 function Chon_1_Callback(hObject, eventdata, handles) % hObject handle to Chon_1 (see GCBO) % eventdata reserved - to be defined in a future version of MATLAB % handles structure with handles and user data (see GUIDATA) [ten DD]=uigetfile('*.txt','Select File'); if isequal (ten,0) || isequal(DD,0) disp('User pressed cancel') else full=strcat(DD,ten); disp(['User selected ',full]) set(handles.duongdan1,'string',full); A=textread(full); end % - Executes on button press in Chon_2 function Chon_2_Callback(hObject, eventdata, handles) % hObject handle to Chon_2 (see GCBO) % eventdata reserved - to be defined in a future version of MATLAB % handles structure with handles and user data (see GUIDATA) [ten DD]=uigetfile('*.txt','Select File'); if isequal (ten,0) || isequal(DD,0) disp('User pressed cancel') else full=strcat(DD,ten); disp(['User selected ',full]) set(handles.duongdan2,'string',full); B=textread(full); end % - Executes on button press in Tinhtoan function Tinhtoan_Callback(hObject, eventdata, handles) % hObject handle to Tinhtoan (see GCBO) % eventdata reserved - to be defined in a future version of MATLAB % handles structure with handles and user data (see GUIDATA) % ssss=str2num(get(handles.duongdan1,'string')); Trang 74 LUẬN VĂN TỐT NGHIỆP THẠC SĨ HVTH: ĐẶNG NGỌC DANH global A B % Goi ham tinh cacloai_hieuchinh_va_dithuong % - Executes on button press in chk_AH1 function chk_AH1_Callback(hObject, eventdata, handles) % hObject handle to chk_AH1 (see GCBO) % eventdata reserved - to be defined in a future version of MATLAB % handles structure with handles and user data (see GUIDATA) % Hint: get(hObject,'Value') returns toggle state of chk_AH1 % - Executes on button press in chk_AH2 function chk_AH2_Callback(hObject, eventdata, handles) % hObject handle to chk_AH2 (see GCBO) % eventdata reserved - to be defined in a future version of MATLAB % handles structure with handles and user data (see GUIDATA) % Hint: get(hObject,'Value') returns toggle state of chk_AH2 % - Executes on button press in chk_AH3 function chk_AH3_Callback(hObject, eventdata, handles) % hObject handle to chk_AH3 (see GCBO) % eventdata reserved - to be defined in a future version of MATLAB % handles structure with handles and user data (see GUIDATA) % Hint: get(hObject,'Value') returns toggle state of chk_AH3 % - Executes on button press in chk_AH4 function chk_AH4_Callback(hObject, eventdata, handles) % hObject handle to chk_AH4 (see GCBO) % eventdata reserved - to be defined in a future version of MATLAB % handles structure with handles and user data (see GUIDATA) % Hint: get(hObject,'Value') returns toggle state of chk_AH4 % - Executes on button press in chk_AH5 function chk_AH5_Callback(hObject, eventdata, handles) % hObject handle to chk_AH5 (see GCBO) % eventdata reserved - to be defined in a future version of MATLAB % handles structure with handles and user data (see GUIDATA) % Hint: get(hObject,'Value') returns toggle state of chk_AH5 function duongdan2_Callback(hObject, eventdata, handles) % hObject handle to duongdan2 (see GCBO) % eventdata reserved - to be defined in a future version of MATLAB % handles structure with handles and user data (see GUIDATA) Trang 75 LUẬN VĂN TỐT NGHIỆP THẠC SĨ HVTH: ĐẶNG NGỌC DANH % Hints: get(hObject,'String') returns contents of duongdan2 as text % str2double(get(hObject,'String')) returns contents of duongdan2 as a double % - Executes during object creation, after setting all properties function duongdan2_CreateFcn(hObject, eventdata, handles) % hObject handle to duongdan2 (see GCBO) % eventdata reserved - to be defined in a future version of MATLAB % handles empty - handles not created until after all CreateFcns called % Hint: edit controls usually have a white background on Windows % See ISPC and COMPUTER if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor')) set(hObject,'BackgroundColor','white'); end % - Executes during object deletion, before destroying properties function duongdan2_DeleteFcn(hObject, eventdata, handles) % hObject handle to duongdan2 (see GCBO) % eventdata reserved - to be defined in a future version of MATLAB % handles structure with handles and user data (see GUIDATA) % - Executes during object creation, after setting all properties function Chon_1_CreateFcn(hObject, eventdata, handles) % hObject handle to Chon_1 (see GCBO) % eventdata reserved - to be defined in a future version of MATLAB % handles empty - handles not created until after all CreateFcns called function canh_Callback(hObject, eventdata, handles) % hObject handle to canh (see GCBO) % eventdata reserved - to be defined in a future version of MATLAB % handles structure with handles and user data (see GUIDATA) % Hints: get(hObject,'String') returns contents of canh as text % str2double(get(hObject,'String')) returns contents of canh as a double % - Executes during object creation, after setting all properties function canh_CreateFcn(hObject, eventdata, handles) % hObject handle to canh (see GCBO) % eventdata reserved - to be defined in a future version of MATLAB % handles empty - handles not created until after all CreateFcns called % Hint: edit controls usually have a white background on Windows % See ISPC and COMPUTER Trang 76 LUẬN VĂN TỐT NGHIỆP THẠC SĨ HVTH: ĐẶNG NGỌC DANH if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor')) set(hObject,'BackgroundColor','white'); end function bankinh_Callback(hObject, eventdata, handles) % hObject handle to bankinh (see GCBO) % eventdata reserved - to be defined in a future version of MATLAB % handles structure with handles and user data (see GUIDATA) % Hints: get(hObject,'String') returns contents of bankinh as text % str2double(get(hObject,'String')) returns contents of bankinh as a double % - Executes during object creation, after setting all properties function bankinh_CreateFcn(hObject, eventdata, handles) % hObject handle to bankinh (see GCBO) % eventdata reserved - to be defined in a future version of MATLAB % handles empty - handles not created until after all CreateFcns called % Hint: edit controls usually have a white background on Windows % See ISPC and COMPUTER if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor')) set(hObject,'BackgroundColor','white'); end % - Executes on button press in Close function Close_Callback(hObject, eventdata, handles) % hObject handle to Close (see GCBO) % eventdata reserved - to be defined in a future version of MATLAB % handles structure with handles and user data (see GUIDATA) ar=questdlg('Do you want exit the program?','Exit!','Yes','No','Yes'); if strcmp(ar,'Yes') close; end % - Executes on button press in graphic function graphic_Callback(hObject, eventdata, handles) % hObject handle to graphic (see GCBO) % eventdata reserved - to be defined in a future version of MATLAB % handles structure with handles and user data (see GUIDATA)z Graphic.m function varargout = Graphic(varargin) % GRAPHIC MATLAB code for Graphic.fig % GRAPHIC, by itself, creates a new GRAPHIC or raises the existing % singleton* % Trang 77 LUẬN VĂN TỐT NGHIỆP THẠC SĨ HVTH: ĐẶNG NGỌC DANH % H = GRAPHIC returns the handle to a new GRAPHIC or the handle to % the existing singleton* % % GRAPHIC('CALLBACK',hObject,eventData,handles, ) calls the local % function named CALLBACK in GRAPHIC.M with the given input arguments % % GRAPHIC('Property','Value', ) creates a new GRAPHIC or raises the % existing singleton* Starting from the left, property value pairs are % applied to the GUI before Graphic_OpeningFcn gets called An % unrecognized property name or invalid value makes property application % stop All inputs are passed to Graphic_OpeningFcn via varargin % % *See GUI Options rdt_gra GUIDE's Tools menu Choose "GUI allows only one % instance to run (singleton)" % % See also: GUIDE, GUIDATA, GUIHANDLES % Edit the above text to modify the response to help Graphic % Last Modified by GUIDE v2.5 30-Jul-2018 08:24:41 % Begin initialization code - DO NOT EDIT gui_Singleton = 1; gui_State = struct('gui_Name', mfilename, 'gui_Singleton', gui_Singleton, 'gui_OpeningFcn', @Graphic_OpeningFcn, 'gui_OutputFcn', @Graphic_OutputFcn, 'gui_LayoutFcn', [] , 'gui_Callback', []); if nargin && ischar(varargin{1}) gui_State.gui_Callback = str2func(varargin{1}); end if nargout [varargout{1:nargout}] = gui_mainfcn(gui_State, varargin{:}); else gui_mainfcn(gui_State, varargin{:}); end % End initialization code - DO NOT EDIT % - Executes during object creation, after setting all properties function axes2_CreateFcn(hObject, eventdata, handles) % hObject handle to axes2 (see GCBO) % eventdata reserved - to be defined in a future version of MATLAB Trang 78 LUẬN VĂN TỐT NGHIỆP THẠC SĨ % handles called HVTH: ĐẶNG NGỌC DANH empty - handles not created until after all CreateFcns % Hint: place code in OpeningFcn to populate axes2 % - Executes just before Graphic is made visible function Graphic_OpeningFcn(hObject, eventdata, handles, varargin) % This function has no output args, see OutputFcn % hObject handle to figure % eventdata reserved - to be defined in a future version of MATLAB % handles structure with handles and user data (see GUIDATA) % varargin command line arguments to Graphic (see VARARGIN) % Choose default command line output for Graphic handles.output = hObject; % Update handles structure guidata(hObject, handles); % UIWAIT makes Graphic wait for user response (see UIRESUME) % uiwait(handles.figure1); % - Outputs from this function are returned to the command line function varargout = Graphic_OutputFcn(hObject, eventdata, handles) % varargout cell array for returning output args (see VARARGOUT); % hObject handle to figure % eventdata reserved - to be defined in a future version of MATLAB % handles structure with handles and user data (see GUIDATA) % Get default command line output from handles structure varargout{1} = handles.output; % - Executes rdt_gra button press in rdt_1 function rdt_1_Callback(hObject, eventdata, handles) % hObject handle to rdt_1 (see GCBO) % eventdata reserved - to be defined in a future version of MATLAB % handles structure with handles and user data (see GUIDATA) % Hint: get(hObject,'Value') returns toggle state of rdt_1 % - Executes rdt_gra button press in rdt_2 function rdt_2_Callback(hObject, eventdata, handles) % hObject handle to rdt_2 (see GCBO) % eventdata reserved - to be defined in a future version of MATLAB % handles structure with handles and user data (see GUIDATA) % Hint: get(hObject,'Value') returns toggle state of rdt_2 % - Executes rdt_gra button press in rdt_3 Trang 79 LUẬN VĂN TỐT NGHIỆP THẠC SĨ HVTH: ĐẶNG NGỌC DANH function rdt_3_Callback(hObject, eventdata, handles) % hObject handle to rdt_3 (see GCBO) % eventdata reserved - to be defined in a future version of MATLAB % handles structure with handles and user data (see GUIDATA) % Hint: get(hObject,'Value') returns toggle state of rdt_3 % - Executes rdt_gra button press in checkbox4 function checkbox4_Callback(hObject, eventdata, handles) % hObject handle to checkbox4 (see GCBO) % eventdata reserved - to be defined in a future version of MATLAB % handles structure with handles and user data (see GUIDATA) % Hint: get(hObject,'Value') returns toggle state of checkbox4 % - Executes on button press in chk_GRID function chk_GRID_Callback(hObject, eventdata, handles) % hObject handle to chk_GRID (see GCBO) % eventdata reserved - to be defined in a future version of MATLAB % handles structure with handles and user data (see GUIDATA) %Lay gia tri check box % Hint: get(hObject,'Value') returns toggle state of chk_GRID % - Executes on button press in chk_TEN function chk_TEN_Callback(hObject, eventdata, handles) % hObject handle to chk_TEN (see GCBO) % eventdata reserved - to be defined in a future version of MATLAB % handles structure with handles and user data (see GUIDATA) % Hint: get(hObject,'Value') returns toggle state of chk_TEN % - Executes rdt_gra button press in close function close_Callback(hObject, eventdata, handles) % hObject handle to close (see GCBO) % eventdata reserved - to be defined in a future version of MATLAB % handles structure with handles and user data (see GUIDATA) close % - Executes rdt_gra button press in Done function Done_Callback(hObject, eventdata, handles) % hObject handle to Done (see GCBO) % eventdata reserved - to be defined in a future version of MATLAB % handles structure with handles and user data (see GUIDATA) global A B LC1 LC2 [k,l,Xp,Yp,Hp,g]=docfile_trongluc(A); [r,s,X,Y,H]=docfile_DTM(B); RDT1=get(handles.rdt_1, 'value'); RDT2=get(handles.rdt_2, 'value'); Trang 80 LUẬN VĂN TỐT NGHIỆP THẠC SĨ HVTH: ĐẶNG NGỌC DANH RDT3=get(handles.rdt_3, 'value'); GRAD3D=get(handles.GRA3D, 'value'); DTM3D=get(handles.DTM3D, 'value'); GRID=get(handles.chk_GRID, 'value'); TEN=get(handles.chk_TEN, 'value'); TEN_GRA=[1:k]'; TEN_DTM=[1:r]'; % Chon he toa if LC1==1 XP=Xp;YP=Yp;XD=X;YD=Y; end if LC2==1 [Xp_X,Yp_Y]=BL2XY(A); [X_X,Y_Y]=BL2XY(B); XP=lamtronso(Xp_X,4); YP=lamtronso(Yp_Y,4); XD=lamtronso(X_X,4); YD=lamtronso(Y_Y,4); end % Xac dinh tong so diem luc nam ngoai khu vuc tinh Dn=[]; for i=1:k if XP(i)>max(XD) || YP(i)>max(YD) || XP(i)

Ngày đăng: 09/12/2018, 11:29

Từ khóa liên quan

Tài liệu cùng người dùng

Tài liệu liên quan