[求救] 轉換座標怎麼改都錯!如何推回原本座標

作者: vqoo31 (zora)   2014-05-01 01:01:22
原始給經緯度lon=121,lat=23的格式,可求出相對初始原點的xy值
function [xy] = llh2localxy(llh,ll_org)
[rows, nsta] = size(llh);
% change from decimal degrees to decimal seconds
lat = 3600.0 * llh(1,:);
lon = 3600.0 * llh(2,:);
Lat_Orig = 3600.0 * ll_org(1);
Diff_long = 3600.0 * ll_org(2)*ones(size(lon)) - lon;
xy = zeros(nsta,2);
for i=1:nsta
xy(i,:) = polyconic(lat(i), Diff_long(i), Lat_Orig);
end
% convert units from meter into kilometer and flip x-axis
xy(:,1) = -xy(:,1) / 1000.0;
xy(:,2) = xy(:,2) / 1000.0;
但現在我有xy值,想推回lat跟lon卻都不會改
網路上有考慮xyz三軸的,但多了z不知要怎麼改
求求大大教一下!!

Links booklink

Contact Us: admin [ a t ] ucptt.com