[OpenMap Users] Re: MGRS to LL Conversion Bug?

From: Don Dietrick <dfdietrick_at_gmail.com>
Date: Wed, 10 Nov 2010 15:19:51 -0500

Well, -3.977118E-6 is kinda close to zero.

I haven't seen this in particular, but I guess I'm not surprised with
the MGRS string limited to 5 digits of precision (1 meter) on the back
end that it ends up being ever so slightly off of 0.0.

- Don

On Tue, Nov 9, 2010 at 4:18 PM, Brightwell, William
<wbrightwell_at_mtcsc.com> wrote:
> Hey Don,
>
> I am encountering an error regarding converting a LL to MGRS and then back
> to LL.
>
> Here is my code:
>
> LatLonPoint llp = new LatLonPoint(0.0, 0.0);
> MGRSPoint mgrs = new MGRSPoint(llp);
>
> System.out.println("MGRS: " + mgrs.getMGRS());
> System.out.println("Lat: " + mgrs.toLatLonPoint().getLatitude());
>
> System.out.println("Lon: " + mgrs.toLatLonPoint().getLongitude());
>
> The results are the following:
> MGRS: 31NAA6602100000
> Lat: 0.0
> Lon: -3.977118E-6
>
> +++ Expected +++
> MGRS: 31NAA ???????
> Lat: 0.0
> Lon: 0.0
>
> Have you seen this before?  Any suggestions?
>
> Thanks,
> Adam
>
> --
> W. Adam Brightwell
> Software Engineer, MTCSC
> Certified Scrum Master
>
> Email:  wbrightwell_at_mtcsc.com
> DCO:    william.brightwell_at_chat.dco.dod.mil
> Office: 843-856-1935/1985 x51632
> Cell:   843-810-8701
>
>
>

--
[To unsubscribe to this list send an email to "majdart_at_bbn.com"
with the following text in the BODY of the message "unsubscribe openmap-users"]
Received on Wed Nov 10 2010 - 15:21:08 EST

This archive was generated by hypermail 2.3.0 : Tue Mar 28 2017 - 23:25:10 EDT