sens_struct
Generate a sensor structure from a sensor data vector or matrix.
Syntax
X = sens_struct(data,fs,depid,type) %Matlab & Octave for regularly sampled data % or X = sens_struct(data,T,depid,type) %Matlab & Octave for irregularly sampled data % or X = sens_struct(data,fs,depid,type,name) %Matlab & Octave for regularly sampled data % or X = sens_struct(data,T,depid,type,name) %Matlab & Octave for irregularly sampled data #R to do
Description
Generate a sensor structure from a sensor data vector or matrix.
Inputs
Input var | Description | Default |
---|---|---|
data | is a vector or matrix of sensor data. This can be in any unit and frame but the metadata generated by sens_struct assumes a default unit and frame. Change these manually in X after running sens_struct to the correct unit and frame. | N/A |
fs | is the sampling rate of the sensor data in Hz (samples per second). | N/A |
T | is the time in seconds of each measurement in data for irregularly sampled data. The time reference (i.e., the 0 time) should be with respect to the start time of the deployment. | N/A |
depid | is a string containing the deployment identifier for these data. | N/A |
type | type is a string containing the first few letters of the sensor type, e.g., acc for acceleration. These will be matched to the list of sensor names in the sensor_names.csv file. If more than one sensor matches type, a warning will be given. type can be in upper or lower case. | N/A |
name | is the optional name to give the variable, e.g., T_EXT. If a name is not given, a default value will be selected. | N/A |
Outputs
Output var | Description | Units |
---|---|---|
X | is a sensor structure with metadata fields pre-populated from the sensor_names.csv file. Change these as needed to the correct values. | N/A |
Example
Matlab & Octave
A = sens_struct(Aw,fs,'md13_134a','acc') A.frame = 'animal' ; % change frame indication
R
# to do
About
bugs@animaltags.org Last modified: 10 July 2017