1
0
Fork 0

Moved fiddled with PI to avoid compiler warnings.

This commit is contained in:
curt 1997-07-19 22:35:06 +00:00
parent 982a9821d2
commit a5b71554a2
3 changed files with 14 additions and 6 deletions

View file

@ -80,6 +80,9 @@
systems of measure) */
/* Value of Pi from ref [3] */
#ifdef PI
# undef PI /* avoid a harmless compiler warning */
#endif
#define PI 3.14159265358979323846264338327950288419716939967511
/* Value of earth radius from [8], ft */

View file

@ -2,4 +2,5 @@ slew.o: slew.c slew.h ../flight.h ../Slew/slew.h \
../LaRCsim/ls_interface.h ../LaRCsim/../flight.h \
../../Aircraft/aircraft.h ../../Aircraft/../Flight/flight.h \
../../Aircraft/../Controls/controls.h \
../../Aircraft/../Controls/../limits.h ../../Controls/controls.h
../../Aircraft/../Controls/../limits.h ../../Controls/controls.h \
../../constants.h

View file

@ -30,6 +30,7 @@
#include "../flight.h"
#include "../../Aircraft/aircraft.h"
#include "../../Controls/controls.h"
#include "../../constants.h"
#ifndef M_PI
@ -76,10 +77,10 @@ void fgSlewUpdate() {
c = &current_aircraft.controls;
/* f->Psi += ( c->aileron / 8 );
if ( f->Psi > PI2 ) {
f->Psi -= PI2;
if ( f->Psi > FG_2PI ) {
f->Psi -= FG_2PI;
} else if ( f->Psi < 0 ) {
f->Psi += PI2;
f->Psi += FG_2PI;
}
f->vel_x = -c->elev;
@ -90,9 +91,12 @@ void fgSlewUpdate() {
/* $Log$
/* Revision 1.4 1997/06/21 17:12:51 curt
/* Capitalized subdirectory names.
/* Revision 1.5 1997/07/19 22:35:06 curt
/* Moved fiddled with PI to avoid compiler warnings.
/*
* Revision 1.4 1997/06/21 17:12:51 curt
* Capitalized subdirectory names.
*
* Revision 1.3 1997/05/29 22:40:00 curt
* Working on incorporating the LaRCsim flight model.
*