API  4.4
For C++ developers
OpenSim::APDMDataReader Class Reference

APDMDataReader is a class that reads files produced by IMU manufacturer APDM and produces datatables from them. More...

+ Inheritance diagram for OpenSim::APDMDataReader:

Public Member Functions

 APDMDataReader ()=default
 
 APDMDataReader (const APDMDataReaderSettings &settings)
 
virtual ~APDMDataReader ()=default
 
APDMDataReaderclone () const override
 
- Public Member Functions inherited from OpenSim::IMUDataReader
 IMUDataReader ()=default
 
 IMUDataReader (const IMUDataReader &)=default
 
 IMUDataReader (IMUDataReader &&)=default
 
IMUDataReaderoperator= (const IMUDataReader &)=default
 
IMUDataReaderoperator= (IMUDataReader &&)=default
 
virtual ~IMUDataReader ()=default
 
- Public Member Functions inherited from OpenSim::DataAdapter
 DataAdapter ()=default
 
 DataAdapter (const DataAdapter &)=default
 
 DataAdapter (DataAdapter &&)=default
 
DataAdapteroperator= (const DataAdapter &)=default
 
DataAdapteroperator= (DataAdapter &&)=default
 
virtual ~DataAdapter ()=default
 
DataAdapter::OutputTables read (const std::string &dataSourceSpecification) const
 Public interface to read data from a dataSourceSpecification, typically a file or folder. More...
 
const std::shared_ptr< AbstractDataTablegetDataTable (const OutputTables &tables, const std::string tableName)
 Generic interface to retrieve a specific table by name from read result. More...
 

Static Public Attributes

static const std::vector< std::string > acceleration_labels
 
static const std::vector< std::string > angular_velocity_labels
 
static const std::vector< std::string > magnetic_heading_labels
 
static const std::vector< std::string > orientation_labels
 
static const std::string TimeLabel
 
- Static Public Attributes inherited from OpenSim::IMUDataReader
static const std::string Orientations
 
static const std::string LinearAccelerations
 
static const std::string MagneticHeading
 
static const std::string AngularVelocity
 

Protected Member Functions

DataAdapter::OutputTables extendRead (const std::string &fileName) const override
 Typically, APDM can export a trial as one .h5 file (binary that we don't parse as of now) or as .csv ASCII text file that is comma delimited, grouped in order by sensor. More...
 
virtual void extendWrite (const DataAdapter::InputTables &tables, const std::string &sinkName) const override
 Implements writing functionality, not implemented. More...
 
const APDMDataReaderSettingsgetSettings () const
 Method to get const reference to the internal APDMDataReaderSettings object maintained by this reader. More...
 
APDMDataReaderSettingsupdSettings ()
 Method to get writable reference to the internal APDMDataReaderSettings object maintained by this reader, to allow modification after construction. More...
 
- Protected Member Functions inherited from OpenSim::IMUDataReader
DataAdapter::OutputTables createTablesFromMatrices (double dataRate, const std::vector< std::string > &labels, const std::vector< double > &times, const SimTK::Matrix_< SimTK::Quaternion > &rotationsData, const SimTK::Matrix_< SimTK::Vec3 > &linearAccelerationData, const SimTK::Matrix_< SimTK::Vec3 > &magneticHeadingData, const SimTK::Matrix_< SimTK::Vec3 > &angularVelocityData) const
 create a map of names to TimeSeriesTables. More...
 

Additional Inherited Members

- Public Types inherited from OpenSim::DataAdapter
typedef std::map< std::string, std::shared_ptr< DataAdapter > > RegisteredDataAdapters
 Type of the registry containing registered adapters. More...
 
typedef std::map< std::string, std::shared_ptr< AbstractDataTable > > OutputTables
 Collection of tables returned by reading methods implemented in derived classes. More...
 
typedef std::map< std::string, const AbstractDataTable * > InputTables
 Collection of tables accepted by writing methods implemented in derived classes. More...
 
- Static Public Member Functions inherited from OpenSim::IMUDataReader
static const TimeSeriesTable_< SimTK::Quaternion_< double > > & getOrientationsTable (const DataAdapter::OutputTables &tables)
 Custom accessors to retrieve tables of proper types without requiring users/scripters to cast. More...
 
static const TimeSeriesTableVec3getLinearAccelerationsTable (const DataAdapter::OutputTables &tables)
 get table of LinearAccelerations as TimeSeriesTableVec3 More...
 
static const TimeSeriesTableVec3getMagneticHeadingTable (const DataAdapter::OutputTables &tables)
 get table of MagneticHeading as TimeSeriesTableVec3 More...
 
static const TimeSeriesTableVec3getAngularVelocityTable (const DataAdapter::OutputTables &tables)
 get table of AngularVelocity as TimeSeriesTableVec3 More...
 
- Static Public Member Functions inherited from OpenSim::DataAdapter
static bool registerDataAdapter (const std::string &identifier, const DataAdapter &adapter)
 Register a concrete DataAdapter by its unique string identifier. More...
 
- Static Protected Member Functions inherited from OpenSim::DataAdapter
static std::shared_ptr< DataAdaptercreateAdapter (const std::string &identifier)
 Creator of concrete DataAdapter(s) for the specified source type by its unique identifier (string). More...
 

Detailed Description

APDMDataReader is a class that reads files produced by IMU manufacturer APDM and produces datatables from them.

This is intended to help consume IMU outputs.

Constructor & Destructor Documentation

◆ APDMDataReader() [1/2]

OpenSim::APDMDataReader::APDMDataReader ( )
default

◆ APDMDataReader() [2/2]

OpenSim::APDMDataReader::APDMDataReader ( const APDMDataReaderSettings settings)
inline

◆ ~APDMDataReader()

virtual OpenSim::APDMDataReader::~APDMDataReader ( )
virtualdefault

Member Function Documentation

◆ clone()

APDMDataReader* OpenSim::APDMDataReader::clone ( ) const
overridevirtual

Implements OpenSim::DataAdapter.

◆ extendRead()

DataAdapter::OutputTables OpenSim::APDMDataReader::extendRead ( const std::string &  fileName) const
overrideprotectedvirtual

Typically, APDM can export a trial as one .h5 file (binary that we don't parse as of now) or as .csv ASCII text file that is comma delimited, grouped in order by sensor.

The function below reads the csv file . It produces a list of tables depending on the contents of the file read.

  • One table for rotations,
  • one for LinearAccelerations
  • one for MagneticHeading data,
  • one for AngularVelocity data.
  • Barometer and Temperature data is ignored for now

    See also
    IMUDataReader class for utilities to extract/access specific table(s)

Implements OpenSim::DataAdapter.

◆ extendWrite()

virtual void OpenSim::APDMDataReader::extendWrite ( const DataAdapter::InputTables tables,
const std::string &  sinkName 
) const
inlineoverrideprotectedvirtual

Implements writing functionality, not implemented.

Implements OpenSim::DataAdapter.

◆ getSettings()

const APDMDataReaderSettings& OpenSim::APDMDataReader::getSettings ( ) const
inlineprotected

Method to get const reference to the internal APDMDataReaderSettings object maintained by this reader.

◆ updSettings()

APDMDataReaderSettings& OpenSim::APDMDataReader::updSettings ( )
inlineprotected

Method to get writable reference to the internal APDMDataReaderSettings object maintained by this reader, to allow modification after construction.

Member Data Documentation

◆ acceleration_labels

const std::vector<std::string> OpenSim::APDMDataReader::acceleration_labels
static

◆ angular_velocity_labels

const std::vector<std::string> OpenSim::APDMDataReader::angular_velocity_labels
static

◆ magnetic_heading_labels

const std::vector<std::string> OpenSim::APDMDataReader::magnetic_heading_labels
static

◆ orientation_labels

const std::vector<std::string> OpenSim::APDMDataReader::orientation_labels
static

◆ TimeLabel

const std::string OpenSim::APDMDataReader::TimeLabel
static

The documentation for this class was generated from the following file: