diff --git a/importPicture/src/osm/jp/gpx/ImportPicture.java b/importPicture/src/osm/jp/gpx/ImportPicture.java index b14ad5b..f4d2ea8 100644 --- a/importPicture/src/osm/jp/gpx/ImportPicture.java +++ b/importPicture/src/osm/jp/gpx/ImportPicture.java @@ -592,9 +592,10 @@ Double r = Math.cos(Math.toRadians((imaLAT + maeLAT) * 2)) * R; Double x = Math.toRadians(imaLON - maeLON) * r; Double y = Math.toRadians(imaLAT - maeLAT) * R; - Double rad = Math.tan(a).toDegrees(x / y); + double rad = Math.toDegrees(Math.atan(y / x)); + System.out.println("magvar = " + rad); magvar = ret.getOwnerDocument().createElement("magvar"); - magvar.setTextContent(rad.toString()); + magvar.setTextContent(Double.toString(rad)); ret.appendChild(magvar); } }