Package: KuraPosition

KuraPosition

nameinstructionbranchcomplexitylinemethod
KuraPosition()
M: 0 C: 3
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 2
100%
M: 0 C: 1
100%
getAltitude()
M: 0 C: 3
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
getHeading()
M: 0 C: 3
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
getLatitude()
M: 0 C: 3
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
getLongitude()
M: 0 C: 3
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
getPrecision()
M: 0 C: 3
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
getSatellites()
M: 0 C: 3
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
getSpeed()
M: 0 C: 3
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
getStatus()
M: 0 C: 3
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
getTimestamp()
M: 0 C: 3
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
setAltitude(double)
M: 0 C: 5
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 2
100%
M: 0 C: 1
100%
setHeading(double)
M: 0 C: 5
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 2
100%
M: 0 C: 1
100%
setLatitude(double)
M: 0 C: 5
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 2
100%
M: 0 C: 1
100%
setLongitude(double)
M: 0 C: 5
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 2
100%
M: 0 C: 1
100%
setPrecision(double)
M: 0 C: 5
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 2
100%
M: 0 C: 1
100%
setSatellites(int)
M: 0 C: 5
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 2
100%
M: 0 C: 1
100%
setSpeed(double)
M: 0 C: 5
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 2
100%
M: 0 C: 1
100%
setStatus(int)
M: 0 C: 5
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 2
100%
M: 0 C: 1
100%
setTimestamp(Date)
M: 0 C: 4
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 2
100%
M: 0 C: 1
100%

Coverage

1: /*******************************************************************************
2: * Copyright (c) 2011, 2017 Eurotech and/or its affiliates
3: *
4: * All rights reserved. This program and the accompanying materials
5: * are made available under the terms of the Eclipse Public License v1.0
6: * which accompanies this distribution, and is available at
7: * http://www.eclipse.org/legal/epl-v10.html
8: *
9: * Contributors:
10: * Eurotech
11: *******************************************************************************/
12: package org.eclipse.kura.message;
13:
14: import java.util.Date;
15:
16: import org.osgi.annotation.versioning.ProviderType;
17:
18: /**
19: * KuraPosition is a data structure to capture a geo location. It can be
20: * associated to a KuraPayload to geotag a KuraMessage before sending to a
21: * remote cloud platform. Refer to the description of each of the fields for more
22: * information on the model of KuraPosition.
23: *
24: * @noextend This class is not intended to be subclassed by clients.
25: */
26: @ProviderType
27: public class KuraPosition {
28:
29: /**
30: * Longitude of this position in degrees. This is a mandatory field.
31: */
32: private Double longitude;
33:
34: /**
35: * Latitude of this position in degrees. This is a mandatory field.
36: */
37: private Double latitude;
38:
39: /**
40: * Altitude of the position in meters.
41: */
42: private Double altitude;
43:
44: /**
45: * Dilution of the precision (DOP) of the current GPS fix.
46: */
47: private Double precision;
48:
49: /**
50: * Heading (direction) of the position in degrees
51: */
52: private Double heading;
53:
54: /**
55: * Speed for this position in meter/sec.
56: */
57: private Double speed;
58:
59: /**
60: * Timestamp extracted from the GPS system
61: */
62: private Date timestamp;
63:
64: /**
65: * Number of satellites seen by the systems
66: */
67: private Integer satellites;
68:
69: /**
70: * Status of GPS system: 1 = no GPS response, 2 = error in response, 4 =
71: * valid.
72: */
73: private Integer status;
74:
75: public KuraPosition() {
76: }
77:
78: public Double getLongitude() {
79: return this.longitude;
80: }
81:
82: public void setLongitude(double longitude) {
83: this.longitude = longitude;
84: }
85:
86: public Double getLatitude() {
87: return this.latitude;
88: }
89:
90: public void setLatitude(double latitude) {
91: this.latitude = latitude;
92: }
93:
94: public Double getAltitude() {
95: return this.altitude;
96: }
97:
98: public void setAltitude(double altitude) {
99: this.altitude = altitude;
100: }
101:
102: public Double getPrecision() {
103: return this.precision;
104: }
105:
106: public void setPrecision(double precision) {
107: this.precision = precision;
108: }
109:
110: public Double getHeading() {
111: return this.heading;
112: }
113:
114: public void setHeading(double heading) {
115: this.heading = heading;
116: }
117:
118: public Double getSpeed() {
119: return this.speed;
120: }
121:
122: public void setSpeed(double speed) {
123: this.speed = speed;
124: }
125:
126: public Date getTimestamp() {
127: return this.timestamp;
128: }
129:
130: public void setTimestamp(Date timestamp) {
131: this.timestamp = timestamp;
132: }
133:
134: public Integer getSatellites() {
135: return this.satellites;
136: }
137:
138: public void setSatellites(int satellites) {
139: this.satellites = satellites;
140: }
141:
142: public Integer getStatus() {
143: return this.status;
144: }
145:
146: public void setStatus(int status) {
147: this.status = status;
148: }
149: }