-
Notifications
You must be signed in to change notification settings - Fork 1
Home
This wiki is for documenting the MoMoCapture app that is being developed in the fourMs Lab at University of Oslo. It was originally developed for MusicLab events, but is also used for other data collection procedures.
The data is collected on the phone and sent to the Nettskjema web form for storage. The forms to use are based on the content of this text file. This JSON file has the following structure:
{
"Data": {
"id": 0010,
"name": "data"
},
"ConsentForm": {
"id": 0011,
"name": "consent"
},
"WithdrawForm": {
"id": 0012,
"name": "withdraw"
},
"DynamicForms": [
{
"id": 0001,
"name": "Example Form 1"
},
{
"id": 0002,
"name": "Example Form 2"
},
{
"id": 003,
"name": "Example Form 3"
}
]
}
The 'id' field is the form id in Nettskjema and the 'name' is any name that you consider appropriate for the form (the name is not currently used on any UI, but it could be useful in the future). In 'DynamicForms' you can add up to 15 elements that represent the forms for the specific experiment to perform. The current values that are used are shown in the file that is saved in the server here.
The data form that collects the sensor data can be created by adding two fields to a new form as shown below. Ensure that the types of questions are the ones that are depicted in the image as well as the name of the fields (case sensitive).
In the 'Settings' tab be sure to have the next settings in the following parts:
The permissions must be set to 'Everybody - without login':
Once the form is ready and published, the 'id' in the the "Data" object from the .json configuration file must be changed to the number assigned to the new form and that can be found in the tab 'Collect Responses' as illustrated below.
Restart the app (close and open again if it was already opened) so that it can retrieve again the configuration file with the new settings, now you should be able to see the responses in the new data form on every capture.
The recorded data are packaged into a zip-file with two CSV files:
- Device motion: ISOdate_deviceID_dm.csv
- GeoLocalization: ISOdate_deviceID_gl.csv
Where ISOdate is a date in ISO format but using a dash (-) instead of a colon (:) due to file naming restrictions. This format is the date and time in UTC YYYY-MM-DDThh-mm-ss.SSSZ. The deviceID is the identifier for the device, which means that all the files with this same ID belongs to the same device. (e.g. 2022-01-16T11-56-49.415Z_c67e7e60-e905-377a-1134-d65f2dba5ee9_dm.csv)
The data fields are described more below.
The CSV file containing motion data consists of columns with the following variables:
- timestamp: The date and time in ISO format YYYY-MM-DDThh:mm:ss.SSSZ.
- time: a time marker from the device (in milliseconds), which resets to zero when the hardware initializes and is incremented over time (it might be more precise than the timestamp).
- x: accelerometer data in the X direction
- y: accelerometer data in the Y direction
- z: accelerometer data in the Z direction
- alpha: rotation in the Z direction
- beta: rotation in the X direction
- gamma: rotation in the Y direction
The specification of the inertial sensor readings is documented in the W3C DeviceOrientation Event Specification, and can be seen in the image below.
The iOS 13 version does not have the rotation information (alpha, beta, gamma). So for this OS, the orientation information (also alpha, beta, gamma) is sent in an additional file following the official documentation.
Units: The Android IMU sensors report acceleration in m/s2 (Android documentation). The Apple IMU sensors report acceleration in "increments of the gravitational acceleration, with the value 1.0 representing an acceleration of 9.8 meters per second (per second) in the given direction" (Apple documentation).
The CSV file containing GPS data consists of the following columns:
- time: the epoch timestamp. It can be converted online or in your programming language of choice.
- lat: the GPS latitude, ranging from 0 to 90 (in decimal degrees). It can be converted online.
- long: the GPS longitude, ranging from 0 to 180 (in decimal degrees).
- accuracy: the accuracy of the GPS measurement (in meters) (more information on this value here).
If the form contains a question with the text 'userID' the app will put the userID in this field and disable the field for editing. It is recommended to use this feature as this is the only way to match questionnaires and the data.
Currently the matrix question of Nettskjema is not implemented in the questionnaire functionality. Conditional formatting (display only if another question was answered a certain way) is also not functioning in the current implementation.
A project from the fourMs Lab, RITMO Centre for Interdisciplinary Studies in Rhythm, Time and Motion, Department of Musicology, University of Oslo.