Code Monkey home page Code Monkey logo

Comments (5)

k0rventen avatar k0rventen commented on June 6, 2024

hi, could you provide a example record from your export.xml file containing the distance unit in miles ? (and also the speed in mph) ?

For example with types _ HKQuantityTypeIdentifierWalkingSpeed_ and _ HKQuantityTypeIdentifierDistanceWalkingRunning_:

<Record type="HKQuantityTypeIdentifierWalkingSpeed" sourceName="test-device" sourceVersion="15.1.1" device="Dummy device" unit="km/hr" creationDate="2021-11-30 11:45:34 +0200" startDate="2021-11-30 10:58:57 +0200" endDate="2021-11-30 10:59:04 +0200" value="2.952" />
and
<Record type="HKQuantityTypeIdentifierDistanceWalkingRunning" sourceName="test-device" sourceVersion="8.1" device="Dummy device" unit="km" creationDate="2021-12-01 21:00:49 +0200" startDate="2021-12-01 20:59:08 +0200" endDate="2021-12-01 20:59:18 +0200" value="0.01266" />

Also if you are referring to the data from a Workout Route, the speed is computed from the distance between two GPS coordinates, and is then stored in m/s. The dashboard then multiplies the value by 3.6.

from apple-health-grafana.

paulraison avatar paulraison commented on June 6, 2024

Yes of course:-

<Record type="HKQuantityTypeIdentifierDistanceWalkingRunning" sourceName="Paul’s Apple Watch" sourceVersion="6.1" device="&lt;&lt;HKDevice: 0x283239ea0&gt;, name:Apple Watch, manufacturer:Apple Inc., model:Watch, hardware:Watch3,3, software:6.1&gt;" unit="mi" creationDate="2019-12-06 11:48:33 +0100" startDate="2019-12-06 11:48:05 +0100" endDate="2019-12-06 11:48:08 +0100" value="0.00746627"/>

<Record type="HKQuantityTypeIdentifierWalkingSpeed" sourceName="Paul’s iPhone 13 Pro" sourceVersion="14.0" device="&lt;&lt;HKDevice: 0x283290690&gt;, name:iPhone, manufacturer:Apple Inc., model:iPhone, hardware:iPhone12,3, software:14.0&gt;" unit="km/hr" creationDate="2020-09-25 18:29:42 +0100" startDate="2020-09-25 15:41:30 +0100" endDate="2020-09-25 15:41:46 +0100" value="3.96"/>

from apple-health-grafana.

k0rventen avatar k0rventen commented on June 6, 2024

thx, I'll try and find some time tomorrow to implement the check. Regarding the dashboard, AFAIK Grafana doesn't allow panels units to be changed according to a variable or a tag (which would be our unit). I'll verify to be sure, but a workaround would be to have a dashboard in SI units, and another one in imperials.

from apple-health-grafana.

k0rventen avatar k0rventen commented on June 6, 2024

So as it stands there is no way to detect the unit set as a tag in influx (e.g unit=mile) from Grafana and adjust the unit based on it. The only solution is to duplicate the current dashboards and create a "Imperial units version". You can open a PR with the new dashboards, I'll be happy to merge them.

from apple-health-grafana.

k0rventen avatar k0rventen commented on June 6, 2024

closing /stale

from apple-health-grafana.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.