/** Decode message with raw data */
 public void decode(LittleEndianDataInputStream dis) throws IOException {
   time_boot_ms = (int) dis.readInt() & 0x00FFFFFFFF;
   roll = (float) dis.readFloat();
   pitch = (float) dis.readFloat();
   yaw = (float) dis.readFloat();
   thrust = (float) dis.readFloat();
 }
Exemplo n.º 2
0
 /** Decode message with raw data */
 public void decode(LittleEndianDataInputStream dis) throws IOException {
   roll = (float) dis.readFloat();
   pitch = (float) dis.readFloat();
   yaw = (float) dis.readFloat();
   thrust = (float) dis.readFloat();
   target = (int) dis.readUnsignedByte() & 0x00FF;
   roll_manual = (int) dis.readUnsignedByte() & 0x00FF;
   pitch_manual = (int) dis.readUnsignedByte() & 0x00FF;
   yaw_manual = (int) dis.readUnsignedByte() & 0x00FF;
   thrust_manual = (int) dis.readUnsignedByte() & 0x00FF;
 }
 /** Decode message with raw data */
 public void decode(LittleEndianDataInputStream dis) throws IOException {
   x = (float) dis.readFloat();
   y = (float) dis.readFloat();
   z = (float) dis.readFloat();
   timeout = (int) dis.readUnsignedShort() & 0x00FFFF;
   type = (int) dis.readUnsignedByte() & 0x00FF;
   color = (int) dis.readUnsignedByte() & 0x00FF;
   coordinate_system = (int) dis.readUnsignedByte() & 0x00FF;
   for (int i = 0; i < 26; i++) {
     name[i] = (char) dis.readByte();
   }
 }
Exemplo n.º 4
0
 /** Decode message with raw data */
 public void decode(LittleEndianDataInputStream dis) throws IOException {
   time_boot_ms = (int) dis.readInt() & 0x00FFFFFFFF;
   image_interval = (float) dis.readFloat();
   video_framerate = (float) dis.readFloat();
   image_resolution_h = (int) dis.readUnsignedShort() & 0x00FFFF;
   image_resolution_v = (int) dis.readUnsignedShort() & 0x00FFFF;
   video_resolution_h = (int) dis.readUnsignedShort() & 0x00FFFF;
   video_resolution_v = (int) dis.readUnsignedShort() & 0x00FFFF;
   camera_id = (int) dis.readUnsignedByte() & 0x00FF;
   image_status = (int) dis.readUnsignedByte() & 0x00FF;
   video_status = (int) dis.readUnsignedByte() & 0x00FF;
 }
Exemplo n.º 5
0
 /** Decode message with raw data */
 public void decode(LittleEndianDataInputStream dis) throws IOException {
   param1 = (float) dis.readFloat();
   param2 = (float) dis.readFloat();
   param3 = (float) dis.readFloat();
   param4 = (float) dis.readFloat();
   x = (int) dis.readInt();
   y = (int) dis.readInt();
   z = (float) dis.readFloat();
   command = (int) dis.readUnsignedShort() & 0x00FFFF;
   target_system = (int) dis.readUnsignedByte() & 0x00FF;
   target_component = (int) dis.readUnsignedByte() & 0x00FF;
   frame = (int) dis.readUnsignedByte() & 0x00FF;
   current = (int) dis.readUnsignedByte() & 0x00FF;
   autocontinue = (int) dis.readUnsignedByte() & 0x00FF;
 }