Hi Bortel,

The kml writer recomputes the track using track_recompute().  The first point is somewhat arbitrarily rewritten with the initial bearing from lat="0" lon="0" to the first point lat="47.421095000" lon="19.220695000".  The second point is rewritten with the initial bearing from the first point lat="47.421095000" lon="19.220695000" to the second point lat="47.421186000" lon="19.220939000".  You can load your kml file into google earth and see the 61.135933 looks about correct for the bearing.  It isn't an issue for points that are close, but I think a point should have initial bearing to the next point as the coarse instead of the initial bearing from the previous point.

By the way I would like to change the recomputed coarse for the first point so that the arbitrary point lat 0 lon 0 isn't used.  It causes me trouble when I used it to orient a view in a geographic browser.

So I think the coarse data in your input file isn't correct.  The kml writer attempts to fix it for you, while the gpx writer does not.

Best Regards,
Steve





On 11/29/2012 9:41 AM, Bortel László wrote:
Hi All,
 
I think I have found a bug while processing a gpx file like this:
 
bortel@Server:~$ gpsbabel -vS -D 123 -i gpx -f Pos_.gpx  -o gpx -F PosA.gpx -o kml -F PosB.kml -o gpx -F PosC.gpx
GPSBabel Version: 1.4.4
options: module/option=value: gpx/snlen="32" (=default)

options: module/option=value: gpx/snlen="32" (=default)


options: module/option=value: kml/lines="1" (=default)
options: module/option=value: kml/points="1" (=default)
options: module/option=value: kml/line_width="6" (=default)
options: module/option=value: kml/line_color="99ffac59" (=default)
options: module/option=value: kml/floating="0" (=default)
options: module/option=value: kml/extrude="0" (=default)
options: module/option=value: kml/track="0" (=default)
options: module/option=value: kml/trackdata="1" (=default)
options: module/option=value: kml/trackdirection="0" (=default)
options: module/option=value: kml/units="s" (=default)
options: module/option=value: kml/labels="1" (=default)
options: module/option=value: kml/max_position_points="0" (=default)
options: module/option=value: gpx/snlen="32" (=default)

 
I would expect that the content of PosA.gpx and PosC.gpx would be exactly the same, but it is not:
 
bortel@Server:~$ diff PosA.gpx PosC.gpx
23c23
<   <course>16.830626</course>
---
>   <course>61.135933</course>
 
bortel@Server:~$ uname -a
Linux Server 2.6.26-2-686 #1 SMP Wed Feb 10 08:59:21 UTC 2010 i686 GNU/Linux
 
The value of the course field has changed during generating the kml output file. I think the kml conversion should not touch the original data content.
Attached please find the input and output files necessary to reproduce the issue.
Please confirm if it is a bug or just an unexpected "feature" of the kml writer.
 
Thanks,
Laszlo


------------------------------------------------------------------------------
Keep yourself connected to Go Parallel: 
VERIFY Test and improve your parallel project with help from experts 
and peers. http://goparallel.sourceforge.net


_______________________________________________
Gpsbabel-code mailing list  http://www.gpsbabel.org
Gpsbabel-code@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gpsbabel-code