Skip to content

Commit 2c953dd

Browse files
committed
test coverage enu2ecefv
1 parent 1fcfd05 commit 2c953dd

1 file changed

Lines changed: 14 additions & 0 deletions

File tree

test/TestUnit.m

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -174,6 +174,7 @@ function test_geodetic2enu(tc)
174174
tc.verifyEqual([lt, ln, at],[tc.lat, tc.lon, tc.alt-1], AbsTol=tc.atol, RelTol=tc.rtol)
175175
end
176176

177+
177178
function test_enu2ecef(tc)
178179

179180
E = matmap3d.wgs84Ellipsoid();
@@ -186,8 +187,21 @@ function test_enu2ecef(tc)
186187

187188
[n1, e1, d] = matmap3d.ecef2ned(x,y,z,tc.lat,tc.lon,tc.alt, E, tc.angleUnit);
188189
tc.verifyEqual([e,n,u],[e1,n1,-d])
190+
189191
end
190192

193+
194+
function test_enu_vector(tc)
195+
uvw = [27.9799, -1.0990, -15.7723];
196+
lat0 = 17.4114;
197+
lon0 = 78.270;
198+
[e,n,u] = matmap3d.ecef2enuv(uvw(1), uvw(2), uvw(3), lat0, lon0);
199+
[u,v,w] = matmap3d.enu2ecefv(e,n,u, lat0, lon0);
200+
tc.verifyEqual([u,v,w], uvw, AbsTol=1e-3)
201+
end
202+
203+
204+
191205
function test_lookAtSpheroid(tc)
192206

193207
az5 = [0., 10., 125.];

0 commit comments

Comments
 (0)