You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
in km and km/s, respectively, after `tsince` minutes.
13
13
14
14
Args:
15
-
- satellite (``dsgp4.tle.TLE``): TLE object
16
-
- tsince (``torch.tensor``): time to propagate, since the TLE epoch, in minutes
15
+
- satellite (``dsgp4.tle.TLE``): TLE batch object (with attributes that are N-dimensional tensors)
16
+
- tsince (``torch.tensor``): time to propagate, since the TLE epoch, in minutes (also an N-dimensional tensor)
17
17
18
18
Returns:
19
19
- batch_state (``torch.tensor``): a batch of 2x3 tensors, where the first row represents the spacecraft
20
20
position (in km) and the second the spacecraft velocity (in km/s)
21
21
"""
22
-
ifnotisinstance(satellite, list):
23
-
raiseValueError("satellite should be a list of TLE objects.")
24
-
ifnotisinstance(satellite[0],TLE):
25
-
raiseValueError("satellite should be a list of TLE objects.")
22
+
ifnotisinstance(satellite_batch, TLE):
23
+
raiseValueError("satellite_batch should be a TLE object.")
26
24
ifnottorch.is_tensor(tsince):
27
25
raiseValueError("tsince must be a tensor.")
28
26
iftsince.ndim!=1:
29
27
raiseValueError("tsince should be a one dimensional tensor.")
30
-
iflen(tsince)!=len(satellite):
31
-
raiseValueError("in batch mode, tsince and satellite shall be of same length.")
32
-
ifnothasattr(satellite[0], '_radiusearthkm'):
33
-
raiseAttributeError('It looks like the satellite has not been initialized. Please use the `initialize_tle` method or directly `sgp4init` to initialize the satellite. Otherwise, if you are propagating, another option is to use `dsgp4.propagate` and pass `initialized=True` in the arguments.')
28
+
iflen(tsince)!=len(satellite_batch._argpo):
29
+
raiseValueError(f"in batch mode, tsince and satellite_batch shall have attributes of same length. Instead {len(tsince)} for time, and {len(satellite_batch._argpo)} for satellites' attributes found")
30
+
ifnothasattr(satellite_batch, '_radiusearthkm'):
31
+
raiseAttributeError('It looks like the satellite_batch has not been initialized. Please use the `initialize_tle` method or directly `sgp4init` to initialize the satellite_batch. Otherwise, if you are propagating, another option is to use `dsgp4.propagate` and pass `initialized=True` in the arguments.')
0 commit comments