Software
All LP-RESEARCH sensor devices are delivered with a software package. The software package contains the LPMS-Control application for general control of the sensors and a programming library for users to implement their own applications communicating with the sensor.
NOTE: All documentation and software downloads including libraries for various programming languages are on our support page.
LPMS-Control
Overview
The LPMS-Control application allows users to control various aspects of an LPMS device. In particular the application has the following core functionality:
- Lists all LPMS devices connected to the system.
- Connects to up to 256 sensors simultaneously. Multiple connection interfaces (Bluetooth, CAN bus etc.) can be used at the same time.
- Adjusts all sensor parameters (sensor range etc.).
- Sets orientation offsets.
- Initiates accelerometer, gyroscope and magnetometer calibration.
- Displays the acquired data in real-time either as line graphs or a 3D image.
- Records data from the sensors to a CSV data file.
- Plays back data from a previously recorded CSV file.
- Uploads new firmware and in-application-programming software to the sensor.
Data Visualization
The screenshots below illustrate some of the functionality of the LPMS-Control software.
Figure 1 – Raw measurement data (gyroscope, accelerometer, magnetometer, temperature sensor, barometric pressure sensor) and processed data (orientation, linear acceleration, altitude) can be visualized as line graphs. Data can be logged and saved to a CSV file.
Figure 2 – Orientation data can be 3D visualized in real-time, either as a simple cube or a more complex custom shape. The motion of several sensors can be displayed simultaneously, if multiple sensors are connected to LPMS-Control.
Sensor Calibration
Besides data acquisition, visualization and logging, LPMS-Control allows calibration of the LP motion sensor’s MEMS components. The application offers offset and misalignment calibration for the unit’s gyroscope and acclerometer, as well as magnetometer calibration functionality.
While accelerometer and gyroscope calibration is usually done at our factory before delivery to the customer, the calibration parameters of the magnetometer can vary strongly depending on the usage of the sensor.
Therefore the so-called hard-and soft iron calibration is an essential tool to adjust the sensor to work well in a specific environment. LPMS-Control offers a comfortable method to calibrate the magnetometer. Additionally to the pure calibration, the application also visualizes the shape of the environment magnetic field and shows the impact of magnetic noise on the sensor performance.
Figure 3 – The shape of the magnetic field surrounding the LPMS is visualized as a 3D sphere. A bar graph indicates the current magnetic noise level in real-time.
LpSensor Library
The LpSensor library contains classes that allow a user to integrate LPMS devices into their own applications. We provide the library pre-compiled for different operating systems. The standard library is written in C++, but we also offer wrappers for Python, C# and C. MATLAB and LabView ports are under development. Should your application require a specific software integration please contact us.
The code snippet below shows the most simple method of connecting to the sensor and reading data. For deeper insight in the programming library and the full source code of LPMS-Control please have a look at our code repository.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 |
<br /> #include "stdio.h"</p> <p>#include "LpmsSensorI.h"<br /> #include "LpmsSensorManagerI.h"</p> <p>int main(int argc, char *argv[])<br /> {<br /> ImuData d;</p> <p> // Gets a LpmsSensorManager instance<br /> LpmsSensorManagerI* manager = LpmsSensorManagerFactory();</p> <p> // Connects to LPMS-B sensor with address 00:11:22:33:44:55<br /> LpmsSensorI* lpms = manager->addSensor(DEVICE_LPMS_B, "00:11:22:33:44:55");</p> <p> while(1) {<br /> // Checks, if conncted<br /> if (<br /> lpms->getConnectionStatus() == SENSOR_CONNECTION_CONNECTED &&<br /> lpms->hasImuData()<br /> ) {</p> <p> // Reads quaternion data<br /> d = lpms->getCurrentData();</p> <p> // Shows data<br /> printf("Timestamp=%f, qW=%f, qX=%f, qY=%f, qZ=%f\n",<br /> d.timeStamp, d.q[0], d.q[1], d.q[2], d.q[3]);<br /> }<br /> }</p> <p> // Removes the initialized sensor<br /> manager->removeSensor(lpms);</p> <p> // Deletes LpmsSensorManager object<br /> delete manager;</p> <p> return 0;<br /> }<br /> |
Mobile Application
As part of the open motion analysis toolkit (OpenMAT) we offer support to monitor and log data from our wireless sensors using mobile devices. See below a screenshot of a sample program for Android. The application is well suitable for data logging tasks as is. Additionally we provide source code for users to modify the program to fit their specific requirements. An iOS version with similar functionality to the Android application is currently under development.
Figure 4 – The Android sample application allows connecting to multiply sensors, visualizes sensor raw data/orientation and allows logging of sensor real-time data to a file.