1 страниц (7 вхождений)
Calorie burned calc - GPS + SMath - Сообщения
#1 Опубликовано: 13.11.2016 21:25:42
Beware Google English! )))
Hello,
on the occasion I began to seek calorie calculator for my GPS navigator without finding anything decent, wrote a little code for track processing.
Source of formulas for calories calculation (walking): http://www.shapesense.com/fitness-exercise/calculators/walking-calorie-burn-calculator.shtml
Source of formulas for GPS distance calculation: https://en.wikipedia.org/wiki/Great-circle_distance
Calculations of GPS distance were tested on GoogleEarth.
Calculations of calories were tested on SportTracks software (Power Based plugin).
Source data file – OziExplorerCE track file.
Some comments:
- distance calculations are correct for north latitude + east longitude!!!
- I use GPS nav altitude sensor instead of GPS altitude;
- GPS data are filtered and smoothed to remove serious GPS noise and errors;
- there is a slight inaccuracy in the GPS data filtering, resulting in a loss of 2 calories per 10 kilometers, but I think this is not essential;
- altitude profile is inserted for demonstration purposes only, it is a very slow drawn.
Working with matrices in a loop takes a lot of computing time, I optimized the code as much as possible, within my knowledge of SMath.
It turned out that it is better to work with strings, with the columns the time increases significantly.
I used version 0.90 to run on WinCE.
If someone interested in the code, I will modify it to use everywhere (not only in north latitude + east longitude) and to be more user friendly
Файл не найден.Файл не найден.
Hello,
on the occasion I began to seek calorie calculator for my GPS navigator without finding anything decent, wrote a little code for track processing.
Source of formulas for calories calculation (walking): http://www.shapesense.com/fitness-exercise/calculators/walking-calorie-burn-calculator.shtml
Source of formulas for GPS distance calculation: https://en.wikipedia.org/wiki/Great-circle_distance
Calculations of GPS distance were tested on GoogleEarth.
Calculations of calories were tested on SportTracks software (Power Based plugin).
Source data file – OziExplorerCE track file.
Some comments:
- distance calculations are correct for north latitude + east longitude!!!
- I use GPS nav altitude sensor instead of GPS altitude;
- GPS data are filtered and smoothed to remove serious GPS noise and errors;
- there is a slight inaccuracy in the GPS data filtering, resulting in a loss of 2 calories per 10 kilometers, but I think this is not essential;
- altitude profile is inserted for demonstration purposes only, it is a very slow drawn.
Working with matrices in a loop takes a lot of computing time, I optimized the code as much as possible, within my knowledge of SMath.
It turned out that it is better to work with strings, with the columns the time increases significantly.
I used version 0.90 to run on WinCE.
If someone interested in the code, I will modify it to use everywhere (not only in north latitude + east longitude) and to be more user friendly

#2 Опубликовано: 13.11.2016 22:13:35
For sure I understand nothing, unless you are a "walking bird".
Calories burned surly depend upon wind angle/speed/resistance ...
1. Air specific weight vs altitude : we have in Smath
2. Given long/lat of two points: the distance is "Vincenti" [attached].
Jean
Angle Vincenty Earth Distance [Mike].sm (30 КиБ) скачан 52 раз(а).
Calories burned surly depend upon wind angle/speed/resistance ...
1. Air specific weight vs altitude : we have in Smath
2. Given long/lat of two points: the distance is "Vincenti" [attached].
Jean
Angle Vincenty Earth Distance [Mike].sm (30 КиБ) скачан 52 раз(а).
#3 Опубликовано: 14.11.2016 04:24:17
WroteFor sure I understand nothing, unless you are a "walking bird".
Calories burned surly depend upon wind angle/speed/resistance ...
1. Air specific weight vs altitude : we have in Smath
2. Given long/lat of two points: the distance is "Vincenti" [attached].
Jean
Angle Vincenty Earth Distance [Mike].sm (30 КиБ) скачан 52 раз(а).
1. - I dont understand this point if it is about using of altitude/pressure sensor, then GPS give me all needed data.
(I just said about my preference to pressure based altitude data vs GPS based)
2. - think, I do the same calculs (can't read the .sm file).
#4 Опубликовано: 14.11.2016 10:03:18
Wrote1. - I dont understand this point if it is about using of altitude/pressure sensor, then GPS give me all needed data.
(I just said about my preference to pressure based altitude data vs GPS based)
2. - think, I do the same calculs (can't read the .sm file).
[2]... the work sheet is Smath version 5346. Can't see why it doe not open ?
[1]... "local pressure" as you know varies as per the local altitude.
The local pressure may vary ± 2 kPa depending upon atmospheric conditions.
Typical: at Mexico city, water boils at 86°C.
Altimetric pressure is given vs altitude [OIAC, ISA ...], as well as rho.
If you don't like GPS altitude, and prefer altitude from measured pressure
the task is to inverse the pressure function.
From recollection, pressure is given in two segments of altitude:
kPa => 0..11000m ... kPa => 11000m..20000m.
These two segments may be inversed easily, they are exp(,) functions.
I have to check on that. In short: if you have a good absolute pressure
meter, you can know accurately the altitude. I still have contact with
Ralph Carmichael, specialist in those things. BTW: visit Smath WIKI
there is something from NASA.
RESUME: directly or indirectly, you can have accurate altitude vs measured
pressure. Would that do ?
Jean
#5 Опубликовано: 14.11.2016 11:29:20
... the segment [11..20 km is done.
... the segment [-0.5..11km] is possible, maybe before dark.
This egment is rougly exponential as well but better rational
as given in the "Inst_ISA[kPa].sm"
"Inst_NASA.sm" is the one from Smath WIKI mentonned before.
Jean
Inst_ISA [kPa].sm (14 КиБ) скачан 43 раз(а).
Page3 OIAC 20km.sm (10 КиБ) скачан 38 раз(а).
Inst_NASA_atmosphere.sm (14 КиБ) скачан 34 раз(а).
... the segment [-0.5..11km] is possible, maybe before dark.
This egment is rougly exponential as well but better rational
as given in the "Inst_ISA[kPa].sm"
"Inst_NASA.sm" is the one from Smath WIKI mentonned before.
Jean
Inst_ISA [kPa].sm (14 КиБ) скачан 43 раз(а).
Page3 OIAC 20km.sm (10 КиБ) скачан 38 раз(а).
Inst_NASA_atmosphere.sm (14 КиБ) скачан 34 раз(а).
#6 Опубликовано: 14.11.2016 15:16:26
Wrote
...
RESUME: directly or indirectly, you can have accurate altitude vs measured
pressure. Would that do ?
I do not know if I understood exactly what you are trying to convey to me, but:
1) I do not need accurate absolute altitude data to calculate the power consumed when walking, requires only accurate elevation change (delta h) which:
2) - is calculated based on the altitude sensor data that is integrated into GPS device, and which obviously works on the basis of data about atmospheric pressure.
3) the data is directly recorded into the GPS track and I use it for computing.
4) the formula on which based conversion of the pressure into altitude in the Navigator, I do not know, but I trust the manufacturer )))))
5) satellite data on the current height is incorrectly recorded near the high-rise buildings and in the forest, so the built-in altitude sensor is used.
Altitude data from the pressure sensor is highly noisy because of small pressure drops during movement when the navigator is, for example, in a pocket, in order to suppress the noise, I replaced each measurement to average of three consecutive measurements.
File with the formulas I opened in the new version SMath, yes, I also use a special case of Vincenty formula, a link to a wiki page I gave in the first post.
Yes, in general, in this simple program code only my contribution is - consistent filtering of GPS track data by removing sharp jumps in the case of loss of the satellite.
Nevertheless, many thanks for the tips!
Nikolay.
#7 Опубликовано: 14.11.2016 16:20:45
1 страниц (7 вхождений)
-
Новые сообщения
-
Нет новых сообщений