Example #1
0
        public void WriteCompressedAngles(Angles angles)
        {
            CheckRealloc(6);
            byte[] arr = BitConverter.GetBytes(Angles.Angle2Short(angles.Pitch));
            data[Position++] = arr[0];
            data[Position++] = arr[1];

            arr = BitConverter.GetBytes(Angles.Angle2Short(angles.Yaw));
            data[Position++] = arr[0];
            data[Position++] = arr[1];

            arr = BitConverter.GetBytes(Angles.Angle2Short(angles.Roll));
            data[Position++] = arr[0];
            data[Position++] = arr[1];
        }
Example #2
0
 /// <summary> Angle must be [-pi, +pi]. Writes 2 Bytes. </summary>
 public void WriteCompressedAngle(float radians)
 {
     Write(Angles.Angle2Short(radians));
 }