1 /* Copyright 2024-2025 The Johns Hopkins University Applied Physics Laboratory
2 * Licensed to CS GROUP (CS) under one or more
3 * contributor license agreements. See the NOTICE file distributed with
4 * this work for additional information regarding copyright ownership.
5 * CS licenses this file to You under the Apache License, Version 2.0
6 * (the "License"); you may not use this file except in compliance with
7 * the License. You may obtain a copy of the License at
8 *
9 * http://www.apache.org/licenses/LICENSE-2.0
10 *
11 * Unless required by applicable law or agreed to in writing, software
12 * distributed under the License is distributed on an "AS IS" BASIS,
13 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 * See the License for the specific language governing permissions and
15 * limitations under the License.
16 */
17 package org.orekit.files.iirv;
18
19 import org.orekit.errors.OrekitIllegalArgumentException;
20 import org.orekit.errors.OrekitMessages;
21 import org.orekit.files.iirv.terms.CoordinateSystemTerm;
22 import org.orekit.files.iirv.terms.CrossSectionalAreaTerm;
23 import org.orekit.files.iirv.terms.DataSourceTerm;
24 import org.orekit.files.iirv.terms.DayOfYearTerm;
25 import org.orekit.files.iirv.terms.DragCoefficientTerm;
26 import org.orekit.files.iirv.terms.MassTerm;
27 import org.orekit.files.iirv.terms.MessageClassTerm;
28 import org.orekit.files.iirv.terms.MessageIDTerm;
29 import org.orekit.files.iirv.terms.MessageSourceTerm;
30 import org.orekit.files.iirv.terms.MessageTypeTerm;
31 import org.orekit.files.iirv.terms.OriginIdentificationTerm;
32 import org.orekit.files.iirv.terms.OriginatorRoutingIndicatorTerm;
33 import org.orekit.files.iirv.terms.PositionVectorComponentTerm;
34 import org.orekit.files.iirv.terms.RoutingIndicatorTerm;
35 import org.orekit.files.iirv.terms.SequenceNumberTerm;
36 import org.orekit.files.iirv.terms.SolarReflectivityCoefficientTerm;
37 import org.orekit.files.iirv.terms.SupportIdCodeTerm;
38 import org.orekit.files.iirv.terms.VectorEpochTerm;
39 import org.orekit.files.iirv.terms.VectorTypeTerm;
40 import org.orekit.files.iirv.terms.VehicleIdCodeTerm;
41 import org.orekit.files.iirv.terms.VelocityVectorComponentTerm;
42 import org.orekit.time.AbsoluteDate;
43 import org.orekit.time.UTCScale;
44 import org.orekit.utils.TimeStampedPVCoordinates;
45
46 import java.util.ArrayList;
47 import java.util.List;
48
49 /**
50 * Builder for {@link IIRVVector}.
51 *
52 * @author Nick LaFarge
53 * @since 13.0
54 */
55 public class IIRVBuilder {
56
57 /** UTC time scale. */
58 private final UTCScale utc;
59 /**
60 * Message type, default: "00".
61 */
62 private MessageTypeTerm messageType = MessageTypeTerm.DEFAULT;
63 /**
64 * Message Identification, default: "0000000".
65 */
66 private MessageIDTerm messageID = new MessageIDTerm(0);
67 /**
68 * Message source, default: "0".
69 */
70 private MessageSourceTerm messageSource = MessageSourceTerm.DEFAULT;
71 /**
72 * Message class, default: "10" [nominal].
73 */
74 private MessageClassTerm messageClass = MessageClassTerm.NOMINAL;
75 /**
76 * Origin identification, default: " " [NASA Goddard Space Flight Center].
77 */
78 private OriginIdentificationTerm originIdentification = OriginIdentificationTerm.GSFC;
79 /**
80 * Destination routing indicator, default: "MANY".
81 */
82 private RoutingIndicatorTerm routingIndicator = RoutingIndicatorTerm.MANY;
83 /**
84 * Vector type, default: "1" [Free flight].
85 */
86 private VectorTypeTerm vectorType = VectorTypeTerm.FREE_FLIGHT;
87 /**
88 * Source of data, default: "1" [nominal/planning].
89 */
90 private DataSourceTerm dataSource = DataSourceTerm.NOMINAL;
91 /**
92 * Coordinate system, default: "1" [Geocentric True-of-Date Rotating (GTOD)].
93 */
94 private CoordinateSystemTerm coordinateSystem = CoordinateSystemTerm.GEOCENTRIC_TRUE_OF_DATE_ROTATING;
95 /**
96 * Support ID Code, default: "0000".
97 */
98 private SupportIdCodeTerm supportIdCode = new SupportIdCodeTerm("0000");
99 /**
100 * Vehicle ID Code, default: "01".
101 */
102 private VehicleIdCodeTerm vehicleIdCode = new VehicleIdCodeTerm("01");
103 /**
104 * Sequence number, default: "000".
105 */
106 private SequenceNumberTerm sequenceNumber = new SequenceNumberTerm(0);
107 /**
108 * Satellite mass (kg), default: "00156170" [unused].
109 */
110 private MassTerm mass = MassTerm.UNUSED;
111 /**
112 * Average satellite cross-sectional area (m^2), default: "00000" [unused].
113 */
114 private CrossSectionalAreaTerm crossSectionalArea = CrossSectionalAreaTerm.UNUSED;
115 /**
116 * Drag coefficient (dimensionless), default: "0000" [unused].
117 */
118 private DragCoefficientTerm dragCoefficient = DragCoefficientTerm.UNUSED;
119 /**
120 * Solar reflectivity coefficient (dimensionless), default: "00000000" [unused].
121 */
122 private SolarReflectivityCoefficientTerm solarReflectivityCoefficient = SolarReflectivityCoefficientTerm.UNUSED;
123 /**
124 * Originator of message (GCQU or GAQD), default: "GAQD".
125 */
126 private OriginatorRoutingIndicatorTerm originatorRoutingIndicator = OriginatorRoutingIndicatorTerm.GAQD;
127
128 /**
129 * Constructs an {@link IIRVBuilder} instance with a UTC timescale and default values for all parameters.
130 *
131 * @param utc UTC time scale
132 */
133 public IIRVBuilder(final UTCScale utc) {
134 this.utc = utc;
135 }
136
137 /**
138 * Constructs an IIRV object using the configured parameters.
139 *
140 * @param dayOfYear Day of year, 001 to 366
141 * @param vectorEpoch Vector epoch in UTC
142 * @param xPosition X component of the position vector [m]
143 * @param yPosition Y component of the position vector [m]
144 * @param zPosition Z component of the position vector [m]
145 * @param xVelocity X component of the velocity vector [m/s]
146 * @param yVelocity Y component of the velocity vector [m/s]
147 * @param zVelocity Z component of the velocity vector [m/s]
148 * @return the newly constructed IIRV object
149 */
150 public IIRVVector buildVector(final DayOfYearTerm dayOfYear,
151 final VectorEpochTerm vectorEpoch,
152 final PositionVectorComponentTerm xPosition,
153 final PositionVectorComponentTerm yPosition,
154 final PositionVectorComponentTerm zPosition,
155 final VelocityVectorComponentTerm xVelocity,
156 final VelocityVectorComponentTerm yVelocity,
157 final VelocityVectorComponentTerm zVelocity) {
158 return new IIRVVector(
159 messageType, messageID, messageSource, messageClass, originIdentification, routingIndicator, // Line 1
160 vectorType, dataSource, coordinateSystem, supportIdCode, vehicleIdCode, sequenceNumber, dayOfYear, vectorEpoch, // Line 2
161 xPosition, yPosition, zPosition, // Line 3
162 xVelocity, yVelocity, zVelocity, // Line 4
163 mass, crossSectionalArea, dragCoefficient, solarReflectivityCoefficient, // Line 5
164 originatorRoutingIndicator, // Line 6
165 utc
166 );
167 }
168
169 /**
170 * Constructs an IIRV vector using the configured parameters, with position, velocity, and time variables derived
171 * from instances of {@link TimeStampedPVCoordinates} and {@link AbsoluteDate}.
172 *
173 * @param timeStampedPVCoordinates position and velocity components at a particular epoch corresponding to the
174 * IIRV vector
175 * @return the newly constructed IIRV object at the given coordinates
176 */
177 public IIRVVector buildVector(final TimeStampedPVCoordinates timeStampedPVCoordinates) {
178
179 // Retrieve the epoch associated with the given coordinates
180 final AbsoluteDate epoch = timeStampedPVCoordinates.getDate();
181
182 // Construct the IIRV time variable terms
183 final DayOfYearTerm dayOfYear = new DayOfYearTerm(epoch, utc);
184 final VectorEpochTerm vectorEpoch = new VectorEpochTerm(epoch, utc);
185
186 // Construct the position component terms
187 final PositionVectorComponentTerm xPosition = new PositionVectorComponentTerm(timeStampedPVCoordinates.getPosition().getX());
188 final PositionVectorComponentTerm yPosition = new PositionVectorComponentTerm(timeStampedPVCoordinates.getPosition().getY());
189 final PositionVectorComponentTerm zPosition = new PositionVectorComponentTerm(timeStampedPVCoordinates.getPosition().getZ());
190
191 // Construct the velocity component terms
192 final VelocityVectorComponentTerm xVelocity = new VelocityVectorComponentTerm(timeStampedPVCoordinates.getVelocity().getX());
193 final VelocityVectorComponentTerm yVelocity = new VelocityVectorComponentTerm(timeStampedPVCoordinates.getVelocity().getY());
194 final VelocityVectorComponentTerm zVelocity = new VelocityVectorComponentTerm(timeStampedPVCoordinates.getVelocity().getZ());
195
196 // Construct an IIRV vector with the given terms
197 return new IIRVVector(
198 messageType, messageID, messageSource, messageClass, originIdentification, routingIndicator, // Line 1
199 vectorType, dataSource, coordinateSystem, supportIdCode, vehicleIdCode, sequenceNumber, dayOfYear, vectorEpoch, // Line 2
200 xPosition, yPosition, zPosition, // Line 3
201 xVelocity, yVelocity, zVelocity, // Line 4
202 mass, crossSectionalArea, dragCoefficient, solarReflectivityCoefficient, // Line 5
203 originatorRoutingIndicator, // Line 6
204 utc
205 );
206 }
207
208 /**
209 * Constructs an {@link IIRVMessage} where each {@link IIRVVector} in initialized from the inputted list of
210 * {@link TimeStampedPVCoordinates}.
211 *
212 * @param timeStampedPVCoordinates list of time-stamped position and velocity vectors to populate the message
213 * @param <C> type of the Cartesian coordinates
214 * @return the newly constructed {@link IIRVMessage} containing the given coordinates
215 */
216 public <C extends TimeStampedPVCoordinates> IIRVMessage buildIIRVMessage(final List<C> timeStampedPVCoordinates) {
217 final ArrayList<IIRVVector> vectors = new ArrayList<>();
218 int incrementalSequenceNumber = 0;
219 for (TimeStampedPVCoordinates coordinates : timeStampedPVCoordinates) {
220 // Add coordinate to the list of vectors with the current sequence number
221 setSequenceNumber(incrementalSequenceNumber);
222 vectors.add(buildVector(coordinates));
223 incrementalSequenceNumber++;
224 }
225 return new IIRVMessage(vectors);
226 }
227
228
229 /**
230 * Constructs an {@link IIRVEphemerisFile} from the inputted list of {@link TimeStampedPVCoordinates}, inferring
231 * the start year from the first coordinate's {@link org.orekit.time.AbsoluteDate}.
232 * <p>
233 * See {@link #buildIIRVMessage(List)} for {@link IIRVMessage} construction details.
234 *
235 * @param timeStampedPVCoordinates list of time-stamped position and velocity vectors to populate the message
236 * @param <C> type of the Cartesian coordinates
237 * @return the newly constructed {@link IIRVEphemerisFile} containing the given coordinates
238 */
239 public <C extends TimeStampedPVCoordinates> IIRVEphemerisFile buildEphemerisFile(final List<C> timeStampedPVCoordinates) {
240 final int year = timeStampedPVCoordinates.get(0).getDate().getComponents(utc).getDate().getYear();
241 return new IIRVEphemerisFile(year, buildIIRVMessage(timeStampedPVCoordinates));
242 }
243
244 /**
245 * Gets the current {@link MassTerm} value.
246 *
247 * @return the current {@link MassTerm} value.
248 */
249 public MassTerm getMass() {
250 return mass;
251 }
252
253 /**
254 * Overrides the default Mass attribute for the {@link IIRVVector} object being built.
255 * <p>
256 * Units: kg
257 *
258 * @param mass mass value (kg) for the IIRV message
259 */
260 public void setMass(final MassTerm mass) {
261 this.mass = mass;
262 }
263
264 /**
265 * Overrides the default Mass attribute for the {@link IIRVVector} object being built.
266 * <p>
267 * Units: kg
268 *
269 * @param mass mass value (kg) for the IIRV message
270 */
271 public void setMass(final String mass) {
272 this.mass = new MassTerm(mass);
273 }
274
275 /**
276 * Overrides the default Mass attribute for the {@link IIRVVector} object being built.
277 * <p>
278 * Units: kg
279 *
280 * @param mass mass value (kg) for the IIRV message
281 */
282 public void setMass(final double mass) {
283 this.mass = new MassTerm(mass);
284 }
285
286 /**
287 * Gets the current {@link MessageTypeTerm} value.
288 *
289 * @return the current {@link MessageTypeTerm} value.
290 */
291 public MessageTypeTerm getMessageType() {
292 return messageType;
293 }
294
295 /**
296 * Overrides the default {@link MessageTypeTerm} attribute for the {@link IIRVVector} object being built.
297 *
298 * @param messageType {@link MessageTypeTerm} for the IIRV message
299 */
300 public void setMessageType(final String messageType) {
301 this.messageType = new MessageTypeTerm(messageType);
302 }
303
304 /**
305 * Overrides the default {@link MessageTypeTerm} attribute for the {@link IIRVVector} object being built.
306 *
307 * @param messageType {@link MessageTypeTerm} for the IIRV message
308 */
309 public void setMessageType(final MessageTypeTerm messageType) {
310 this.messageType = messageType;
311 }
312
313 /**
314 * Gets the current {@link MessageSourceTerm} value.
315 *
316 * @return the current {@link MessageSourceTerm} value.
317 */
318 public MessageSourceTerm getMessageSource() {
319 return messageSource;
320 }
321
322 /**
323 * Overrides the default {@link MessageSourceTerm} attribute for the {@link IIRVVector} object being built.
324 *
325 * @param messageSource {@link MessageSourceTerm} for the IIRV message
326 */
327 public void setMessageSource(final String messageSource) {
328 this.messageSource = new MessageSourceTerm(messageSource);
329 }
330
331 /**
332 * Overrides the default {@link MessageSourceTerm} attribute for the {@link IIRVVector} object being built.
333 *
334 * @param messageSource {@link MessageSourceTerm} for the IIRV message
335 */
336 public void setMessageSource(final MessageSourceTerm messageSource) {
337 this.messageSource = messageSource;
338 }
339
340 /**
341 * Gets the current {@link MessageIDTerm} value.
342 *
343 * @return the current {@link MessageIDTerm} value.
344 */
345 public MessageIDTerm getMessageID() {
346 return messageID;
347 }
348
349 /**
350 * Overrides the default MessageID attribute for the {@link IIRVVector} object being built.
351 *
352 * @param messageID message ID value for the IIRV message
353 */
354 public void setMessageID(final MessageIDTerm messageID) {
355 this.messageID = messageID;
356 }
357
358 /**
359 * Overrides the default MessageID attribute for the {@link IIRVVector} object being built.
360 *
361 * @param messageID message ID value for the IIRV message
362 */
363 public void setMessageID(final String messageID) {
364 this.messageID = new MessageIDTerm(messageID);
365 }
366
367 /**
368 * Overrides the default MessageID attribute for the {@link IIRVVector} object being built.
369 *
370 * @param messageID message ID value for the IIRV message
371 */
372 public void setMessageID(final long messageID) {
373 this.messageID = new MessageIDTerm(messageID);
374 }
375
376 /**
377 * Gets the current {@link MessageClassTerm} value.
378 *
379 * @return the current {@link MessageClassTerm} value.
380 */
381 public MessageClassTerm getMessageClass() {
382 return messageClass;
383 }
384
385 /**
386 * Overrides the default MessageClass attribute for the {@link IIRVVector} object being built.
387 *
388 * @param messageClass message class value for the IIRV message
389 */
390 public void setMessageClass(final MessageClassTerm messageClass) {
391 this.messageClass = messageClass;
392 }
393
394 /**
395 * Overrides the default MessageClass attribute for the {@link IIRVVector} object being built.
396 *
397 * @param messageClass message class value for the IIRV message
398 */
399 public void setMessageClass(final String messageClass) {
400 this.messageClass = new MessageClassTerm(messageClass);
401 }
402
403 /**
404 * Overrides the default MessageClass attribute for the {@link IIRVVector} object being built.
405 *
406 * @param messageClass message class value for the IIRV message
407 */
408 public void setMessageClass(final long messageClass) {
409 this.messageClass = new MessageClassTerm(messageClass);
410 }
411
412 /**
413 * Gets the current {@link OriginIdentificationTerm} value.
414 *
415 * @return the current {@link OriginIdentificationTerm} value.
416 */
417 public OriginIdentificationTerm getOriginIdentification() {
418 return originIdentification;
419 }
420
421 /**
422 * Overrides the default OriginIdentification attribute for the {@link IIRVVector} object being built.
423 *
424 * @param originIdentification origin identification value for the IIRV message
425 */
426 public void setOriginIdentification(final OriginIdentificationTerm originIdentification) {
427 this.originIdentification = originIdentification;
428 }
429
430 /**
431 * Overrides the default OriginIdentification attribute for the {@link IIRVVector} object being built.
432 *
433 * @param originIdentification origin identification value for the IIRV message
434 */
435 public void setOriginIdentification(final String originIdentification) {
436 this.originIdentification = new OriginIdentificationTerm(originIdentification);
437 }
438
439 /**
440 * Gets the current {@link RoutingIndicatorTerm} value.
441 *
442 * @return the current {@link RoutingIndicatorTerm} value.
443 */
444 public RoutingIndicatorTerm getRoutingIndicator() {
445 return routingIndicator;
446 }
447
448 /**
449 * Overrides the default RoutingIndicator attribute for the {@link IIRVVector} object being built.
450 *
451 * @param routingIndicator routing indicator term value for the IIRV message
452 */
453 public void setRoutingIndicator(final RoutingIndicatorTerm routingIndicator) {
454 this.routingIndicator = routingIndicator;
455 }
456
457 /**
458 * Overrides the default RoutingIndicator attribute for the {@link IIRVVector} object being built.
459 *
460 * @param routingIndicator routing indicator term value for the IIRV message
461 */
462 public void setRoutingIndicator(final String routingIndicator) {
463 this.routingIndicator = new RoutingIndicatorTerm(routingIndicator);
464 }
465
466 /**
467 * Gets the current {@link VectorTypeTerm} value.
468 *
469 * @return the current {@link VectorTypeTerm} value.
470 */
471 public VectorTypeTerm getVectorType() {
472 return vectorType;
473 }
474
475 /**
476 * Overrides the default VectorType attribute for the {@link IIRVVector} object being built.
477 *
478 * @param vectorType vector type term value for the IIRV message
479 */
480 public void setVectorType(final VectorTypeTerm vectorType) {
481 this.vectorType = vectorType;
482 }
483
484 /**
485 * Overrides the default VectorType attribute for the {@link IIRVVector} object being built.
486 *
487 * @param vectorType vector type term value for the IIRV message
488 */
489 public void setVectorType(final String vectorType) {
490 this.vectorType = new VectorTypeTerm(vectorType);
491 }
492
493 /**
494 * Overrides the default VectorType attribute for the {@link IIRVVector} object being built.
495 *
496 * @param vectorType vector type term value for the IIRV message
497 */
498 public void setVectorType(final long vectorType) {
499 this.vectorType = new VectorTypeTerm(vectorType);
500 }
501
502 /**
503 * Gets the current {@link DataSourceTerm} value.
504 *
505 * @return the current {@link DataSourceTerm} value.
506 */
507 public DataSourceTerm getDataSource() {
508 return dataSource;
509 }
510
511 /**
512 * Overrides the default DataSource attribute for the {@link IIRVVector} object being built.
513 *
514 * @param dataSource data source term value for the IIRV message
515 */
516 public void setDataSource(final DataSourceTerm dataSource) {
517 this.dataSource = dataSource;
518 }
519
520 /**
521 * Overrides the default DataSource attribute for the {@link IIRVVector} object being built.
522 *
523 * @param dataSource data source term value for the IIRV message
524 */
525 public void setDataSource(final long dataSource) {
526 this.dataSource = new DataSourceTerm(dataSource);
527 }
528
529 /**
530 * Overrides the default DataSource attribute for the {@link IIRVVector} object being built.
531 *
532 * @param dataSource data source term value for the IIRV message
533 */
534 public void setDataSource(final String dataSource) {
535 this.dataSource = new DataSourceTerm(dataSource);
536 }
537
538 /**
539 * Gets the current {@link CoordinateSystemTerm} value.
540 *
541 * @return the current {@link CoordinateSystemTerm} value.
542 */
543 public CoordinateSystemTerm getCoordinateSystem() {
544 return coordinateSystem;
545 }
546
547 /**
548 * Overrides the default CoordinateSystem attribute for the {@link IIRVVector} object being built.
549 *
550 * @param coordinateSystem coordinate system term value for the IIRV message
551 */
552 public void setCoordinateSystem(final CoordinateSystemTerm coordinateSystem) {
553 this.coordinateSystem = coordinateSystem;
554 }
555
556 /**
557 * Overrides the default CoordinateSystem attribute for the {@link IIRVVector} object being built.
558 *
559 * @param coordinateSystem coordinate system term value for the IIRV message
560 */
561 public void setCoordinateSystem(final String coordinateSystem) {
562 this.coordinateSystem = new CoordinateSystemTerm(coordinateSystem);
563 }
564
565 /**
566 * Overrides the default CoordinateSystem attribute for the {@link IIRVVector} object being built.
567 *
568 * @param coordinateSystem coordinate system term value for the IIRV message
569 */
570 public void setCoordinateSystem(final long coordinateSystem) {
571 this.coordinateSystem = new CoordinateSystemTerm(coordinateSystem);
572 }
573
574 /**
575 * Gets the current {@link SupportIdCodeTerm} value.
576 *
577 * @return the current {@link SupportIdCodeTerm} value.
578 */
579 public SupportIdCodeTerm getSupportIdCode() {
580 return supportIdCode;
581 }
582
583 /**
584 * Overrides the default SupportIdCode attribute for the {@link IIRVVector} object being built.
585 *
586 * @param supportIdCode support id code value for the IIRV message
587 */
588 public void setSupportIdCode(final SupportIdCodeTerm supportIdCode) {
589 this.supportIdCode = supportIdCode;
590 }
591
592 /**
593 * Overrides the default SupportIdCode attribute for the {@link IIRVVector} object being built.
594 *
595 * @param supportIdCode support id code value for the IIRV message
596 */
597 public void setSupportIdCode(final String supportIdCode) {
598 this.supportIdCode = new SupportIdCodeTerm(supportIdCode);
599 }
600
601 /**
602 * Overrides the default SupportIdCode attribute for the {@link IIRVVector} object being built.
603 *
604 * @param supportIdCode support id code value for the IIRV message
605 */
606 public void setSupportIdCode(final long supportIdCode) {
607 this.supportIdCode = new SupportIdCodeTerm(supportIdCode);
608 }
609
610 /**
611 * Gets the current {@link VehicleIdCodeTerm} value.
612 *
613 * @return the current {@link VehicleIdCodeTerm} value.
614 */
615 public VehicleIdCodeTerm getVehicleIdCode() {
616 return vehicleIdCode;
617 }
618
619 /**
620 * Overrides the default VehicleIdCode attribute for the {@link IIRVVector} object being built.
621 *
622 * @param vehicleIdCode vehicle id code value for the IIRV message
623 */
624 public void setVehicleIdCode(final VehicleIdCodeTerm vehicleIdCode) {
625 this.vehicleIdCode = vehicleIdCode;
626 }
627
628 /**
629 * Overrides the default VehicleIdCode attribute for the {@link IIRVVector} object being built.
630 *
631 * @param vehicleIdCode vehicle id code value for the IIRV message
632 */
633 public void setVehicleIdCode(final String vehicleIdCode) {
634 this.vehicleIdCode = new VehicleIdCodeTerm(vehicleIdCode);
635 }
636
637 /**
638 * Overrides the default VehicleIdCode attribute for the {@link IIRVVector} object being built.
639 *
640 * @param vehicleIdCode vehicle id code value for the IIRV message
641 */
642 public void setVehicleIdCode(final long vehicleIdCode) {
643 this.vehicleIdCode = new VehicleIdCodeTerm(vehicleIdCode);
644 }
645
646 /**
647 * Gets the current {@link SequenceNumberTerm} value.
648 *
649 * @return the current {@link SequenceNumberTerm} value.
650 */
651 public SequenceNumberTerm getSequenceNumber() {
652 return sequenceNumber;
653 }
654
655 /**
656 * Overrides the default SequenceNumber attribute for the {@link IIRVVector} object being built.
657 *
658 * @param sequenceNumber sequence number value for the IIRV message
659 */
660 public void setSequenceNumber(final SequenceNumberTerm sequenceNumber) {
661 this.sequenceNumber = sequenceNumber;
662 }
663
664 /**
665 * Overrides the default SequenceNumber attribute for the {@link IIRVVector} object being built.
666 *
667 * @param sequenceNumber sequence number value for the IIRV message
668 */
669 public void setSequenceNumber(final String sequenceNumber) {
670 this.sequenceNumber = new SequenceNumberTerm(sequenceNumber);
671 }
672
673 /**
674 * Overrides the default SequenceNumber attribute for the {@link IIRVVector} object being built.
675 *
676 * @param sequenceNumber sequence number value for the IIRV message
677 */
678 public void setSequenceNumber(final long sequenceNumber) {
679 if (sequenceNumber > SequenceNumberTerm.MAX_SEQUENCE_NUMBER) {
680 throw new OrekitIllegalArgumentException(OrekitMessages.IIRV_EXCEEDS_MAX_VECTORS, sequenceNumber);
681 }
682 this.sequenceNumber = new SequenceNumberTerm(sequenceNumber);
683 }
684
685 /**
686 * Gets the current {@link CrossSectionalAreaTerm} value.
687 *
688 * @return the current {@link CrossSectionalAreaTerm} value.
689 */
690 public CrossSectionalAreaTerm getCrossSectionalArea() {
691 return crossSectionalArea;
692 }
693
694 /**
695 * Overrides the default {@link CrossSectionalAreaTerm} attribute for the {@link IIRVVector} object being built.
696 * <p>
697 * Units: m^2
698 *
699 * @param crossSectionalArea cross-sectional area value (m^2) for the IIRV message
700 */
701 public void setCrossSectionalArea(final CrossSectionalAreaTerm crossSectionalArea) {
702 this.crossSectionalArea = crossSectionalArea;
703 }
704
705 /**
706 * Overrides the default {@link CrossSectionalAreaTerm} attribute for the {@link IIRVVector} object being built.
707 * <p>
708 * Units: m^2
709 * <p>
710 * See {@link CrossSectionalAreaTerm#CrossSectionalAreaTerm(String)}
711 *
712 * @param crossSectionalArea cross-sectional area value (m^2) for the IIRV message
713 */
714 public void setCrossSectionalArea(final String crossSectionalArea) {
715 this.crossSectionalArea = new CrossSectionalAreaTerm(crossSectionalArea);
716 }
717
718 /**
719 * Overrides the default {@link CrossSectionalAreaTerm} attribute for the {@link IIRVVector} object being built.
720 * <p>
721 * Units: m^2
722 * <p>
723 * See {@link CrossSectionalAreaTerm#CrossSectionalAreaTerm(double)}
724 *
725 * @param crossSectionalArea cross-sectional area value (m^2) for the IIRV message
726 */
727 public void setCrossSectionalArea(final double crossSectionalArea) {
728 this.crossSectionalArea = new CrossSectionalAreaTerm(crossSectionalArea);
729 }
730
731 /**
732 * Gets the current {@link DragCoefficientTerm} value.
733 *
734 * @return the current {@link DragCoefficientTerm} value.
735 */
736 public DragCoefficientTerm getDragCoefficient() {
737 return dragCoefficient;
738 }
739
740 /**
741 * Overrides the default {@link DragCoefficientTerm} attribute for the {@link IIRVVector} object being built.
742 * <p>
743 * Units: dimensionless
744 *
745 * @param dragCoefficient drag coefficient value (dimensionless) for the IIRV message
746 */
747 public void setDragCoefficient(final DragCoefficientTerm dragCoefficient) {
748 this.dragCoefficient = dragCoefficient;
749 }
750
751 /**
752 * Overrides the default {@link DragCoefficientTerm} attribute for the {@link IIRVVector} object being built.
753 * <p>
754 * Units: dimensionless
755 * <p>
756 * See {@link DragCoefficientTerm#DragCoefficientTerm(String)}
757 *
758 * @param dragCoefficient drag coefficient value (dimensionless) for the IIRV message
759 */
760 public void setDragCoefficient(final String dragCoefficient) {
761 this.dragCoefficient = new DragCoefficientTerm(dragCoefficient);
762 }
763
764 /**
765 * Overrides the default {@link DragCoefficientTerm} attribute for the {@link IIRVVector} object being built.
766 * <p>
767 * Units: dimensionless
768 * <p>
769 * See {@link DragCoefficientTerm#DragCoefficientTerm(double)}
770 *
771 * @param dragCoefficient drag coefficient value (dimensionless) for the IIRV message
772 */
773 public void setDragCoefficient(final double dragCoefficient) {
774 this.dragCoefficient = new DragCoefficientTerm(dragCoefficient);
775 }
776
777 /**
778 * Gets the current {@link SolarReflectivityCoefficientTerm} value.
779 *
780 * @return the current {@link SolarReflectivityCoefficientTerm} value.
781 */
782 public SolarReflectivityCoefficientTerm getSolarReflectivityCoefficient() {
783 return solarReflectivityCoefficient;
784 }
785
786 /**
787 * Overrides the default {@link SolarReflectivityCoefficientTerm} attribute for the {@link IIRVVector} object being built.
788 * <p>
789 * Units: dimensionless
790 *
791 * @param solarReflectivityCoefficient solar reflectivity coefficient value (dimensionless) for the IIRV message
792 */
793 public void setSolarReflectivityCoefficient(final SolarReflectivityCoefficientTerm solarReflectivityCoefficient) {
794 this.solarReflectivityCoefficient = solarReflectivityCoefficient;
795 }
796
797 /**
798 * Overrides the default {@link SolarReflectivityCoefficientTerm} attribute for the {@link IIRVVector} object being built.
799 * <p>
800 * Units: dimensionless
801 * <p>
802 * See {@link SolarReflectivityCoefficientTerm#SolarReflectivityCoefficientTerm(String)}
803 *
804 * @param solarReflectivityCoefficient solar reflectivity coefficient value (dimensionless) for the IIRV message
805 */
806 public void setSolarReflectivityCoefficient(final String solarReflectivityCoefficient) {
807 this.solarReflectivityCoefficient = new SolarReflectivityCoefficientTerm(solarReflectivityCoefficient);
808 }
809
810 /**
811 * Overrides the default {@link SolarReflectivityCoefficientTerm} attribute for the {@link IIRVVector} object being built.
812 * <p>
813 * Units: dimensionless
814 * <p>
815 * See {@link SolarReflectivityCoefficientTerm#SolarReflectivityCoefficientTerm(double)}
816 *
817 * @param solarReflectivityCoefficient solar reflectivity coefficient value (dimensionless) for the IIRV message
818 */
819 public void setSolarReflectivityCoefficient(final double solarReflectivityCoefficient) {
820 this.solarReflectivityCoefficient = new SolarReflectivityCoefficientTerm(solarReflectivityCoefficient);
821 }
822
823 /**
824 * Gets the current {@link OriginatorRoutingIndicatorTerm} value.
825 *
826 * @return the current {@link OriginatorRoutingIndicatorTerm} value.
827 */
828 public OriginatorRoutingIndicatorTerm getOriginatorRoutingIndicator() {
829 return originatorRoutingIndicator;
830 }
831
832 /**
833 * Overrides the default {@link OriginatorRoutingIndicatorTerm} attribute for the {@link IIRVVector} object being built.
834 *
835 * @param originatorRoutingIndicator originator routing indicator value for the IIRV message
836 */
837 public void setOriginatorRoutingIndicator(final OriginatorRoutingIndicatorTerm originatorRoutingIndicator) {
838 this.originatorRoutingIndicator = originatorRoutingIndicator;
839 }
840
841 /**
842 * Overrides the default {@link OriginatorRoutingIndicatorTerm} attribute for the {@link IIRVVector} object being built.
843 * <p>
844 * See {@link OriginatorRoutingIndicatorTerm#OriginatorRoutingIndicatorTerm(String)}
845 *
846 * @param originatorRoutingIndicator originator routing indicator value for the IIRV message
847 */
848 public void setOriginatorRoutingIndicator(final String originatorRoutingIndicator) {
849 this.originatorRoutingIndicator = new OriginatorRoutingIndicatorTerm(originatorRoutingIndicator);
850 }
851
852 /**
853 * Returns the satellite ID (set to the value of the {@link VehicleIdCodeTerm}).
854 *
855 * @return the satellite ID
856 */
857 public String getSatelliteID() {
858 return vehicleIdCode.toEncodedString();
859 }
860
861
862 }