Moved fiddled with PI to avoid compiler warnings.
This commit is contained in:
parent
982a9821d2
commit
a5b71554a2
3 changed files with 14 additions and 6 deletions
|
@ -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 */
|
||||
|
|
|
@ -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
|
||||
|
|
14
Slew/slew.c
14
Slew/slew.c
|
@ -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 = ¤t_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.
|
||||
*
|
||||
|
|
Loading…
Reference in a new issue