// -*- IDL -*-
#ifndef Extended3DdataTypes_idl
#define Extended3DdataTypes_idl

#include "InterfaceDataTypes.idl"

module Extended3DdataTypes {
  struct ThreeAxisData
  {
    double x;
    double y;
    double z;
  };

  struct Quaternion
  {
    double q1;
    double q2;
    double q3;
    double q4;
  };
  
  struct Motion3DSensorData
  {
    ThreeAxisData accs;
    ThreeAxisData gyros;
    ThreeAxisData mags;    
  };

  typedef double Mat44[4][4];

  typedef sequence<Motion3DSensorData> Motion3DSensorDataList;

  struct TimedMotion3DSensorData
  {
    // Time stamp.
    RTC::Time tm;
    // Sequence of motion sensor data.
    Motion3DSensorDataList motion3dsensors;
  };

  struct EstimatedMotionData
  {
    ThreeAxisData accel;
    ThreeAxisData angularvel;
    ThreeAxisData translationalvel;
    Quaternion quat;
    Mat44 quatcov;
    short isstatic;
  };

  struct TimedEstimatedMotionData
  {
    // Time stamp.
    RTC::Time tm;
    EstimatedMotionData estimatedmotion;
  };  

  struct WorldQuatCoords
  {
    RTC::Vector3D worldpos;
    Quaternion quat;
  };

  struct TimedWorldQuatCoords
  {
    // Time stamp.
    RTC::Time tm;
    WorldQuatCoords data;
  };  

  struct LabeledPointCloudPoint
  {
    short count;
    short objectlabel;
    RTC::PointCloudPoint pc_world;
    RTC::PointCloudPoint pc_local;
  };

  typedef sequence<LabeledPointCloudPoint> LabeledPCL;

  struct TimedLabeledPCL
  {
    RTC::Time tm;
    LabeledPCL lpcl;
  };
};

#endif // Extended3DdataTypes_idl
