• 大小: 2KB
    文件类型: .rar
    金币: 1
    下载: 0 次
    发布日期: 2021-06-13
  • 语言: Matlab
  • 标签:

资源简介

Bursa_Wolf,布尔莎坐标转换,matlab实例,平差,最小二乘求解,三次拟合 个人整理的,最齐全的Bursa_Wolf,布尔莎坐标转换资料,含matlab实例,平差,最小二乘,三次拟合,精度更高,以及相应的引文资料。请注明引用出处!

资源截图

代码片段和文件信息

%Program to compute parameters of the third order polynomial.
%Xn = c1Xo^3 + c2Yo^3+c3Xo^2Yo+c4XoYo^2+c5Xo^2+c6Yo^2+c7XoYo+c8Xo+c9Yo+c10
%
%Yn = c11Xo^3 +c12Yo^3+c13Xo^2Yo+c14XoYo^2+c15Xo^2+c16Yo^2+c17XoYo+c18Xo+c19Yo+c20
%c1c2c3c4c5c6c7c8c9c10c11c12c13c14c15c16c17c18c19 and c20
% are parameters
%Used 20 points of 32 points to compute the parameters. Other 12 points
%used as check points.
clc
clear
NPoints=20;
format long
%Reading coordinates of 20 control points of 32 points
%Old easting Northing and New Easting Northing
[PI Xo Yo Xn Yn]=textread(‘con20.txt‘‘%s %f %f %f %f‘);
C=zeros(NPoints*220);
%Populating coefficients matrix(old system coordinates)
for i=1:NPoints
C(i*2-11)=Xo(i)^3;
C(i*2-12)=Yo(i)^3;
C(i*2-13)=(Xo(i)^2)*Yo(i);
C(i*2-14)=Xo(i)*(Yo(i)^2);
C(i*2-15)=Xo(i)^2;
C(i*2-16)=Yo(i)^2;
C(i*2-17)=Xo(i)*Yo(i);
C(i*2-18)=Xo(i);
C(i*2-19)=Yo(i);
C(i*2-110)=1;
C(i*211)=Xo(i)^3;
C(i*212)=Yo(i)^3;
C(i*213)=(Xo(i)^2)*Yo(i);
C(i*214)=Xo(i)*(Yo(i)^2);
C(i*215)=Xo(i)^2;
C(i*216)=Yo(i)^2;
C(i*217)=Xo(i)*Yo(i);
C(i*218)=Xo(i);
C(i*219)=Yo(i);
C(i*220)=1;
end
y=zeros(NPoints*21);
%Populating y matrix(new system coordinates).
for i=1:NPoints
y(i*2-11)=Xn(i);
y(i*21)=Yn(i);
end
P=(inv(C‘*C))*(C‘*y);%computing coefficients of the polynomial using least square method.
M=C*P;%computing new coordinates of the used control points using computed parameters.
for i=1:NPoints% computing the residuals of the computed new coordinates of points.
Er(i1)=M(i*2-1)+300000;
Nr(i1)=M(i*2)+300000;
Rx(i1)=Xn(i)-M(i*2-1);
Ry(i1)=Yn(i)-M(i*2);
end
%rounding up the residuals to last millimeter.
Rx1=round((Rx)*1000);
Ry1=round((Ry)*1000);
Rx2=Rx1/1000;
Ry2=Ry1/1000;
% no. of check points = 12.
BPoints=12;
%Reading coordinates of the 12 check points.
%Old easting Northing and New Easting Northing
[pI xo yo xn yn]=textread(‘restcon_12.txt‘‘%s %f %f %f %f‘);
Cb=zeros(BPoints*220);
%Populating coefficient matrix with the check points (old system)coordinates.
for i=1:BPoints
Cb(i*2-11)=xo(i)^3;
Cb(i*2-12)=yo(i)^3;
Cb(i*2-13)=(xo(i)^2)*yo(i);
Cb(i*2-14)=xo(i)*(yo(i)^2);
Cb(i*2-15)=xo(i)^2;
Cb(i*2-16)=yo(i)^2;
Cb(i*2-17)=xo(i)*yo(i);
Cb(i*2-18)=xo(i);
Cb(i*2-19)=yo(i);
Cb(i*2-110)=1;
Cb(i*211)=xo(i)^3;
Cb(i*212)=yo(i)^3;
Cb(i*213)=(xo(i)^2)*yo(i);
Cb(i*214)=xo(i)*(yo(i)^2);
Cb(i*215)=xo(i)^2;
Cb(i*216)=yo(i)^2;
Cb(i*217)=xo(i)*yo(i);
Cb(i*218)=xo(i);
Cb(i*219)=yo(i);
Cb(i*220)=1;
end
L=(Cb*P);%computing coordinates of the new system using computed parameters.
for i=1:BPoints
Ec(i1)=L(i*2-1)+300000;
Nc(i1)=L(i*2)+300000;
Cx(i1)=xn(i)-L(i*2-1);%difference in Easting between issued and computed values in new system.
Cy(i1)=yn(i)-L(i*2);%difference in Northing between issued and computed values in new system.
end
%rounding up the differences( computed value - report value ) to last
%millimeter.
Cx1=round((Cx

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----

     文件       3170  2010-12-15 11:17  Bursa_Wolf_3.m

     文件       1016  2010-12-15 10:29  con20.txt

     文件        610  2010-12-15 10:36  restcon_12.txt

----------- ---------  ---------- -----  ----

                 4796                    3


评论

共有 条评论

相关资源