Hello,
i want to calculate a packet...
NatNetVersion is 2.5.
I have got 2 rigid bodies and i don't stream markers.
The first value is Message ID = 7 and then nBytes = 240.
And thats the correct value, but when i sum-up the packet i got the value 246.
Did i missed something?
I am using the NatNetSDK2.7 sample.
PacketClient packet calculation
-
- Posts: 609
- Joined: Tue Mar 19, 2013 5:03 pm
Re: PacketClient packet calculation
Hello,
I will research this and get back to you shortly. I should have an answer for you by tomorrow.
Best Regards,
I will research this and get back to you shortly. I should have an answer for you by tomorrow.
Best Regards,
Dustin
Technical Support Engineer
OptiTrack | TrackIR | SmartNav
Technical Support Engineer
OptiTrack | TrackIR | SmartNav
-
- Posts: 609
- Joined: Tue Mar 19, 2013 5:03 pm
Re: PacketClient packet calculation
Hello,
Could you provide more information on this? Also, It would be helpful to know how you came up with 246.
Could you provide more information on this? Also, It would be helpful to know how you came up with 246.
Dustin
Technical Support Engineer
OptiTrack | TrackIR | SmartNav
Technical Support Engineer
OptiTrack | TrackIR | SmartNav
Re: PacketClient packet calculation
I noticed this difference too (though in my case it was a difference of 4 bytes instead of 6). What's happening is that the numBytes value gives you the number of bytes in the payload, not the whole packet. The packet also includes the messageID (short - 2 bytes) and the numBytes (another short - 2 bytes). Where the last 2 bytes are coming from I am not sure...
---
Tom Svilans
tomsvilans.com
Tom Svilans
tomsvilans.com
Re: PacketClient packet calculation
(2 MessageID)
(2 nBytes)
ID=7:
4 frameNumber
4 nMarkerSets
4 nOtherMarkers
4 nRigidBodies
_____
16
nRB=1:
32 ID,x,y,z,qx,qy,qz,qw
4 nRigidMarkers
36 nBytes
NatNet>2.x:
12 nBytes
12 nBytes
NatNet>2.x:
4 fError
_____
100
+16
=116
4 nSkeletons (=0)
4 nLabeledMarkers (=0)
4 latency
4 timecode
4 timecodeSub
NatNet<2.7:
4 timestamp
2 params
4 eod
_____
30
+116
= 146
The value of nBytes at the beginning is 140 (6 Bytes missing).
With two rigid bodies it is 240, also 6 Bytes missing.
But i don't have a problem with it, because i am only using paketinfo and rigidbodydata.
The problem might be at the end of the datapacket.
(2 nBytes)
ID=7:
4 frameNumber
4 nMarkerSets
4 nOtherMarkers
4 nRigidBodies
_____
16
nRB=1:
32 ID,x,y,z,qx,qy,qz,qw
4 nRigidMarkers
36 nBytes
NatNet>2.x:
12 nBytes
12 nBytes
NatNet>2.x:
4 fError
_____
100
+16
=116
4 nSkeletons (=0)
4 nLabeledMarkers (=0)
4 latency
4 timecode
4 timecodeSub
NatNet<2.7:
4 timestamp
2 params
4 eod
_____
30
+116
= 146
The value of nBytes at the beginning is 140 (6 Bytes missing).
With two rigid bodies it is 240, also 6 Bytes missing.
But i don't have a problem with it, because i am only using paketinfo and rigidbodydata.
The problem might be at the end of the datapacket.