[osg-users] Aircraft Simulation Control by MatrixTransform

Robert Osfield robert.osfield at gmail.com
Tue May 6 08:49:14 PDT 2008


Hi Umit,

I'd recommend using the CoordinateSystemNode to get the transform from
ECEF into the local coordinate frame given you X,Y,Z position in ECEF,
you could also use the lat and longs to compute this.  The methods to
get the local transform would be using either the following methods
from EllipsoidModel:

        inline void
computeLocalToWorldTransformFromLatLongHeight(double latitude, double
longitude, double height, osg::Matrixd& localToWorld) const;

        inline void computeLocalToWorldTransformFromXYZ(double X,
double Y, double Z, osg::Matrixd& localToWorld) const;


You get the EllipsoidModel from the CoordinateSystemNode.

Robert.


On Mon, Apr 28, 2008 at 9:56 AM, ümit uzun <cush_umit at hotmail.com> wrote:
>
>  Hi All;
>
>  I am trying to AircraftSimulation project. I have an BlueMarbleEarth database (ECEF). I have these nodes in my program ;
>
>  1 - Earth Model TrasformMatrixNode
>  2 - Aircraft Model PositionMatrixTrasform
>
>  And these two models are child of CoordinateSystemNode which is Ellipsoid Model. In this point I have an Callback which rotates the earth model around it's xyz coordinate system. Actually earth is rotating and aircraft is stopping on the earth at same coordinate on the screen. So we suppose that the aircraft is flying.
>
>  And aircraft could rotated it's xyz coordinate system by fixed keyboard button too.
>
>  I want to rotate earth model by aircraft model PositionMatrixTrasform matrix. I mean when I rotate the aircraft around the z vector (in z up matrix system) this make the earth model rotate around the z vector too but opposite position. So you turn the aircraft left, earth will be rotated to right automatically.
>
>  How can ı do this control?
>
>
>  ÜMİT UZUN
>
>  _________________________________________________________________
>  Aileye katılmanın tam zamanı! Windows Live Messenger'ın 2008 versiyonunu yükleyin! Ücretsiz!
>  http://get.live.com
>  _______________________________________________
>  osg-users mailing list
>  osg-users at lists.openscenegraph.org
>  http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>


More information about the osg-users mailing list