From: Michael B. <mic...@gm...> - 2009-01-21 23:54:48
|
> where x and y are of type double. however, since my gps gives me data in > the form of 144 12.345 where the 144 is degrees and the 12.345 is minutes, > how do i create coordinates if the constructor takes doubles? This is how I would do it... double toDecimalDeg(double deg, double min) { int sign = deg < 0 ? -1 : 1; double decDeg = Math.abs(deg) + min / 60; return decDeg * sign; } Michael |