# Evaluating the Feasibility of Euler Angles for Bed-Based Patient Movement Monitoring
## 2 Methods
### Euler Angles  
One common method for representing an object's orientation in three-dimensional space is by measuring Euler angles relative to a fixed coordinate system. They offer a convenient way to describe an object's rotation along its longitudinal, lateral, and vertical axes, i.e., Euler angles involve rotations around each of the three coordinate axes; thus, they are extensively utilized in aerospace engineering, robotics, and computer graphics. For example, video game programming utilizes Euler angles to animate 3D characters and objects. This study utilizes Euler angles to assess the body posture of patients in bed and monitor their movements over a specific time frame. We examine the changes in Euler angles that occur during common movements performed by patients while lying down. Our goal is to identify distinct patterns in these angle variations that are indicative of these movements. The selection of Euler angles is suitable for this investigation as they offer a straightforward and concise method for representing the orientation of the human body in three-dimensional space. Previous research studies have also made use of Euler angles in their investigations into human body movements [7]. Euler angles provide a reliable method for healthcare professionals to assess body posture and motion accurately. This enables accurate monitoring of patient conditions and allows for necessary adjustments to improve their comfort and overall well-being. For our research purposes, we utilize Xsens DOT sensors (Movella, Inc., Henderson, NV, USA), which include a gyroscope for determining 3D angular velocity, an accelerometer for measuring 3D acceleration, and a magnetometer to detect the earth's magnetic field in three dimensions. The fusion algorithms used by Xsens improve the accuracy of orientation measurements while also enabling detection of free acceleration. Furthermore, Bluetooth technology allows for the precise wireless tracking of human body movements, making it a valuable tool in our study. The orientation provided by Xsens DOT pertains to the alignment of the sensor coordinate system in relation to the local earth coordinate system. An output option available through Xsens DOT is a north-referenced yaw or heading. The default orientation output is presented in an east-north-up (ENU) configuration where the roll, pitch, and yaw are set at 0 degrees, where the x-axis aligns with east, the y-axis with north, and the z-axis upward. In this frame of reference, positive values for x signify magnetic east; positive values for y indicate magnetic north; while Z corresponds to the upwards direction. The system is derived from the rotational movements of aircraft during flight, which are defined by three axes: pitch, roll, and yaw. Pitch refers to the upward or downward movement of an airplane's nose with respect to a horizontal axis running between its wings. Roll entails the side-to-side rotation around an axis extending from the tail to nose of the airplane, enabling it to rock back and forth laterally. Yaw involves rotating around a vertical axis so that the plane's nose moves sideways in either direction horizontally. Refer to Figure 1 for an illustration of pitch, roll, and yaw relative to a patient in both supine and sitting positions. Real-time analysis of a patient's bodily movements can be determined by the specific sequence of rotational actions. For instance, in Figure 1, when a patient tries to sit up from a supine position, pitch is identified first followed by roll. The system has the capability to notify healthcare professionals if assistance may be needed for the patient. Conversely, an immediate intervention is required when pitch immediately follows after both roll and pitch, indicating that the individual fell forward while trying to stand up after sitting upright. To put it concisely, the specific sequence of rotational movements mentioned above has corresponding effects on a patient's bodily stance and motion.