[gme-users] Export to xme cutting off doubles

Peter Volgyesi peter.volgyesi at vanderbilt.edu
Mon Nov 10 12:44:29 CST 2008


Apparently, the XML writer uses the default width/precision with the
'%g' format string. This means, that six significant digits will be
printed, with any trailing zeros truncated.
The format string is hardcoded in the executable. A workaround might
be to use string attributes and handle/interpret the contents of them
by yourself.
Regards,

--
Peter Volgyesi
Research Scientist
Vanderbilt University, ISIS


On Mon, Nov 10, 2008 at 11:48 AM, Simon Görke
<simon.goerke at ils.uni-stuttgart.de> wrote:
> Hello,
>
> if I store a number with a lot of decimal places (e.g. 0.0001220703125) into
> a double-typed attribute, save the GME model to a mga file an reopen it, the
> number is displayed in the attribute panel without any problems (i.e. it is
> successfully stored in the .mga file).
>
> However, if I export this .mga to .xme, the number of decimal places seems
> to be limited. In the example, 0.00012207 is stored in the xme (i.e. 8
> decimal places), the rest is skipped.
> Strange enough, the number of used decimal places does not seem to be
> constant, e.g. 0,000171661376953 is exported as 0,000171661 (9 decimal
> places).
> Is there any remedy to avoid this loss of precision?
>
>
> Mit freundlichen Grüßen / Best Regards
> Simon Görke
>
> _________________________________________
>
> Dipl.-Ing. Simon Görke
> Institut für Luftfahrtsysteme (ILS)
> Universität Stuttgart
> Pfaffenwaldring 27
> 70569 Stuttgart (Vaihingen)
> Tel.: +49 (0)711 685-64715
> Fax: +49 (0)711 685-63591
> Email: simon.goerke at ils.uni-stuttgart.de
> URL: http://www.ils.uni-stuttgart.de
>
>
> _______________________________________________
> gme-users mailing list
> gme-users at list.isis.vanderbilt.edu
> http://list.isis.vanderbilt.edu/mailman/listinfo/gme-users
>


More information about the gme-users mailing list