3DM-GX3 IMU sensor - Data acquisition source code

3DM-GX3 IMU sensor - Data acquisition source code


Code is made by Visual studio 2008(C++).


There is "3DM_GX3_interface" class In the source code.
You can get IMU data easily using the class.



//Open Port 
CString strPort = "COM7";
int baudrate = 115200; //19200;
int data = 8;
int parity = 0;
int stop = 0;//1;
C3DM_GX3.OpenPort2(strPort,baudrate,data,parity,stop);


//Request Data to the IMU, This function need one time when start to acquisition.
C3DM_GX3.SendData()

//Get Data loop until end.
C3DM_GX3.ReceiveData.roll/3.14*180 ;
C3DM_GX3.ReceiveData.pitch/3.14*180 ;
C3DM_GX3.ReceiveData.yaw/3.14*180 ;

//Close Port
C3DM_GX3.ClosePort();




"How to change 4byte bit data to float" is used to get the roll, yaw, pitch.
The method is introduced on my blog here.


this code is useful to you.
Thank you.

Comments

  1. Hi Kim!

    I can,t download acquisition code for: "3DM-GX3 IMU sensor - Data acquisition source code "

    can you help me, how to download it....

    regards!

    meo ;
    ANSAN KOREA

    ReplyDelete

Post a Comment

Popular posts from this blog

OpenCV Stitching example (Stitcher class, Panorama)

(OpenCV Study) Background subtractor MOG, MOG2, GMG example source code (BackgroundSubtractorMOG, BackgroundSubtractorMOG2, BackgroundSubtractorGMG)

Example source code of extract HOG feature from images, save descriptor values to xml file, using opencv (using HOGDescriptor )

Real-time N camera stitching Class.

8 point algorithm (Matlab source code) / The method to get the Fundamental Matrix and the Essential matrix

Optical Flow sample source code using OpenCV

Video Stabilization example source code, (using cvFindHomography, cvWarpPerspective functions in openCV)

(OpenCV Study) calcOpticalFlowFarneback example source code ( dense optical flow )

yuv422(YUYV) to RGB and RGB to yuv422(YUYV), (Using OpenCV and TBB)

OpenCV Drawing Example, (line, circle, rectangle, ellipse, polyline, fillConvexPoly, putText, drawContours)