Board index FlightGear Support Multiplayer

HLA FOM Orientation

Trouble getting online, setting up a server?
Forum rules
In order to help you, we need to know a lot of information. Make sure to include answers to at least the following questions in your initial post.

- what OS (Windows Xp/Vista, Mac etc.) are you running?
- what FlightGear version do you use?
- copy&paste your commandline.

Please, also see Requesting Technical Help.

Note: If you did not get a reponse, even after 7 days, you may want to check out the FlightGear mailing lists to ask your question there.

HLA FOM Orientation

Postby Luckix » Mon Mar 21, 2016 1:09 pm

Hi all

I really don't know where to post that, sorry if it's totally off topic here..

I use the HLA to exchange between my FG and other simulations, and the FOM contains these lines :

Code: Select all
<arrayData
          name="SGOrientationWGS84"
          dataType="SGfloat32"
          cardinality="3"
          encoding="HLAfixedArray"
          semantics="WGS84 orientation represented as vector part of the quaternion"/>


And when I analyze the orientation sent, I have some weird values like "2.11401e+15 / 4.88738e+09 / -3.5536e+30" ..
Could someone explain me what is this ? And how I can convert it to have the traditionnal heading, pitch and roll ?

Thanks in advance for your help :)

L.
Luckix
 
Posts: 10
Joined: Mon Mar 07, 2016 3:31 pm

Re: HLA FOM Orientation

Postby stuart » Mon Mar 21, 2016 3:03 pm

Hi Luckix,

As the semantics entry suggests, these are Quaternions (https://en.wikipedia.org/wiki/Quaternion), and those are the i,j,k values. From memory, the orientation is relative to a earth-centered-frame, and there are functions in SimGear to convert to heading/pitch/roll in combination with the object's position.

I'm currently (slowly) working on improving the HLA support within FG. As part of that I'll be deprecating/removing the support within SimGear and replacing it with a much richer toolkit. I'd be interested in what work you're doing and working together.

Best regards,

-Stuart
G-MWLX
User avatar
stuart
Moderator
 
Posts: 1469
Joined: Wed Nov 29, 2006 9:56 am
Location: Edinburgh
Callsign: G-MWLX

Re: HLA FOM Orientation

Postby Luckix » Wed Mar 23, 2016 9:56 am

Thank you for your answer, I sent you an e-mail.

I can't find the appropriate quaternion to have my yaw pitch and roll.

In simgear source code I only find they use this 3d vector (I, j , k) to have q.w = dot product of the vector, then x, y, z = i, j, k.. But it does not work. I don't have my true yaw pitch roll by using this quaternion. It must be something else I cant find..
Luckix
 
Posts: 10
Joined: Mon Mar 07, 2016 3:31 pm


Return to Multiplayer

Who is online

Users browsing this forum: No registered users and 1 guest