I suggest you start by first writing a program that displays a cube in OpenGL then. Next step is to animate that, typically people write “rotating cube” programs at this stage.
There are quite a few tutorials around that’ll give you a very good idea of how to do this.
When you have you’re animated cude program, you can extend it to use input from the sensor data you have. In principle, first you want to calibrate your virtual object (the cube in the OpenGL program) against the sensor location in the real world. This is simply an initial step saying “OK, the sensor is now at a position that I consider the origin - put the cube at the origin, too”. Then, every transform from the sensor needs to be applied to the cube.
This is obviously an over-simplification of the situation, but it gives you an idea.
Starting with OpenGL - which is fairly low-level, in terms of end-user application development - may not be good for you, if you’re interested in just getting something up and running and experimenting. Maybe you can look up game engines, or 3d engines - lots of them around, high quality and open source, will also give you additional tools to work with, etc. Examples (off the top of my head, not a definitive list by any means!) Ogre3D, OpenSceneGraph, CrystalSpace, Irrlight.