]> git.mxchange.org Git - flightgear.git/commitdiff
Moved fiddled with PI to avoid compiler warnings.
authorcurt <curt>
Sat, 19 Jul 1997 22:35:06 +0000 (22:35 +0000)
committercurt <curt>
Sat, 19 Jul 1997 22:35:06 +0000 (22:35 +0000)
LaRCsim/ls_constants.h
Slew/depend
Slew/slew.c

index 3e90aab584337f1fb1a83640c1692f7d7295b910..bdd123d86a90c5877ee814325b47c49e5961e73d 100644 (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 */
index 9df003d84b02aae8152c0b766569afda84c378e3..77fd35e4ea939ef0ae27adeaa9e9a6d345093102 100644 (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
index db258e8117a8611d7b01db151e2eec4455aafa72..f8029e01b81191c58ac4c645713631e75d5e9bc3 100644 (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.
  *