Photoplethysmography (PPG)
What is PPG?#
Photoplethysmography (PPG) is a non-invasive optical technique that measures blood-volume changes in microvascular tissue: a sensor emits light into the skin and measures how much is absorbed or reflected by blood vessels. It is widely used in fitness and medical wearables to monitor heart rate in real time. For the sensor details, sampling rate, and how the signal becomes metrics, see Concept: Biometry (PPG). This page focuses on how PPG is exposed in the Unity plugin.
PPG in the Unity plugin#
PPG is part of the device's biometry subsystem, produced by a single PPG sensor. In the plugin it is accessed through the TsPpgProvider component, which wraps the native IPpg interface, starts streaming when the device connects, and exposes the latest processed data.
Key features#
- Automatic streaming: the provider starts and stops streaming with the device connection and the component's enabled state.
- Processed heart rate: heart rate in beats per minute, with a validity flag on each value.
- Per-frame polling: read the latest data each frame with
GetData.
Description of PPG data#
The provider exposes processed heart-rate data through GetData(), which returns an IProcessedPpgData with one entry per sensor node. The physiological meaning is covered in Concept: Biometry (PPG).
Heart rate#
Each node carries:
- Heart rate: beats per minute, calculated from the interval between successive beats.
- Validity flag: whether the value was measured or estimated. During movement, signal artifacts can make direct measurement unreliable, so an extrapolation keeps the stream continuous; the flag shows which is which.
Heart-rate variability (HRV) and the raw optical signal are part of the native subsystem but are not surfaced by TsPpgProvider; reach the C# SDK directly if you need them.
What to read next#
Concepts#
- Concept: Biometry (PPG): the full conceptual background, the sensor, LED wavelengths, sampling rate, and calibration.
Reference#
- Biometry reference: the
TsPpgProvidercomponent.
Examples#
- PPG viewer: stream and display heart-rate data.
