1 Jul 2003 10:19
CVS: FlightGear/src/Main fg_props.cxx,1.12,1.13
Erik Hofman <ehofman <at> flightgear.org>
2003-07-01 08:19:45 GMT
2003-07-01 08:19:45 GMT
Update of /var/cvs/FlightGear-0.9/FlightGear/src/Main
In directory baron:/tmp/cvs-serv25188/src/Main
Modified Files:
fg_props.cxx
Log Message:
Fix a problem where the compass goes negative by the variation when close to 360 degrees
Index: fg_props.cxx
===================================================================
RCS file: /var/cvs/FlightGear-0.9/FlightGear/src/Main/fg_props.cxx,v
retrieving revision 1.12
retrieving revision 1.13
diff -C2 -r1.12 -r1.13
*** fg_props.cxx 13 May 2003 19:09:43 -0000 1.12
--- fg_props.cxx 1 Jul 2003 08:19:41 -0000 1.13
***************
*** 379,383 ****
getHeadingMag ()
{
! return current_aircraft.fdm_state->get_Psi() * SGD_RADIANS_TO_DEGREES - getMagVar();
}
--- 379,386 ----
getHeadingMag ()
{
! double magheading;
! magheading = current_aircraft.fdm_state->get_Psi() * SGD_RADIANS_TO_DEGREES - getMagVar();
! if (magheading < 0) magheading += 360;
! return magheading;
(Continue reading)
RSS Feed