1
0
Fork 0

Merge branch 'maint2' into next

This commit is contained in:
Tim Moore 2009-01-04 00:01:46 +01:00
commit 43b300fe46
4 changed files with 21 additions and 6 deletions

View file

@ -17,6 +17,11 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
**************************************************************************/
#ifdef HAVE_CONFIG_H
# include <config.h>
#endif
#include "AIFlightPlan.hxx"
#include <simgear/math/sg_geodesy.hxx>
#include <Airports/runways.hxx>

View file

@ -18,6 +18,11 @@
*
*
**************************************************************************/
#ifdef HAVE_CONFIG_H
# include <config.h>
#endif
#include <fstream>
#include <iostream>
#include "AIFlightPlan.hxx"

View file

@ -17,6 +17,11 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
**************************************************************************/
#ifdef HAVE_CONFIG_H
# include <config.h>
#endif
#include "AIFlightPlan.hxx"
#include <simgear/math/sg_geodesy.hxx>
#include <Airports/runways.hxx>

View file

@ -39,9 +39,9 @@ struct State {
gpos[2] = tmp[2] + pos[2];
}
void posGlobalToLocal(double* gpos, float *lpos) {
lpos[0] = gpos[0] - pos[0];
lpos[1] = gpos[1] - pos[1];
lpos[2] = gpos[2] - pos[2];
lpos[0] = (float)(gpos[0] - pos[0]);
lpos[1] = (float)(gpos[1] - pos[1]);
lpos[2] = (float)(gpos[2] - pos[2]);
Math::vmul33(orient, lpos, lpos);
}
void velLocalToGlobal(float* lvel, float *gvel) {
@ -53,9 +53,9 @@ struct State {
void planeGlobalToLocal(double* gplane, float *lplane) {
// First the normal vector transformed to local coordinates.
lplane[0] = -gplane[0];
lplane[1] = -gplane[1];
lplane[2] = -gplane[2];
lplane[0] = (float)-gplane[0];
lplane[1] = (float)-gplane[1];
lplane[2] = (float)-gplane[2];
Math::vmul33(orient, lplane, lplane);
// Then the distance from the plane to the Aircraft's origin.