#include " stdio.h'<="" p>="" <p>#include="" 'lpmssensori.h'<br="" gt;="" #include="" 'lpmssensormanageri.h'<="" <p>int="" main(int="" argc,="" char="" *argv[])<br="" {<br="" imudata="" d;<="" <p>="" gets="" a="" lpmssensormanager="" instance<br="" lpmssensormanageri*="" manager="LpmsSensorManagerFactory();
" 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');<="" while(1)="" checks,="" if="" conncted<br="" (<br="" lpms->getconnectionstatus()="" sensor_connection_connected="" &&<br="" lpms->hasimudata()<br="" )="" {<="" reads="" quaternion="" data<br="" d="lpms->getCurrentData();" shows="" printf('timestamp="%f," qw="%f," qx="%f," qy="%f," qz="%fn',2 4 6 8 10 12 14 16 18 20 22 24 26 28 30 | #include 'stdio.h'</p> #include 'LpmsSensorManagerI.h'</p> {<br/> <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> // Checks, if conncted<br /> lpms->getConnectionStatus()SENSOR_CONNECTION_CONNECTED&&<br/> ){</p> d=lpms->getCurrentData();</p> printf('Timestamp=%f, qW=%f, qX=%f, qY=%f, qZ=%fn',<br/> }<br/> <p>// Removes the initialized sensor<br /> <p>// Deletes LpmsSensorManager object<br /> <p>return0;<br/> |
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.