Rev 1563 | Details | Compare with Previous | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
1563 | - | 1 | package dongfang.mkt.datatype; |
2 | |||
3 | public class GPSBearingAndRange { |
||
1565 | - | 4 | double distance; // in m. |
5 | double bearing; // in degrees. |
||
6 | |||
7 | public double getDistance() { |
||
1563 | - | 8 | return distance; |
9 | } |
||
1565 | - | 10 | |
11 | public double getBearing() { |
||
1563 | - | 12 | return bearing; |
13 | } |
||
1565 | - | 14 | |
15 | public void setDistance(double distance) { |
||
1563 | - | 16 | this.distance = distance; |
17 | } |
||
1565 | - | 18 | |
19 | public void setBearing(double bearing) { |
||
1563 | - | 20 | this.bearing = bearing; |
21 | } |
||
1565 | - | 22 | |
1563 | - | 23 | public String toXML() { |
1565 | - | 24 | String result = "distance=\"" + this.distance; |
1563 | - | 25 | result += "\" bearing=\""; |
26 | result += this.bearing; |
||
27 | result += "\""; |
||
28 | return result; |
||
29 | } |
||
1565 | - | 30 | |
1563 | - | 31 | public String toString() { |
1565 | - | 32 | String result = this.distance + "m @"; |
1563 | - | 33 | result += this.bearing; |
34 | result += "deg"; |
||
35 | return result; |
||
36 | } |
||
37 | } |