AngularPos different between UserFrame and BodyUserFrame?

64 views
Skip to first unread message

OBsIV

unread,
Dec 1, 2012, 1:26:50 PM12/1/12
to libfre...@googlegroups.com
Hi, I'm using the Scoop which requires use of DataModeControlV2Request for setup. I need AngularPos and AngularVel, so, I set the packet type to BodyUser. I'm getting back BodyUser messages fine. The only issue is that the quaternions returned for AngularPos are bogus compared to that if I were to select UserFrame as the packet type.
 
Am I missing a config step?
 
Thanks

OBsIV

unread,
Dec 2, 2012, 11:11:26 PM12/2/12
to libfre...@googlegroups.com
Ok, I definitely see the problem now. The AngularPosA value is always 0 when set to BodyUserFrame (whereas it's not when set to UserFrame).
 
Interesting thing is that the struct for freespace_BodyUserFrame appears to intentionally order the fields differently (out of order) than UserFrame:
 
 int16_t angularPosB;
 int16_t angularPosC;
 int16_t angularPosD;
 int16_t angularPosA;
 
'A' is last -- and it happens to always be 0. Why is that?
 
If this isn't going to work, can I turn on both User and Body messages (not the combined BodyUser)? I don't see any way to do that given the Packet field doesn't appear to allow it.
 
Help?
 
 

Merrill

unread,
Dec 3, 2012, 9:38:25 AM12/3/12
to libfre...@googlegroups.com
Hi Mark,

Yes, the BodyUser sending out 0's for Quaternion A is a known issue.  We used to always send out 0's for that parameter, but the change to enable all 4 vales didn't make it into the BodyUser message.

The good news is that its pretty easy to calculate the Quaternion A value.  Here is the equation you need to use:

Let me know if this doesn't solve your problem.

Thanks again,

-Merrill
libfreespace moderator
Reply all
Reply to author
Forward
0 new messages