Depacket Client Info

NatNet, VRPN, TrackD, and Plugins
Post Reply
Posts: 6
Joined: Fri May 25, 2018 1:16 pm

Depacket Client Info

Post by kimtae55 » Tue Jul 31, 2018 6:41 am

I am currently working on using the Depacketization for android and Unity, so that I can multicast without NatNetML. As I am reading the PacketClient.cpp, I notice the rigid body information is unpacked in terms of quaternion.
However, I need information in terms of euler angles, with XYZ rotation order. Is there a way to specify it in code or in Motive?

NaturalPoint Employee
NaturalPoint Employee
Posts: 455
Joined: Mon Jan 19, 2015 11:52 am

Re: Depacket Client Info

Post by steven.andrews » Tue Jul 31, 2018 9:44 am

Hello kimtae55,

NatNet streams rotational data in quaternions. If you wish to use the rotational data in the Euler convention (pitch-yaw-roll), the quaternion data will need to be converted into Euler angles.

In the provided NatNet SDK samples, the SampleClient3D application converts quaternion rotations into Euler rotations to display in the application interface. The sample algorithms for the conversion are scripted in the NATUtils.cpp file. You can refer to the NATUtils.cpp file and the SampleClient3D.cpp file to figure out how to convert quaternions into the Euler convention.

I hope this helps,
Steven Andrews
OptiTrack | Senior Customer Support Engineer

Post Reply