Hi Jonathan,
When working with sensor data from an Android device using MATLAB's mobiledev object, you might encounter issues with timing and data retrieval. Here are some suggestions to address the problems you're experiencing:Issues and Solutions
Inconsistent Timestamps:
- Sensor data might have inconsistent timestamps due to delays in sensor logging or processing.
- Ensure that your device is capable of sampling at the desired frequency (100 Hz). Some devices have limitations on maximum sampling rates.
- Consider logging for a longer period and then analyzing the data to identify patterns or issues in timestamp consistency.
Data Retrieval Delays:
- Retrieving data with accellog and orientlog might take time due to the amount of data being processed.
- Logging a large amount of data can lead to delays when MATLAB processes and retrieves it.
Improving Performance:
- Reduce the logging duration to minimize the data size and improve retrieval speed.
- Ensure that the MATLAB environment and the mobile device are not overloaded with other processes that could affect performance.
Code Optimization:
- Avoid unnecessary calls to discardlogs(m) unless you want to clear previous logs intentionally.
- Ensure that you start and stop logging correctly and efficiently.
Hope this helps.