/
CelestialObject.java
334 lines (302 loc) · 6.91 KB
/
CelestialObject.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
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
/**=====================================================================*
| This file declares the following classes:
| CelestialObject
|
| Description of the CelestialObject DataBase :
| Use to have an object of a celestial object with all his informations.
|
| <p>Copyright : EIAJ, all rights resedRVed</p>
| @autor : Diego Antognini
| @version : 1.0
|
|
*=======================================================================*/
package com.github.projetp1;
public class CelestialObject {
private int id;
private int StarId;
private int HIP;
private int HD;
private int HR;
private int Gliese;
private int BayerFlamsteed;
private String sProperName;
private double dRA;
private double dDec;
private double dDistance;
private double dPMRA;
private double dPMDec;
private double dRV;
private double dMag;
private double dAbsMag;
private String sSpectrum;
private double dColorIndex;
private double dXYZ[] = new double[3];
private double dVXYZ[] = new double[3];
private double dXReal;
private double dYReal;
/**
* CelestialObject
* Constructor
* @param _id
* @param _StarId
* @param _HIP
* @param _HD
* @param _HR
* @param _Gliese
* @param _BayerFlamsteed
* @param _sProperName
* @param _dRA
* @param _dDec
* @param _dDistance
* @param _dPMRA
* @param _dPMDec
* @param _dRV
* @param _dMag
* @param _dAbsMag
* @param _sSpectrum
* @param _dColorIndex
* @param _x
* @param _y
* @param _z
* @param _vx
* @param _vy
* @param _vz
*/
public CelestialObject(int _id,int _StarId,int _HIP,int _HD,int _HR,int _Gliese,int _BayerFlamsteed,String _sProperName,double _dRA,double _dDec, double _dDistance, double _dPMRA,double _dPMDec,double _dRV,double _dMag
,double _dAbsMag,String _sSpectrum,double _dColorIndex,double _x,double _y,double _z,double _vx,double _vy,double _vz) {
this.id = _id;
this.StarId = _StarId;
this.HIP = _HIP;
this.HR = _HR;
this.Gliese = _Gliese;
this.BayerFlamsteed = _BayerFlamsteed;
this.sProperName = _sProperName;
this.dRA = _dRA;
this.dDec = _dDec;
this.dDistance = _dDistance;
this.dPMRA = _dPMRA;
this.dPMDec = _dPMDec;
this.dRV = _dRV;
this.dMag = _dMag;
this.dAbsMag = _dAbsMag;
this.sSpectrum = _sSpectrum;
this.dColorIndex = _dColorIndex;
this.dXYZ[0] = _x;
this.dXYZ[1] = _y;
this.dXYZ[2] = _z;
this.dVXYZ[0] = _vx;
this.dVXYZ[1] = _vy;
this.dVXYZ[2] = _vz;
}
/**
* getHeader
* give the header of the database
*/
public void getHeader()
{
System.out.println("ID\tStarID\tHIP\tHD\tHR\tGliese\tBayerFlamsteed\tProperName\tRA\tDec\tDistance\tPMRA\tPMDec\tRV\tMag\tAbsMag\tSpectrum\tColorIndex\tX\tY\tVX\tVY\tVZ");
}
/**
* getInfos
* Write all the value of the star
*/
public void getInfos()
{
System.out.println(this.id + "\t" + this.StarId+ "\t" + this.HIP+ "\t" + this.HD + "\t" + this.HR + "\t" + this.Gliese + "\t" + this.BayerFlamsteed + "\t\t" + this.sProperName + "\t\t" +
this.dRA + "\t" + this.dDec + "\t" + this.dDistance + "\t" + this.dPMRA + "\t" + this.dPMDec + "\t" + this.dRV + "\t" + this.dMag + "\t" + this.dAbsMag + "\t" + this.sSpectrum + "\t\t" +
this.dColorIndex + "\t\t" + this.dXYZ[0] + "\t" + this.dXYZ[1] + "\t" + this.dXYZ[2] + "\t" + this.dVXYZ[0] + "\t" + this.dVXYZ[1] + "\t" + this.dVXYZ[2]);
}
/**
* getId
* getter of the private value
* @return the private variable
*/
public int getId() {
return this.id;
}
/**
* getStarId
* getter of the private value
* @return the private variable
*/
public int getStarId() {
return this.StarId;
}
/**
* getHIP
* getter of the private value
* @return the private variable
*/
public int getHIP() {
return this.HIP;
}
/**
* getHD
* getter of the private value
* @return the private variable
*/
public int getHD() {
return this.HD;
}
/**
* getHR
* getter of the private value
* @return the private variable
*/
public int getHR() {
return this.HR;
}
/**
* getBayerFlamsteed
* getter of the private value
* @return the private variable
*/
public int getBayerFlamsteed() {
return this.BayerFlamsteed;
}
/**
* getGliese
* getter of the private value
* @return the private variable
*/
public int getGliese() {
return this.Gliese;
}
/**
* getProperName
* getter of the private value
* @return the private variable
*/
public String getProperName() {
return this.sProperName;
}
/**
* getRA
* getter of the private value
* @return the private variable
*/
public double getRA() {
return this.dRA;
}
/**
* getDec
* getter of the private value
* @return the private variable
*/
public double getDec() {
return this.dDec;
}
/**
* getDistance
* getter of the private value
* @return the private variable
*/
public double getDistance() {
return this.dDistance;
}
/**
* getPMRA
* getter of the private value
* @return the private variable
*/
public double getPMRA() {
return this.dPMRA;
}
/**
* getPMDec
* getter of the private value
* @return the private variable
*/
public double getPMDec() {
return this.dPMDec;
}
/**
* getRV
* getter of the private value
* @return the private variable
*/
public double getRV() {
return this.dRV;
}
/**
* getMag
* getter of the private value
* @return the private variable
*/
public double getMag() {
return this.dMag;
}
/**
* getAbsMag
* getter of the private value
* @return the private variable
*/
public double getAbsMag() {
return this.dAbsMag;
}
/**
* getSpectrum
* getter of the private value
* @return the private variable
*/
public String getSpectrum() {
return this.sSpectrum;
}
/**
* getColorIndex
* getter of the private value
* @return the private variable
*/
public double getColorIndex() {
return this.dColorIndex;
}
/**
* getXYZ
* getter of the private value
* @return the private variable
*/
public double[] getXYZ() {
return this.dXYZ;
}
/**
* getVXYZ
* getter of the private value
* @return the private variable
*/
public double[] getVXYZ() {
return this.dVXYZ;
}
/**
* getXReal
* getter of the private value
* @return the private variable
*/
public double getXReal() {
return this.dXReal;
}
/**
* getYReal
* getter of the private value
* @return the private variable
*/
public double getYReal() {
return this.dYReal;
}
/**
* setXReal
* setter of the private value
* @return the private variable
*/
public void setXReal(double x) {
this.dXReal = x;
}
/**
* setYReal
* setter of the private value
* @return the private variable
*/
public void setYReal(double y) {
this.dYReal = y;
}
}