From d71a5418377157890e2523cf167b4da664891ca9 Mon Sep 17 00:00:00 2001
From: andy <andy>
Date: Thu, 1 Dec 2005 21:06:25 +0000
Subject: [PATCH] Swap signs of the twist and incidence values to match the
 documentation and author expectations.  Positive just wants to mean "up", no
 matter what the axis conventions have to say.

---
 src/FDM/YASim/FGFDM.cpp | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/src/FDM/YASim/FGFDM.cpp b/src/FDM/YASim/FGFDM.cpp
index 3bf8c8079..9fdbecd61 100644
--- a/src/FDM/YASim/FGFDM.cpp
+++ b/src/FDM/YASim/FGFDM.cpp
@@ -583,8 +583,12 @@ Wing* FGFDM::parseWing(XMLAttributes* a, const char* type)
     w->setTaper(attrf(a, "taper", 1));
     w->setDihedral(attrf(a, "dihedral", defDihed) * DEG2RAD);
     w->setCamber(attrf(a, "camber", 0));
-    w->setIncidence(attrf(a, "incidence", 0) * DEG2RAD);
-    w->setTwist(attrf(a, "twist", 0) * DEG2RAD);
+
+    // These come in with positive indicating positive AoA, but the
+    // internals expect a rotation about the left-pointing Y axis, so
+    // invert the sign.
+    w->setIncidence(attrf(a, "incidence", 0) * DEG2RAD * -1);
+    w->setTwist(attrf(a, "twist", 0) * DEG2RAD * -1);
 
     // The 70% is a magic number that sorta kinda seems to match known
     // throttle settings to approach speed.