-
Notifications
You must be signed in to change notification settings - Fork 0
/
Spos.java
78 lines (62 loc) · 1.92 KB
/
Spos.java
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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
import java.io.Serializable;
public class Spos implements Serializable{
private double latitude;
private double longitude;
private double airPressure;
private double elevation;
private double temperature;
private String sunpos;
public Spos(double latitude, double longitude, double airPressure, double elevation, double temperature, String sunpos) {
this.latitude = latitude;
this.longitude = longitude;
this.airPressure = airPressure;
this.elevation = elevation;
this.temperature = temperature;
this.sunpos = sunpos;
}
// Getters and setters for each field
public double getLatitude() {
return latitude;
}
public void setLatitude(double latitude) {
this.latitude = latitude;
}
public double getLongitude() {
return longitude;
}
public void setLongitude(double longitude) {
this.longitude = longitude;
}
public double getAirPressure() {
return airPressure;
}
public void setAirPressure(double airPressure) {
this.airPressure = airPressure;
}
public double getElevation() {
return elevation;
}
public void setElevation(double elevation) {
this.elevation = elevation;
}
public double getTemperature() {
return temperature;
}
public void setTemperature(double temperature) {
this.temperature = temperature;
}
public String getSunpos() {
return sunpos;
}
public void setSunpos(String sunpos) {
this.sunpos = sunpos;
}
public String toString() {
return "Latitude: " + latitude + "\n" +
"Longitude: " + longitude + "\n" +
"Air Pressure: " + airPressure + " hPa\n" +
"Elevation: " + elevation + " meters\n" +
"Temperature: " + temperature + " °C\n" +
"Sun Position: " + sunpos;
}
}