Browse Source

[LDRA] 6S : 부동 소수점 비교 - 날씨 좌표계 비교문 수정

feature/ldra
leehagjoon(이학준) 1 year ago
parent
commit
b448673be1
  1. 5
      src/main/java/com/palnet/biz/api/ctr/cntrl/service/CtrCntrlService.java

5
src/main/java/com/palnet/biz/api/ctr/cntrl/service/CtrCntrlService.java

@ -754,6 +754,7 @@ public class CtrCntrlService {
double OLAT = 38.0; // 기준점 위도(degree) double OLAT = 38.0; // 기준점 위도(degree)
double XO = 43; // 기준점 X좌표(GRID) double XO = 43; // 기준점 X좌표(GRID)
double YO = 136; // 기1준점 Y좌표(GRID) double YO = 136; // 기1준점 Y좌표(GRID)
Double epslion = 0.0;
// //
// LCC DFS 좌표변환 ( code : "TO_GRID"(위경도->좌표, lat_X:위도, lng_Y:경도), "TO_GPS"(좌표->위경도, lat_X:x, lng_Y:y) ) // LCC DFS 좌표변환 ( code : "TO_GRID"(위경도->좌표, lat_X:위도, lng_Y:경도), "TO_GPS"(좌표->위경도, lat_X:x, lng_Y:y) )
@ -800,10 +801,10 @@ public class CtrCntrlService {
double alat = Math.pow((re * sf / ra), (1.0 / sn)); double alat = Math.pow((re * sf / ra), (1.0 / sn));
alat = 2.0 * Math.atan(alat) - Math.PI * 0.5; alat = 2.0 * Math.atan(alat) - Math.PI * 0.5;
if (Math.abs(xn) <= 0.0) { if (Math.abs(xn) <= epslion) {
theta = 0.0; theta = 0.0;
} else { } else {
if (Math.abs(yn) <= 0.0) { if (Math.abs(yn) <= epslion) {
theta = Math.PI * 0.5; theta = Math.PI * 0.5;
if (xn < 0.0) { if (xn < 0.0) {
theta = -theta; theta = -theta;

Loading…
Cancel
Save