1 package net.sf.tourviewer.lib.ciclo;
2
3
4
5 public class HAC4Info3Block extends AbstractBlock {
6
7 private int totalAltitudeDown;
8 private int totalAltitudeUp;
9 private int maxAltitiude;
10 private long totalTravelTime;
11 private int lastCCOffset;
12 private int lastDDOffset;
13 private int lastCompareOffset;
14
15 public HAC4Info3Block(int[] data) {
16 super(data);
17
18 this.totalAltitudeDown = getHex(0);
19 this.totalAltitudeUp = getHex(1);
20 this.maxAltitiude = getHex(2);
21 this.totalTravelTime = getHexH(3) * 3600 + getHexL(3) * 3600 * 100
22 + getHexH(4) + getHexL(4) * 60;
23 this.lastCCOffset = getHex(5);
24 this.lastDDOffset = getHex(6);
25 this.lastCompareOffset = getHex(7);
26 }
27
28 public String toString()
29 {
30 return getDataString();
31 }
32
33
34 public int getLastCCOffset()
35 {
36 return lastCCOffset;
37 }
38
39
40 public int getLastCompareOffset()
41 {
42 return lastCompareOffset;
43 }
44
45
46 public int getLastDDOffset()
47 {
48 return lastDDOffset;
49 }
50
51
52 public int getMaxAltitiude()
53 {
54 return maxAltitiude;
55 }
56
57
58 public int getTotalAltitudeDown()
59 {
60 return totalAltitudeDown;
61 }
62
63
64 public int getTotalAltitudeUp()
65 {
66 return totalAltitudeUp;
67 }
68
69
70 public long getTotalTravelTime()
71 {
72 return totalTravelTime;
73 }
74
75 }