Follow

MVNX Version 4 - File Structure

In MVN it is possible to export a file in the MVNX format (MVN Open XML format). These are XML files that can be opened in programs such as Microsoft Excel, Access, MATLAB and C-Motion Visual 3D.

The variables that can be exported in the MVNX format can be selected by clicking in "Show options" in the export window. 

mceclip0.png

The MVN Fusion Engine calculates the position and orientation, and other kinematic data of each body segment, B, with respect to an earth-fixed reference co-ordinate system, G. By default, the earth-fixed reference co-ordinate system used is defined as a right handed Cartesian co-ordinate system.

The axes of the Global reference system are defined as: 

  • X (red) pointing to the local magnetic North.
  • Y (green) according to right-handed coordinate system (West)
  • Z (blue) pointing up

The axes of each body frame (B) are aligned with this Global reference frame (G) when the subject is standing in the T-pose.

 

Initialization

The MVNX file starts with the XML version number and a reference to the DTD (Document Type Definition). Then the root element “mvnx” with a reference to the XSD (XML Schema Definition) and the MVNX version. 

<?xml version="1.0" encoding="UTF-8"?>
<mvnx xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://www.xsens.com/mvn/mvnx" xsi:schemaLocation="http://www.xsens.com/mvn/mvnx http://www.xsens.com/mvn/mvnx/schema.xsd" version="4">

This is followed by a field “mvn”, containing the MVN Analyze/Animate version and build details with which this MVNX file was produced, followed by the comments that were added to the original recording:

<mvn version="..." build="..."/>
<comment>...</comment>

The file continues with session information, including the suit label (= name of the MVN System), sample frequency used, number of segments calculated (indicating full or half body); the date that the recording took place, and the filename of the original recording on which the MVNX file is based. When creating a recorded file, a user can insert a comment.


<subject label=".." torsoColor="#21ae00" frameRate="240" segmentCount="23" recDate="week day month day time year" recDateMSecsSinceEpoch="1517300960213" originalFilename="DIRECTORY\FILENAME.mvn" configuration="FullBody" userScenario="singleLevel" processingQuality="HD">
<comment>...</comment>

 

Segments

The section <segments> defines all positions (pos_b) of connecting joints (prefixed with a “j”) and anatomical landmarks (prefixed with a “p”) with respect to origin of that segment (in body fame B). 
The structure for each segment is as follow: 

<segments>
<segment label=“RightUpperLeg” id=“
16”>
                <points>
                       <point label="jRightHip">
                              <pos_b>
0.000000 0.000000 0.000000</pos_b>
                       </point>
                       <point label="jRightKnee">
                               <pos_b>
0.000000 0.000000 -0.423469</pos_b>
                       </point>

                       etc.
                 </points>
</segment>

 

Sensor Data

The sensor data is simply a list of the names of segments measured with the MT’s:

<sensors>
         < sensor label ="Pelvis"/>
         < sensor label ="Head"/>
         < sensor label ="RightShoulder"/>
         etc.
</sensors>

 

Joints Data

The “joints” section is a list of the names of joints containing the segments and connections of a given joint.

<joints>
        <joint label=“ jLeftHip”>
               <connector1>Pelvis/jLeftHip </connector1>
               <connector2>LeftUpperLeg/jLeftHip </connector2>
         </joint>
         etc.
</joints>

 

Ergonomic Joint Data

The “ergonomic joint angles” section is a list of specific joint angles used in ergonomic analysis contained, and the segments and connections for each given joint:

<ergonomicJointAngles>
          <ergonomicJointAngle label=“ T8_Head” index="0" parentSegment="T8" childSegment="Head"/>
          etc.
</ergonomicJointAngles>

 

Foot Contact Detection

The “foot contact definition” section is a list of the given foot contact points, and their index in the foot contact definition array for every given time frame, if the point is in contact with the ground, it is given the value 1, whilst if it is not in contact, given the value 0:

<footContactDefinition>
                      <contactDefinition label="LeftFoot_Heel" index="0"/>
                      <contactDefinition label="LeftFoot_Toe" index="1"/>
                      <contactDefinition label="RightFoot_Heel" index="2"/>
                      <contactDefinition label="RightFoot_Toe" index="3"/>
</footContactDefinition>

 Note: It is important to notice that the way contact points are calculated in the MVNX format is different from the way the contact points are represented in MVN. In MVN multiple segments can have contact points and the contact points are defined in each bony landmark. Contrarily, in MVNX only 4 contact points are available and they are not on the bony landmarks of the segment: 

  • LeftFoot_Heel
  • LeftFoot_Toe
  • RightFoot_Heel
  • RightFoot_Toe

Frames

The frames section is opened with the segment, sensor and joint count. The data of all parameters are contained within this section, including the calibration pose data.

<frames segmentCount="23" sensorCount="17" jointCount="22">

The frame type “identity” denotes the nullpose or identity pose. All segment orientations in this pose are aligned with the global coordinates and have unit quaternion.

<frame time="0" index="" tc="00:00:00:000" ms="0" type="identity">
       <orientation>
1 0 0 0 1 0 0 0 1 0 0 0 1 0 0 0 1 0 0 0 1 0 0 0 1 0 0 0 1 0 0 0 1 0 0 0 1 0 0 0 1 0 0 0 1 0 0 0 1 0 0 0 1 0 0 0 1 0 0 0 1 0 0 0 1 0 0 0 1 0 0 0 1 0 0 0 1 0 0 0 1 0 0 0 1 0 0 0 
 </orientation>
<position>...</position>
</frame>

The frame type “tpose” describes the positions and orientations of all segments in the T-pose. The positions and orientations of certain segments deviates slightly from the identity pose.

<frame time="0" index="" tc="00:00:00:000" ms="0" type="tpose">
       <orientation>
...</orientation>
       <position>...
</position>
</frame>

The frame type “tpose-isb” describes the positions and orientations of all segments in the T-pose, but using the MVN anatomical frame for the body segments. The MVN anatomical frame is used to calculate the joint angles.

<frame time="0" index="" tc="00:00:00:000" ms="0" type="tpose-isb">
        <orientation>...
</orientation>
        <position>
...</position>
</frame>

Following this, the frames are split into time. each frame increment is equivalent to ([frame no. /update rate]*1000 [ms]). Frames measured during a normal session are denoted with type = “normal”.

<frame time="0" index="0" tc="08:29:20:050" ms="1517300960209" type="normal">
             <orientation>
GB-q_seg1 GB-q_seg2 … GB-q_seg23</orientation>
             <position>
G-pos_seg1 G-pos_seg2 … G-pos_seg23</position>
             <velocity>
G-v_seg1 G-v_seg2 …G-v_seg23</velocity>
             <acceleration>
G-a_seg1 G-a_seg2 … G-a_seg23</acceleration>
             <angularVelocity>
G-w_seg1 G-w_seg2 … G-_wseg23</angularVelocity>
             <angularAcceleration>
G-aw_seg1 G-aw_seg2 … G-aw_seg23</angularAcceleration>
             <footContacts>I1 I2 I3 I4 </footContacts>
             <sensorFreeAccelerati
on>S-a_sen1 S-a_sen2 … S-a_sen17</sensorFreeAcceleration>
             <sensorMagneticField>S-m_sen1 S-m_sen2 … S-m_sen17
</sensorMagneticField>
<sensorOrientation>GS-q_sen1 GS-q_sen2 … GS-q_sen17</sensorOrientation>
             <jointAngle>j_jnt1 j_jnt2 …j_jnt22</jointAngle>
             <jointAngleXZY>j_jntx1 j_jntx2 … j_jntx22</jointAngleXZY>
             <jointAngleErgo>JE_jnt1 JE_jnt2 … JE_jnt4</jointAngleErgo>
             <jointAngleErgoXZY>JE_jntx1 JE_jntx2 …JE_jntx4</jointAngleErgoXZY>
             <centerOfMass>G-CM</centerOfMass>

</frame>

Time description: 

time each frame increment is equivalent to ([frame no. /update rate]*1000 [ms]). For example For a 240Hz frame rate, the increment time is 4.16ms.
index contains the original frame number
tc time code values, i.e. the absolute real time at which that specific frame was recorded (often used to synchronize and combine this recording with other data that was gathered at the same time).
ms contains the absolute time in milliseconds at which a specific frame was recorded with respect to the computation epoch (the start is defined in 1 January 1970)

 

Parameters description:

Parameter Format Units Description

orientation (GB-q_segi)

1x4 vector (q0, q1, q2, q3)

  quaternion orientation of the segment with respect to the global frame.

position (G-pos_seg1)

1x3 vector (x, y, z)

 meters [m] position of the origin of the segment in the global frame.

velocity (G-v_seg1)

1x3 vector (x, y, z)

meter per second  [m/s] velocity  of the origin of the segment in the global frame.

acceleration (G-a_seg1)

1x3 vector (x, y, z) 

meter per second squared [m/s2] acceleration of the origin of the segment in the global frame.

angularVelocity (G-seg1)

1x3 vector (x, y, z)

radians per second [rad/s]  angular velocity  of the segment in the global frame.

angularAcceleration 

(G-wa_seg1)

1x3 vector (x, y, z) 

radians per second squared [rad/s2]  angular acceleration of the origin of the segment in the global frame.

footContacts

(I1 I2 I3 I4)

1x4 vector of boolean values 0 or 1 Boolean vector defining if contact points were detected for each frame.

sensorFreeAcceleration 

(S-a_sen1)

1x3 vector (x, y, z)

meter per second squared [m/s2] sensor free acceleration  of the sensor.

sensorMagneticField 

(S-m_sen1)

1x3 vector (x, y, z)

anatomic units [a.u.]

 sensor magnetic field of the sensor.

sensorOrientation

(GS-q_sen1)

1x4 vector (q0, q1, q2, q3)

  sensor orientation quaternion  of the sensor in the global frame.

jointAngle (j_jnt1)

1x3 vector (x, y, z)

degrees [deg] Euler representation of the joint angle calculated using the Euler sequence ZXY using the ISB based coordinate system.

jointAngleXZY (j_jntx1)

1x3 vector (x, y, z)

degrees [deg] Euler representation of the joint angle  calculated using the Euler sequence XZY using the ISB based coordinate system.
Note: The joint angle using Euler sequence XZY is calculated and exported for all joints, but commonly only used for the shoulder joints, and it may depend on the movement of the shoulder if it is appropriate to use.

jointAngleErgo (JE_jnt1)

1x3 vector (x, y, z)

degrees [deg] Euler representation of the ergonomic joint angles calculated using the Euler sequence ZXY using the ISB based coordinate system.

jointAngleErgoXZY 

(JE_jntx1)

1x3 vector (x, y, z)

degrees [deg] Euler representation of the ergonomic joint angles calculated using the Euler sequence XZY using the ISB based coordinate system.

centerOfMass (G-CM)

1x3 vector (x, y, z)

meters [m] position of the body Center of Mass in the global frame.

 

Was this article helpful?
2 out of 2 found this helpful
Do you have a question? Please post your question in our Community Forum