Odd.  With all the CR's removed, I see:

$ patch -p1 <  ~/Downloads/121118_skytraq-leapsec.patch 
patching file reference/skytraq-2.gpx
patching file reference/skytraq-artificial.gpx
patching file reference/skytraq-realdata.gpx
patching file reference/skytraq.gpx
patching file skytraq.c
patch unexpectedly ends in middle of line
Hunk #9 succeeded at 1208 with fuzz 1.

...which is a variation of what I saw without the CRs still there.  I remember looking at skytraq and thinking that file got completely patched, but perhaps it does something goofy like doing them out of order if it has to do a CR conversion on a different thread or something and then aborted with those unpatched.

But after manually adjusting the CRs, the thing applies and testo skytraq runs fine.  So let's not waste any more time chasing this ghost.

Thanx for sticking with it.

RJL


On Sun, Nov 18, 2012 at 2:12 PM, Mathias Adam <m.adam--gpsbabel-code@adamis.de> wrote:
Hi Robert,

just checked out from svn: the patch applies, except for
reference/skytraq-artificial.gpx and reference/skytraq-realdata.gpx

I noticed that those two files have windows style line endings (CR/LF),
the others are unix style (LF only). The patch applies after converting
those files to LF style (I'm on linux/ubuntu).

The testo error you reported suggests that those two files weren't patched
in your tree (timestamps in reference are 2 seconds ahead).

What error do you get when patching skytraq.c?


Mathias.


Am So, 18.11.2012, 20:13 schrieb Robert Lipe:
> Hi, Mathias.
>
> This patch complains about skytraq.c when applying it, but from what I can
> tell, the result looks like it's being applied correctly.
>
> OTOH, I now see failures in 'testo skytraq' with hunks looking like
>
> rjlimac:gpsbabel robertlipe$ ./testo skytraq | less
> rjlimac:gpsbabel robertlipe$
> rjlimac:gpsbabel robertlipe$ svn diff skytraq.c > /tmp/qq
> rjlimac:gpsbabel robertlipe$ vi skytraq.c
> rjlimac:gpsbabel robertlipe$ ./testo skytraq | less
>
> Running testo.d/skytraq.test
> --- /tmp/gpsbabel.17771/skytraq-realdata.gpx    2012-11-18
> 13:10:15.000000000 -0600
> +++ ./reference/skytraq-realdata.gpx    2012-11-18 13:02:05.000000000
> -0600
> @@ -13,1627 +13,1627 @@
>  <trkseg>
>  <trkpt lat="47.547749767" lon="9.679499575">
>    <ele>435.413042</ele>
> -  <time>2009-09-10T05:19:37Z</time>
> +  <time>2009-09-10T05:19:39Z</time>
>    <speed>0.000000</speed>
>    <name>TP0001</name>
>  </trkpt>
>  <trkpt lat="47.547754722" lon="9.679512670">
>    <ele>436.264370</ele>
> -  <time>2009-09-10T05:19:42Z</time>
> +  <time>2009-09-10T05:19:44Z</time>
>    <speed>0.000000</speed>
>    <name>TP0002</name>
>
> and
>
> --- /tmp/gpsbabel.17771/skytraq-artificial.gpx  2012-11-18
> 13:10:15.000000000 -0600
> +++ ./reference/skytraq-artificial.gpx  2012-11-18 13:02:05.000000000
> -0600
> @@ -9,24 +9,24 @@
>  <bounds minlat="-47.547749767" minlon="-170.320500425"
> maxlat="47.547749767" maxlon="170.320500425"/>
>  <wpt lat="47.547749767" lon="9.679499575">
>    <ele>435.413042</ele>
> -  <time>2009-09-10T05:19:37Z</time>
> -  <name>TP0005</name>
> -  <cmt>TP0005</cmt>
> -  <desc>TP0005</desc>
> +  <time>2009-09-10T05:19:39Z</time>
> +  <name>TP0001</name>
> +  <cmt>TP0001</cmt>
> +  <desc>TP0001</desc>
>  </wpt>
>
> ... so something has jumped the rails.
>
> Could you please verify that this patch applies to a clean tree for you?
>
> Your change to gpstime_to_timet solves that problem about as well as we
> can
> hope to.  Thanx for sticking with that.
>
> RJL
>
>
> On Sun, Nov 18, 2012 at 7:02 AM, Mathias Adam <
> m.adam--gpsbabel-code@adamis.de> wrote:
>
>> Hi,
>>
>> this patch finally corrects leap second compensation. Unfortunately the
>> skytraq chipset doesn't log GPS-UTC difference. Now gpstime_to_timet()
>> takes into account when leap seconds were actually introduced. Note that
>> it's hardcoded there thus will have to be updated when new leap seconds
>> are introduced (see comment there).
>>
>> Along come updated reference files:
>> * skytraq.gpx skytraq-2.gpx skytraq-realdata.gpx had been created with
>> wrong offset (13 instead of 15), corrected them using "-x
>> track,move=-2s"
>> * skytraq-artificial.bin: changed some testcases, created new reference
>> .gpx
>>
>> The patch includes some cleanups in ECEF_to_LLA() (cosmetic only,
>> nothing
>> functional).   TODO: Josef Reisinger mentioned some issue with those
>> formulas back in July which isn't sorted out yet (at least I don't know
>> of).
>>
>>
>> Best Regards,
>> Mathias
>>
>> ------------------------------------------------------------------------------
>> Monitor your physical, virtual and cloud infrastructure from a single
>> web console. Get in-depth insight into apps, servers, databases, vmware,
>> SAP, cloud infrastructure, etc. Download 30-day Free Trial.
>> Pricing starts from $795 for 25 servers or applications!
>> http://p.sf.net/sfu/zoho_dev2dev_nov
>> _______________________________________________
>> Gpsbabel-code mailing list  http://www.gpsbabel.org
>> Gpsbabel-code@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/gpsbabel-code
>>
>>
>