Dear George,thank you for your reply. I have downloaded the application you 
suggested me but I did not find what I need.In my scenario I have a simulation 
platform the determines orientation, position and velocities of several 
aircrafts; what I want to do is to send this information to a fgear multiplayer 
server by means of Flight Gear Multiplayer Protocol.
I tried to use (by porting them into C# code) the following code snippets (from 
multiplay.cxx and multiplaymgr.cxx):
// multiplay.cxx -------------------------------------------------------------- 
   // The quaternion rotating from the earth centered frame to the    // 
horizontal local frame    SGQuatf qEc2Hl = SGQuatf::fromLonLatRad((float)lon, 
(float)lat);    // The orientation wrt the horizontal local frame    float 
heading = ifce->get_Psi();    float pitch = ifce->get_Theta();    float roll = 
ifce->get_Phi();    SGQuatf hlOr = SGQuatf::fromYawPitchRoll(heading, pitch, 
roll);    // The orientation of the vehicle wrt the earth centered frame    
motionInfo.orientation = qEc2Hl*hlOr;
// multiplayermgr.cxx 
--------------------------------------------------------------  SGVec3f 
angleAxis;  motionInfo.orientation.getAngleAxis(angleAxis);  for (unsigned i = 
0 ; i < 3; ++i)    PosMsg.orientation[i] = XDR_encode_float (angleAxis(i));


However, using the above code snippets I am not able to get "good" orientation 
values; for instance consider the following values...
lon = 0lat = 0heading = 0pitch = 0roll = 0
from these values I get the following orientation values...
qEc2Hl:X: 0Y: -0,7071068Z: 0W: 0,7071068
hlOr:
X: 0Y: 0Z: 0W: 1

qEc2Hl*hlOr:X: 0Y: 0Z: 0W: 1

AngleAxis[]:X: 0Y: -0,999999965771459Z: 0

Can you help me with this issue?Thank you in advance for your support and 
cooperation.Kind regards
Marco






> Date: Mon, 31 Aug 2009 11:36:03 +1000
> From: george.patter...@gmail.com
> To: flightgear-devel@lists.sourceforge.net
> Subject: Re: [Flightgear-devel] MP Protocol - aircraft orientation
> 
> 2009/8/31 Marco Lecora <lecora_ma...@hotmail.it>:
> > Hi,
> > I need to send from a C# application the position of several aircrafts to a 
> > flight gear multiplayer server.
> > The question is ... how can I get the aircraft orientation values from 
> > position, yaw, pitch and roll?
> > thank you in advance.
> > marco
> >
> 
> Hi Marco,
> 
> 
> You are wanting to use the so-called generic protocol. This allows you
> to log what you wish.
> 
> I found that the link below was very thorough. While I did not run the
> compiled binary (no MS Windows here), the set up instructions  are
> very clear and helpful. (Especially if you are writing your own
> server.)
> 
> http://geoffmclane.com/fg/fgfs-046.htm
> 
> Let us know if you get stuck.
> 
> 
> 
> George
> 
> ------------------------------------------------------------------------------
> Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
> trial. Simplify your report design, integration and deployment - and focus on 
> what you do best, core application coding. Discover what's new with 
> Crystal Reports now.  http://p.sf.net/sfu/bobj-july
> _______________________________________________
> Flightgear-devel mailing list
> Flightgear-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/flightgear-devel

_________________________________________________________________
Gossip, Sport, Notizie... Accendi la Messenger TV!
http://www.messenger.it/messengerTV.aspx
------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
Flightgear-devel mailing list
Flightgear-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/flightgear-devel

Reply via email to