Running Manager  1.7
API for Running Manager (https://github.com/HWiman-ICONIC/running-manager)
D:/dev/running-manager/Zone.h
Go to the documentation of this file.
1 #pragma once
2 
3 #include <Defines.h>
4 #include <boost/shared_array.hpp>
5 
12 struct Zone {
16  Zone() {}
17 
26  Zone(PTZone zone, wxString shortName, wxString description, double minPercent, double maxPercent);
27 
29  wxString shortName;
30  wxString description;
31  double minPercent;
32  double maxPercent;
33  wxTimeSpan minPace;
34  wxTimeSpan maxPace;
35 
36  wxTimeSpan GetAveragePace() const;
37  wxTimeSpan GetTimeSpan( wxString const & s );
38  static void GetMinSec( wxTimeSpan const &dt, int &minutes, int &seconds );
39  static wxString GetTimeString( wxTimeSpan const &dt, PTUnit const &unit );
40  static boost::shared_array<Zone> GetZoneMap();
41  static boost::shared_array<Zone> cpZones;
42 
43 };
44 
45 static Zone gZoneMap[] = {
46  Zone(ZONE0, _("Zone 0"), _("Rest"), 0, 75),
47  Zone(ZONE1, _("Zone 1"), _("Really slow. You really hold yourself back."), 75, 80),
48  Zone(ZONE2, _("Zone 2"), _("Slow. You hold back a little and do not push yourself."), 81, 89),
49  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),
50  Zone(ZONE4, _("Zone 4"), _("Hard. You could hold this pace for 10 min (less trained) or 15 min (well trained)."), 102, 105),
51  Zone(ZONE5, _("Zone 5"), _("Very hard. You can only hold this pace for one or two minutes, maybe less."), 106, 130)
52 };
static boost::shared_array< Zone > cpZones
Definition: Zone.h:41
Zone 1.
Definition: Defines.h:59
PTUnit
Unit.
Definition: Defines.h:69
Zone 3.
Definition: Defines.h:61
wxTimeSpan GetTimeSpan(wxString const &s)
static void GetMinSec(wxTimeSpan const &dt, int &minutes, int &seconds)
wxTimeSpan minPace
Definition: Zone.h:33
wxTimeSpan GetAveragePace() const
Zone 5.
Definition: Defines.h:63
wxString description
Definition: Zone.h:30
Zones.
Definition: Zone.h:12
PTZone
Intensity zones.
Definition: Defines.h:57
Zone()
Constructor.
Definition: Zone.h:16
Zone 2.
Definition: Defines.h:60
static boost::shared_array< Zone > GetZoneMap()
double maxPercent
Definition: Zone.h:32
wxString shortName
Definition: Zone.h:29
static wxString GetTimeString(wxTimeSpan const &dt, PTUnit const &unit)
wxTimeSpan maxPace
Definition: Zone.h:34
double minPercent
Definition: Zone.h:31
PTZone zone
Definition: Zone.h:28
Zone 4.
Definition: Defines.h:62
No zone.
Definition: Defines.h:58
static Zone gZoneMap[]
Definition: Zone.h:45