Exemplo n.º 1
0
 def func(self, metadata):
     require_field("START_TIME", metadata)
     require_field("STOP_TIME", metadata)
     require(
         metadata["START_TIME"] <= metadata["STOP_TIME"],
         "START_TIME is before STOP_TIME"
     )
Exemplo n.º 2
0
 def func(self, metadata):
     if "INTERPOLATION" in metadata:
         require_field("INTERPOLATION_DEGREE", metadata)
         require(
             float(metadata["INTERPOLATION_DEGREE"]).is_integer(),
             "Interpolation degree is not an integer"
         )
Exemplo n.º 3
0
 def func(self, covariance_section):
     require(
         all(
             (covariance_section.covariances[idx].epoch
              < covariance_section.covariances[idx+1].epoch)
             for idx in range(len(covariance_section.covariances)-1)
         ),
         "States in data section are not ordered by epoch"
     )
Exemplo n.º 4
0
 def v2_0(self, oem):
     require(
         all(
             (oem._segments[idx].useable_stop_time
              <= oem._segments[idx+1].useable_start_time)
             for idx in range(len(oem._segments)-1)
         ),
         "Data section state epochs overlap"
     )
Exemplo n.º 5
0
 def v1_0(self, oem):
     require(
         all(
             (oem._segments[idx].metadata["STOP_TIME"]
              <= oem._segments[idx+1].metadata["START_TIME"])
             for idx in range(len(oem._segments)-1)
         ),
         "Data section state epochs overlap"
     )
Exemplo n.º 6
0
 def func(self, oem):
     time_system = None
     for segment in oem:
         if time_system is None:
             time_system = segment.metadata["TIME_SYSTEM"]
         else:
             require(
                 segment.metadata["TIME_SYSTEM"] == time_system,
                 "TIME_SYSTEM not fixed in OEM"
             )
Exemplo n.º 7
0
 def func(self, ephemeris_segment):
     for state in ephemeris_segment.states:
         require(
             (
                 state.epoch >=
                 ephemeris_segment.metadata["START_TIME"]
                 and
                 state.epoch <=
                 ephemeris_segment.metadata["STOP_TIME"]
             ),
             f"State epoch not within usable range: {state.epoch}"
         )
Exemplo n.º 8
0
 def func(self, ephemeris_segment):
     for covariance in ephemeris_segment.covariances:
         require(
             (
                 covariance.epoch >=
                 ephemeris_segment.metadata["START_TIME"]
                 and
                 covariance.epoch <=
                 ephemeris_segment.metadata["STOP_TIME"]
             ),
             f"Covariance epoch not within range: {covariance.epoch}"
         )
Exemplo n.º 9
0
 def func(self, oem):
     object_name = oem._segments[0].metadata["OBJECT_NAME"]
     object_id = oem._segments[0].metadata["OBJECT_ID"]
     for segment in oem:
         require(
             segment.metadata["OBJECT_NAME"] == object_name,
             "OBJECT_NAME not fixed in OEM"
         )
         require(
             segment.metadata["OBJECT_ID"] == object_id,
             "OBJECT_ID not fixed in OEM"
         )
Exemplo n.º 10
0
 def func(self, metadata):
     if "USEABLE_START_TIME" in metadata or "USEABLE_STOP_TIME" in metadata:
         require(
             "USEABLE_START_TIME" in metadata,
             "USEABLE_STOP_TIME provided without USEABLE_START_TIME"
         )
         require(
             "USEABLE_STOP_TIME" in metadata,
             "USEABLE_START_TIME provided without USEABLE_STOP_TIME"
         )
         require(
             metadata["USEABLE_START_TIME"]
             <= metadata["USEABLE_STOP_TIME"],
             "USEABLE_START_TIME after USEABLE_STOP_TIME"
         )
         require(
             metadata["USEABLE_START_TIME"] >= metadata["START_TIME"],
             "USEABLE_START_TIME before START_TIME"
         )
         require(
             metadata["USEABLE_STOP_TIME"] <= metadata["STOP_TIME"],
             "USEABLE_STOP_TIME after STOP_TIME"
         )
Exemplo n.º 11
0
 def func(self, ephemeris_segment):
     require(
         ephemeris_segment._covariance_data is None,
         "Covariance data block not supported in OEM v1.0"
     )
Exemplo n.º 12
0
 def func(self, data_section):
     require(
         all((data_section.states[idx].epoch < data_section.states[idx +
                                                                   1].epoch)
             for idx in range(len(data_section.states) - 1)),
         "States in data section are not ordered by epoch")
Exemplo n.º 13
0
 def func(self, state):
     require(state.position.size == 3, "State position size != 3")
     require(state.velocity.size == 3, "State velocity size != 3")
     if state.acceleration is not None:
         require(state.acceleration.size == 3,
                 "State acceleration size != 3")
Exemplo n.º 14
0
 def func(self, state):
     require(state.acceleration is None,
             "State in v1.0 OEM cannot have acceleration entries")
Exemplo n.º 15
0
 def func(self, metadata):
     require(
         "REF_FRAME_EPOCH" not in metadata,
         "Metadata keyword 'REF_FRAME_EPOCH' not supported in OEM v1.0"
     )