Skip to content

Commit 34cd6a7

Browse files
committed
add diag
1 parent 2d64628 commit 34cd6a7

5 files changed

Lines changed: 9 additions & 11 deletions

File tree

src/aer.f90

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,6 @@
4646

4747
real(wp) :: x0,y0,z0, e,n,u,dx,dy,dz
4848

49-
5049
!> Origin of the local system in geocentric coordinates.
5150
call geodetic2ecef(lat0, lon0, alt0,x0, y0, z0, spheroid,deg)
5251
!> Convert Local Spherical AER to ENU

src/ecef.f90

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,6 @@
144144
sinLon = sin(lon)
145145
endif
146146

147-
148147
x = (N + alt) * cosLat * cosLon
149148
y = (N + alt) * cosLat * sinLon
150149
z = (N * (ell%SemiminorAxis / ell%SemimajorAxis)**2 + alt) * sinLat

src/enu.f90

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@
124124

125125
!> radians
126126
elev = atan2(u, r)
127-
az = modulo(atan2(e, n), 2._wp * pi)
127+
az = modulo(atan2(e, n), 2 * pi)
128128

129129
d=.true.
130130
if (present(deg)) d = deg

src/maptran.F90

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -165,14 +165,14 @@ end function haversine
165165
elemental real(wp) function degrees(rad)
166166
real(wp), intent(in) :: rad
167167

168-
degrees = 180._wp / pi * rad
168+
degrees = 180 / pi * rad
169169
end function degrees
170170

171171

172172
elemental real(wp) function radians(deg)
173173
real(wp), intent(in) :: deg
174174

175-
radians = pi / 180._wp * deg
175+
radians = pi / 180 * deg
176176
end function radians
177177

178178
end module maptran

src/tests/test_mod.f90

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -416,23 +416,23 @@ subroutine test_aer2ecef(az, el, rng, lat, lon, alt)
416416
real(wp) :: x,y,z
417417

418418
call aer2ecef(az, el, rng, lat, lon, alt, x, y, z)
419-
call assert_allclose([x, y, z], [xl,yl,zl])
419+
call assert_allclose([x, y, z], [xl,yl,zl], err_msg='aer2ecef1')
420420

421421
call aer2ecef(0._wp, -90._wp, 1._wp, 0._wp, 0._wp, -1._wp, x, y, z)
422-
call assert_allclose([x, y, z], [ea-1._wp, 0._wp, 0._wp], atol=1e-6_wp)
422+
call assert_allclose([x, y, z], [ea-1._wp, 0._wp, 0._wp], atol=1e-6_wp, err_msg='aer2ecef2')
423423

424424
call aer2ecef(0._wp, -90._wp, 1._wp, 0._wp, 90._wp, -1._wp, x, y, z)
425-
call assert_allclose([x,y,z],[0._wp, ea-1._wp, 0._wp], atol=1e-6_wp)
425+
call assert_allclose([x,y,z],[0._wp, ea-1._wp, 0._wp], atol=1e-6_wp, err_msg='aer2ecef3')
426426

427427
call aer2ecef(0._wp, -90._wp, 1._wp, 90._wp, 0._wp, -1._wp, x, y, z)
428-
call assert_allclose([x,y,z],[0._wp, 0._wp, eb-1._wp], atol=1e-6_wp)
428+
call assert_allclose([x,y,z],[0._wp, 0._wp, eb-1._wp], atol=1e-6_wp, err_msg='aer2ecef4')
429429

430430
call aer2ecef(0._wp, -90._wp, 1._wp, 0._wp, 90._wp, -1._wp, x, y, z)
431-
call assert_allclose([x,y,z],[0._wp, ea-1._wp, 0._wp], atol=1e-6_wp)
431+
call assert_allclose([x,y,z],[0._wp, ea-1._wp, 0._wp], atol=1e-6_wp, err_msg='aer2ecef5')
432432

433433
call aer2ecef(0._wp, -90._wp, 1._wp, 0._wp, 45._wp, -1._wp, x, y, z)
434434
call assert_allclose([x,y,z], &
435-
[(ea-1._wp)/sqrt(2._wp), (ea-1._wp)/sqrt(2._wp), 0._wp], atol=1e-6_wp)
435+
[(ea-1._wp)/sqrt(2._wp), (ea-1._wp)/sqrt(2._wp), 0._wp], atol=1e-6_wp, err_msg='aer2ecef6')
436436

437437
end subroutine test_aer2ecef
438438

0 commit comments

Comments
 (0)