Fr�d�ric Bouvier writes:
>
>> > diff -r1.29 FGInitialCondition.cpp
>> > 666a667,668
>> > >     if (f3-f1 == 0.0)
>> > >       f3+= 0.000000000001;
>>
>>
>> We have seen this happen before. This does prevent a
>division by zero.
>> However, Tony has mentioned before that f3 should *never* be
>zero. If it
>is,
>> there is something else happening upstream from that point.
>>
>> Jon
>
>Actually, f3 is not zero ! f3 is equal to f1.

CORRECT

FYI

Extending your insight a little
I know have JSBSim running with MingW32
also a snprintf thingie

Cheers

Norman

<502> JSBSim
$ cvs -z3 diff
cvs server: Diffing .
Index: FGInitialCondition.cpp
===================================================================
RCS file:
/var/cvs/FlightGear-0.7/FlightGear/src/FDM/JSBSim/FGInitialCondition.cpp,v
retrieving revision 1.29
diff -r1.29 FGInitialCondition.cpp
661a662,664
>   // NHV
>   if(d0 < FLT_EPSILON)
>         d0 = FLT_EPSILON;
667c670,673
<     x2 = x1-d*d0*f1/(f3-f1);
---
>       double tmp = f3-f1;
>       if( fabs(tmp) < FLT_EPSILON )
>               tmp = FLT_EPSILON;
>     x2 = x1-d*d0*f1/tmp;
Index: FGState.cpp
===================================================================
RCS file: /var/cvs/FlightGear-0.7/FlightGear/src/FDM/JSBSim/FGState.cpp,v
retrieving revision 1.41
diff -r1.41 FGState.cpp
50c50
< #ifdef _MSC_VER
---
> #if defined(_MSC_VER) || defined(__MINGW32__)
Index: FGTrim.cpp
===================================================================
RCS file: /var/cvs/FlightGear-0.7/FlightGear/src/FDM/JSBSim/FGTrim.cpp,v
retrieving revision 1.23
diff -r1.23 FGTrim.cpp
60a61,64
> #if defined(_MSC_VER) || defined(__MINGW32__)
> #define snprintf _snprintf
> #endif
>



_______________________________________________
Flightgear-devel mailing list
[EMAIL PROTECTED]
http://mail.flightgear.org/mailman/listinfo/flightgear-devel

Reply via email to