CardioMetrics (alphaHRV desktop style)

Hello,

I present you (in alpha phase) my CardioMetrics application, the idea was to have an alphaHRV Desktop, in this case we took advantage and added the electrocardiogram and also the SMO2 measurement. Everything can be saved in a csv on demand for later analysis. It is in alpha phase and has not yet been released for testing.
The problem I am encountering is that the smo2 sensor is connected via bluetooth and there is no documentation on how the data is received via ANT+ to be able to return correct tHB values. If anyone has experience with BLE and NIRS sensors can comment.

The web app is in typescript, react and vite.

Thanks




3 Likes

Thanks for this, what is the website Luis? for testing

1 Like

I haven’t tested it yet but if you are interested I can give you the link to try it out.

1 Like

I have experience with implementing support for the Moxy sensor for web and iOS. I’ve also implemented ANT+ demo library for the web browser. But I am not sure I understand the description
of the problem:

The problem I am encountering is that the smo2 sensor is connected via bluetooth and there is no documentation on how the data is received via ANT+ to be able to return correct tHB values. If anyone has experience with BLE and NIRS sensors can comment.

Is it ANT+ or BLE?

The problem I have with BLE, it seems that it sends the data in a different way to ANT+, smo2 if I have it under control but thb there is no way to return the same values as ANT+.

Here is a snippet in Swift that handles SmO2 Data characteristic from a Moxy device:

struct SmO2SensorData {
    static let smo2Resolution: Double = 0.1
    static let thbResolution: Double = 0.01

    struct Decoded {
        let sensorCount: UInt16?
        let currentSaturatedHemoglobin: Double?
        let previousSaturatedHemoglobin: Double?
        let totalHemoglobinSaturation: Double?
        let requestTimeSetBit: UInt8?
    }

    static func decode(_ data: Data) -> Decoded {
        var input = data[...]

        return Decoded(
            sensorCount: uint16.parse(&input),
            currentSaturatedHemoglobin: uint16.parse(&input).map { Double($0) * smo2Resolution },
            previousSaturatedHemoglobin: uint16.parse(&input).map { Double($0) * smo2Resolution },
            totalHemoglobinSaturation: uint16.parse(&input).map { Double($0) * thbResolution },
            requestTimeSetBit: uint8.parse(&input)
        )
    }
}

And here is my open-source web implementation: Auuki/src/ble/moxy/moxy.js at master · dvmarinoff/Auuki · GitHub

let me know if any of that help?

2 Likes

@dmarinov thanks for this one! do you know if can values can be plotted in Zwift or graphs?

I don’t think that Zwift can connect to any SmO2 sensor. But this CardioMetrics app looks neat. Maybe @Luisma_Gallego_Soy_P will share more about it.

1 Like

Thanks, I am going to try it but I think they send different data.

Of course, when it is finished, it will be shared for everyone.

3 Likes

@Luisma_Gallego_Soy_P Any update ?

I need to get back to it, but the problem is a lack of time and resources.

6 Likes