-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathZone.h
52 lines (45 loc) · 1.84 KB
/
Zone.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
#pragma once
#include <Defines.h>
#include <boost/shared_array.hpp>
/**
* @brief Zones.
*
* A zone is defined by a heart rate interval, speed interval and/or feeling.
* @todo Enable defining zones with boost property_tree and xml
*/
struct Zone {
/**
* @brief Constructor
*/
Zone() {}
/**
* @brief Constructor
* @param zone Zone
* @param shortName Human readable name
* @param description Human readable description of feeling
* @param minPercent Min heart rate
* @param maxPercent Max heart rate
*/
Zone(PTZone zone, wxString shortName, wxString description, double minPercent, double maxPercent);
PTZone zone;
wxString shortName;
wxString description;
double minPercent;
double maxPercent;
wxTimeSpan minPace;
wxTimeSpan maxPace;
wxTimeSpan GetAveragePace() const;
wxTimeSpan GetTimeSpan( wxString const & s );
static void GetMinSec( wxTimeSpan const &dt, int &minutes, int &seconds );
static wxString GetTimeString( wxTimeSpan const &dt, PTUnit const &unit );
static boost::shared_array<Zone> GetZoneMap();
static boost::shared_array<Zone> cpZones;
};
static Zone gZoneMap[] = {
Zone(ZONE0, _("Zone 0"), _("Rest"), 0, 75),
Zone(ZONE1, _("Zone 1"), _("Really slow. You really hold yourself back."), 75, 80),
Zone(ZONE2, _("Zone 2"), _("Slow. You hold back a little and do not push yourself."), 81, 89),
Zone(ZONE3, _("Zone 3"), _("Medium Hard. You could hold this pace in 20-30 min (less trained) or 50-60 min (well trained)."), 96, 100),
Zone(ZONE4, _("Zone 4"), _("Hard. You could hold this pace for 10 min (less trained) or 15 min (well trained)."), 102, 105),
Zone(ZONE5, _("Zone 5"), _("Very hard. You can only hold this pace for one or two minutes, maybe less."), 106, 130)
};