Wiki
Clone wikiOpenMAT / Build Instructions
General
OpenMAT is available in two versions:
- Open-source version (fully functional, but without magnetometer and misalignment calibration code)
- Closed-source version (fully functional, downloadable for free)
OpenMAT at the moment consists of the following components:
- LpSensor: The basic library that communicates with the sensor and manages all LPMS units attached to the system.
- LpmsControl: Application that uses LpSensor’s capabilities to work with LPMS devices
- OpenMATCommon: Files that are commonly shared between all OpenMAT applications such as the class containing sensor data
- LpmsSimpleExample: A simple example for using the LpSensor library
- LpmsBNativeAndroidLibrary: Class library for reading data from LPMS-B devices on Android
- LpmsFirmware: The firmware running on the LPMS-B and LPMS-CU device
- LpmsIAP: The in-application-programmer for updating the LPMS firmware from LpSensor / LpmsControl
- LpSensorCWrapper: C language wrapper of the LpSensor library for use in LabView or MATLAB
- LpmsCWrapperTest: Short test program for C language wrapper
The following platforms are supported:
- Windows: Fully supported.
- Linux: Fully supported.
- OSX: OpenMAT can be built on OSX, but hardware support isn’t quite there yet. Coming soon!
- Android: Reading data from LPMS-B is supported on Android.
- iOS: Will be supported with the next version of LPMS-B that will be using Bluetooth 4 LE.
OpenMAT uses CMake as a cross-platform build system. CMake can be downloaded from http://www.cmake.org/. Using CMake you can create either a traditional Makefile or a project file for your favorite development environment.
Comments on the functionality of all classes and methods included can generally be found in the header files of a project. The code is written mostly according to QT coding-style.
If you find any bugs or missing features in OpenMAT please raise an issue in the issue tracker.
Building on Windows
On Windows OpenMAT has the following dependencies that need to installed manually:
- FTDI D2XX library (http://www.ftdichip.com/Drivers/D2XX.htm)
- PCAN Basic API for CAN bus adapter (http://www.peak-system.com/Support.55.0.html) – Optional
- Boost library (http://www.boost.org/)
- Windows SDK 6 (http://msdn.microsoft.com/en-us/dd299405.aspx)
- QWT (http://qwt.sourceforge.net/)
- QT5 (http://qt.nokia.com/) NOTE: QT5 needs to be built with the -opengl desktop option
- PugiXML (https://code.google.com/p/pugixml/)
- just::thread (http://www.stdthread.co.uk/) – Optional
- ICE (http://www.zeroc.com) – Optional
As Windows doesn’t have a Linux-like package management system, the dependencies have to be installed manually. After installing the dependencies the build process is started in the following way:
- Run the CMake GUI tool (cmake-gui)
- In CMake set the directory where your source-code is stored
- Click the “Configure” button and specify your favorite build environment
- Select your build preferences, especially the dependency directories
- Click “Configure” again and click “Generate”
- Go to your build environment, open the project file from the source directory and build
NOTE 1: LpSensor uses C++11 functionality for threading. Therefore Visual Studio 2012 or higher should be used. If you are required to use an earlier version of Visual Studio, you can also use the just::thread library to emulate C++11 threading functionality. just::thread is a commercial library.
NOTE 2: In case you intend to build LpmsControl with VS2012 for 32-bit Windows, you need to build QT5 yourself with the “-opengl desktop” option enabled.
Building on Linux
Use your package manager to install the dependencies. The package names are something along these lines:
- Boost: libboost-dev
- QWT: libqwt-dev
- QT5: libqt5-dev (NOTE: Must be built with -opengl desktop option)
- FTDI: libftdi-dev
- ICE: libice-dev
- Bluetooth support: libbluetooth-dev
After installing the dependencies using your package manager, the build procedure is the same as on Windows:
- Run the CMake GUI tool (cmake-gui)
- In CMake set the directory where your source-code is stored
- Click the “Configure” button and specify your favorite build environment
- Select your build preferences, especially the dependency directories
- Click “Configure” again and click “Generate”
- Go to your build environment, open the project file from the source directory and build
Updated