Re: [Flightgear-devel] [PATCH] overflow in Instrumentation/gps.cxx

2009-01-03 Thread James Turner
On 3 Jan 2009, at 18:47, Roy Vegard Ovesen wrote: > "marginally less silly" ;-) > > IMHO this is the most elegant code I've submitted in a lng time, > but if > it's only marginally less silly, then perhaps I don't mind not > getting credit > for it. :-D Heh :) Roy, your code is fine, it

Re: [Flightgear-devel] [PATCH] overflow in Instrumentation/gps.cxx

2009-01-03 Thread Roy Vegard Ovesen
On Saturday 03 January 2009 19:21:08 James Turner wrote: > On 3 Jan 2009, at 18:10, Csaba Halász wrote: > > But you credited it to the wrong person ... > > Ooops, yes. > > Apologies to Roy and Ron for the confusion. > > (I could make a poor excuse about names that start 'Ro-' and end with > '-sen',

Re: [Flightgear-devel] [PATCH] overflow in Instrumentation/gps.cxx

2009-01-03 Thread James Turner
On 3 Jan 2009, at 18:10, Csaba Halász wrote: > But you credited it to the wrong person ... Ooops, yes. Apologies to Roy and Ron for the confusion. (I could make a poor excuse about names that start 'Ro-' and end with '-sen', but I think I'd be laughed at) James ---

Re: [Flightgear-devel] [PATCH] overflow in Instrumentation/gps.cxx

2009-01-03 Thread Csaba Halász
On Sat, Jan 3, 2009 at 2:30 PM, James Turner wrote: > > On 3 Jan 2009, at 13:17, Roy Vegard Ovesen wrote: > >> Please apply this patch to extract the hours minutes and seconds >> without using >> silly while loops. > > Thanks (and I will apply this!) But you credited it to the wrong person ... -

Re: [Flightgear-devel] [PATCH] overflow in Instrumentation/gps.cxx

2009-01-03 Thread James Turner
On 3 Jan 2009, at 13:17, Roy Vegard Ovesen wrote: > Please apply this patch to extract the hours minutes and seconds > without using > silly while loops. Thanks (and I will apply this!), but to re-iterate, I have a re-write of the entire GPS code pending - but I'm holding off committing unti

Re: [Flightgear-devel] [PATCH] overflow in Instrumentation/gps.cxx

2009-01-03 Thread Roy Vegard Ovesen
On Friday 02 January 2009 18:32:58 Csaba Halász wrote: > 0x007e1c50 in GPS::updateTTWNode (this=0xce164c0, > c...@0x7fff664fdee0, distance_m=12822604.584446406, > no...@0x7fff664fddd0) at src/Instrumentation/gps.cxx:483 > 483 unsigned int TTW_seconds = (int) (TTW + 0.5); > (gdb) p T

Re: [Flightgear-devel] [PATCH] overflow in Instrumentation/gps.cxx

2009-01-02 Thread Vivian Meazza
Csaba Halász wrote > 0x007e1c50 in GPS::updateTTWNode (this=0xce164c0, > c...@0x7fff664fdee0, distance_m=12822604.584446406, > no...@0x7fff664fddd0) at src/Instrumentation/gps.cxx:483 > 483 unsigned int TTW_seconds = (int) (TTW + 0.5); > (gdb) p TTW > $10 = 62278235905.950584 > >

Re: [Flightgear-devel] [PATCH] overflow in Instrumentation/gps.cxx

2009-01-02 Thread James Turner
On 2 Jan 2009, at 17:32, Csaba Halász wrote: > > Not sure what it is calculating anyway. This happened with the > hurricane just at startup. > And all the "while" loops look silly too. Not to mention that it > should probably display times up to 99:59:59 so the check at the top > is wrong. I ha

[Flightgear-devel] [PATCH] overflow in Instrumentation/gps.cxx

2009-01-02 Thread Csaba Halász
0x007e1c50 in GPS::updateTTWNode (this=0xce164c0, c...@0x7fff664fdee0, distance_m=12822604.584446406, no...@0x7fff664fddd0) at src/Instrumentation/gps.cxx:483 483 unsigned int TTW_seconds = (int) (TTW + 0.5); (gdb) p TTW $10 = 62278235905.950584 Not sure what it is calculating anyw