VitalVision is a cross-platform application designed to visualize real-time data from wearable sensors. Developed as a bachelor project at ETH Zurich's Sensing, Interaction & Perception Lab (SIPLAB), this application connects to multiple wearable devices, streams their sensor data, and provides live visualizations upon the user's request. The app supports sensors similar to those found in devices like the Apple Watch or Fitbit, and it includes features for real-time signal validation and error detection.
The VitalVision project is divided into three main components:
- Core Library (
/core): Handles the core logic of the application, including BLE communication, data storage, and analysis. Written in Rust for performance and safety. - iOS Frontend (
/ios): Provides the user interface for iOS devices. Developed in Swift, UI components use SwiftUI and SwiftCharts. - Signal Playgrounds (
/signal): Contains Python code used for developing and testing the signal processing algorithms before they were implemented in Rust.
- Navigate to the
/coredirectory. - Run the build script:
This script runs
./build-ios.shcargo build, generates Swift bindings, and then drops a.xcframeworkinto theios/Frameworkfolder. - Open the
ios/VitalVision.xcodeprojfile in Xcode. - Select your target device and click the play button to build and run the app.
For developing without devices, the app also includes a "Mock Devices" toggle in the settings.
- lib.rs: The main entry point of the core library, handling the initialization and coordination of various components. Defines the
VVCoreinterface and integrates with UniFFI. - BLE Component: Manages Bluetooth communication, device discovery, and data streaming. Uses the
btlepluglibrary for BLE operations. - Storage Component: Uses a ring buffer for efficient storage and retrieval of new data points.
- Analysis Component: Processes ECG and PPG data to provide real-time quality assessment.
- vvcore.udl: Defines the UniFFI interface, from which Swift, Kotlin and Python bindings can be generated. Allows seamless communication between the Rust core and the Swift frontend.
- VitalVisionCore: Handles communication with the Rust core and provides data to the UI. Manages the lifecycle of the Rust core and interfaces with UniFFI.
- NotificationService: Manages notifications for low signal quality, ensuring users are alerted when data quality drops.
- Views: Various SwiftUI views to visualize devices and their channels, introspect data, see signal quality warnings, watch, and annotate devices. Includes:
- Device list and detail views
- Channel data visualization
- Signal quality indicators
- Settings and configuration screens
- AppConfig: Allows customization of all parameters through user settings, stored using SwiftUI's
@AppStorage.
- Author detailed documentation for the different core components and the iOS frontend.
- Clean up the repo commit history, the recent commits are bit of a mess.
- Ensure feature parity between the iOS and macOS frontends.
I would like to express my gratitude towards the Sensing, Interaction & Perception Lab at ETH Zurich for their support throughout this project. Special thanks to Manuel Meier for the opportunity and guidance that made this project possible.