HealthKit how to get distance and pace - apple-watch

I'm writing a watch app and I'm trying to find the best way to get distance and pace for current HKWorkoutSession.
I can get steps from HealthKit and use it as a source of distance and pace but I don't think it's the best solution.
Thank you!

I think HKQuantityType.quantityType(forIdentifier: .distanceWalkingRunning) is exactly what I'm looking for.

Related

tips of easy to start tutorials/guides

I want to try out Micrpopython (as a beginner) and I want some tips for some easy tutorials to get started. What I have in mind of something fun, to begin with, would be a temperature sensor that activates a LED light when a certain temperature is exceeded (or other type of warning).
Any tips?
A good start will be through the official doc, They provided you with all the information needed to use it, whether you want to use esp32 or esp8266 and if you need more information about coding or anything else you can visit GitHub here, there's also a lot of courses on Udemy if you want, but for me, GitHub was great.

Tower of Hanoi, graph requirements

Hi we are trying to find out what are the minimal requirements for a graph to be able to solve the hanoi problem.
Where the vertex are the pegs, and each edge represent a possible movement from one peg to another.
So basicly its Hanoi problem with restrictions that tell us what are our possible moves.
There can be any number of pegs and any number of discs.
So far we found that we need a strongly connected graph. but there is no explanation why.
If anyone can shed some light on the subject it will be appreciated, thank you!

Tango Unity Object Recognition

I'm actually making a tango application using unity, but i have an hard time with this technology, especially with how to use the cloud point.
I want to be able to compare an object in the room with a library of model when i press it on the screen. For this i want to use the cloud point system. And i think that the best way to do this is to recognise the floor under the object that interest me and get all the point above it.
My problem is here, i don't know how ask unity to get that point cloud, and compare it with the model in my library.How do i know in the TangoPointCloudData which point get which index? Is it possible to get a floor if there is an object on it?
I know it's a lot of question, and it's not the more precise thing i could give you, but i hope you will find a way to answer me.
Thanks.

How to use Math.NET Neodym Signal Processing Library to Filter Frequencies?

I have streaming continuous data that I need to filter by frequency. I have high-level knowledge of FFT and frequency filtering, but no real practical knowledge.
After searching for a suitable library to aid me, I came across Math.NET's Neodym Signal Processing Library (https://mathnetneodym.codeplex.com/releases/view/91769)
I downloaded it, upgraded it to VS2010 and used the SignalGenerator class to generate various sine wave of various frequencies. It worked great.
Now, I need to know how to filter dynamic data. This StackOverflow question seems to come the closest to mine, and is a good start:
Filtering continuous data, how to get rid of transients?
There is a .chm file in the downloaded project, but it seems to just be the API documentation. I need some high-level help just pointing me in the right direction to use the library.
Can anybody provide a good resource to refer to so I can use this library for my purpose?
Thank you!
John
UPDATE
I'm pretty sure I use the OnlineFilter.CreateBandpass static function with the mode ImpulseResponse.Infinite... but I'll post whatever I find out.

Basic route information with Cloudmade

I am trying to use CloudMade's route-me service in my application. All I need from the service is driving distance between two locations, I don't want to display it in a map.
There doesn't seem to be any tutorial in CloudMade's website that handles this. I mailed to the support address they have provided. Nothing back from them so far. Any help from people who done this before would be highly appreciated.
I lost hope with this one, and asked for an alternate option, and found a good solution with CloudMade after all.
Calculating driving distance in iPhone