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

From: Don Dietrick <dfdietrick_at_email.domain.hidden>
Date: Wed Nov 10 2010 - 15:19:51 EST

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@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@mtcsc.com
> DCO:    william.brightwell@chat.dco.dod.mil
> Office: 843-856-1935/1985 x51632
> Cell:   843-810-8701
>
>
>

--
[To unsubscribe to this list send an email to "majdart@bbn.com"
with the following text in the BODY of the message "unsubscribe openmap-users"]
Received on Wed Nov 10 15:29:32 2010

This archive was generated by hypermail 2.1.8 : Wed Nov 10 2010 - 15:29:33 EST