While the GX1 itself is a solid piece of hardware, the software is a little bit lacking. This is especially true for linux; MicroStrain provides only a small example to get euler angles. It would have been nice if they had provided a library and API, but it was easy enough to write one from scratch using the 3DM-GX1 Data Communications Protocol document.
I feel obligated to say here that MicroStrains documentation is excellent, and really simplified the whole process. I also had to email customer support once or twice, and they were very helpful.
So I wrote a C++ library to talk to the GX1. It was relatively painless because the GX1 uses a serial interface and I could simply use the unix termios API. While the GX1 supports polling and continuous modes, I focused on polling because it's more flexible. To get data from the IMU the following must occur:
- Set a command to the GX1
- Wait for result buffer
- Read the result buffer
- Parse the result to get meaningful data