Why do my UTM WGS84 calculations not match what MATLAB has calculated?
9 ビュー (過去 30 日間)
古いコメントを表示
I have longitude and latitude data and I have converted them to UTM using WGS 84 standards. When I compare these to the UTM values generated from my lat and long they do not match. Default values for my conversion are from
<http://www.cellspark.com/UTM.html>
For example:
test=defaultm('utm');
utmzone=35;
origin=(utmzone-31).*6+3;
test.origin=[0 origin 0];
test=defaultm(test);
[eastutm2,northutm2]=mfwdtran(test,44.3536,28.4981);
%default values taken from manual lat -> UTM conversion
diffnorth2=4912239-northutm2
diffeast2=619393.56-eastutm2
採用された回答
MathWorks Support Team
2013 年 7 月 3 日
This difference occurs because MATLAB’s default reference ellipsoid is "International", not "WGS 84"
Although people often use UTM with WGS 84, UTM was originally specified to work the various ellipsoids in different parts of the world, and the toolbox honors this specification.
The following code is accurate to within a few centimeters.
mUtm=defaultm('utm');
mUtm.zone = '35T';
mUtm.geoid = almanac('earth','wgs84','meters');
mUtm=defaultm(mUtm);
[eastutm2,northutm2]=mfwdtran(mUtm,44.3536,28.4981);
%default values taken from manual lat -> UTM conversion
diffnorth2=4912239-northutm2
diffeast2=619393.56-eastutm2
% Perform inverse mapping to verify lat and lon
[lat, lon] = minvtran(mUtm, eastutm2,northutm2)
Note that starting in MATLAB 7.14 (R2012a), it is recommended to use the wgs84Ellipsoid function instead of almanac . To do so, replace the line containing the almanac function with the following:
mUtm.geoid = wgs84Ellipsoid('meters');
0 件のコメント
その他の回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Universal Transverse Mercator System についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!