Пример #1
0
    def satpos(self):
        """Get actual satellite position in geodetic coordinates (WGS-84).

        Evaluate orbit polynomials at the start time of the scan.

        Returns: Longitude [deg east], Latitude [deg north] and Altitude [m]
        """
        start_times_poly = get_cds_time(
            days=self.nc['orbit_polynomial_start_time_day'].values,
            msecs=self.nc['orbit_polynomial_start_time_msec'].values)
        end_times_poly = get_cds_time(
            days=self.nc['orbit_polynomial_end_time_day'].values,
            msecs=self.nc['orbit_polynomial_end_time_msec'].values)
        orbit_polynomials = {
            'StartTime': np.array([start_times_poly]),
            'EndTime': np.array([end_times_poly]),
            'X': self.nc['orbit_polynomial_x'].values,
            'Y': self.nc['orbit_polynomial_y'].values,
            'Z': self.nc['orbit_polynomial_z'].values,
        }
        poly_finder = OrbitPolynomialFinder(orbit_polynomials)
        orbit_polynomial = poly_finder.get_orbit_polynomial(self.start_time)
        return get_satpos(
            orbit_polynomial=orbit_polynomial,
            time=self.start_time,
            semi_major_axis=self.mda['projection_parameters']['a'],
            semi_minor_axis=self.mda['projection_parameters']['b'],
        )
Пример #2
0
 def test_get_satpos(self, orbit_polynomial, time):
     """Test getting the position in geodetic coordinates."""
     lon, lat, alt = get_satpos(orbit_polynomial=orbit_polynomial,
                                time=time,
                                semi_major_axis=6378169.00,
                                semi_minor_axis=6356583.80)
     np.testing.assert_allclose(
         [lon, lat, alt],
         [-3.55117540817073, -0.5711243456528018, 35783296.150123544])
Пример #3
0
    def satpos(self):
        """Get actual satellite position in geodetic coordinates (WGS-84).

        Evaluate orbit polynomials at the start time of the scan.

        Returns: Longitude [deg east], Latitude [deg north] and Altitude [m]
        """
        poly_finder = OrbitPolynomialFinder(
            self.header['15_DATA_HEADER']['SatelliteStatus']['Orbit']
            ['OrbitPolynomial'])
        orbit_polynomial = poly_finder.get_orbit_polynomial(self.start_time)
        return get_satpos(
            orbit_polynomial=orbit_polynomial,
            time=self.start_time,
            semi_major_axis=self.mda['projection_parameters']['a'],
            semi_minor_axis=self.mda['projection_parameters']['b'])
Пример #4
0
    def satpos(self):
        """Get actual satellite position in geodetic coordinates (WGS-84).

        Evaluate orbit polynomials at the start time of the scan.

        Returns: Longitude [deg east], Latitude [deg north] and Altitude [m]
        """
        a, b = self.get_earth_radii()
        start_time = self.prologue['ImageAcquisition'][
            'PlannedAcquisitionTime']['TrueRepeatCycleStart']
        poly_finder = OrbitPolynomialFinder(
            self.prologue['SatelliteStatus']['Orbit']['OrbitPolynomial'])
        orbit_polynomial = poly_finder.get_orbit_polynomial(start_time)
        return get_satpos(
            orbit_polynomial=orbit_polynomial,
            time=start_time,
            semi_major_axis=a,
            semi_minor_axis=b,
        )