### Install Asgard Wheel Package Source: https://github.com/avalentino/asgard-legacy/blob/main/HOWTO.md Installs a pre-compiled Asgard wheel package. This method is simpler than building from source and requires the wheel file to be compatible with the current Python version and OS architecture. ```bash pip install asgard-1.0[...].whl ``` -------------------------------- ### Build Asgard from Sources Source: https://github.com/avalentino/asgard-legacy/blob/main/HOWTO.md Clones the Asgard repository and installs it in editable mode using pip. This process builds any necessary binary extensions, requiring Cython and EOCFI binaries. ```bash git clone https://gitlab.eopf.copernicus.eu/geolib/asgard.git cd asgard pip install -e . ``` -------------------------------- ### Install SXGeo Wheel Package Source: https://github.com/avalentino/asgard-legacy/blob/main/HOWTO.md Installs the SXGeo Python wheel package from the local distribution directory. This command assumes the wheel file has been successfully generated in the 'dist' folder. ```bash pip install dist/sxgeo-[...].whl ``` -------------------------------- ### Orbit Initialization and Information Source: https://github.com/avalentino/asgard-legacy/blob/main/README.md Initializes the orbit calculator and computes information such as the ANX (Ascending Node Crossing) from orbit files. This is part of the acquisition geometry setup. ```c xo_orbit_init_file xo_orbit_info ``` -------------------------------- ### Asgard S2MSIProduct Initialization with S2GEO Legacy Source: https://github.com/avalentino/asgard-legacy/blob/main/README.md Demonstrates initializing the Asgard S2MSIProduct class using the legacy S2GEO loader. This method interfaces with the Rugged library via the SXGeo component and requires custom dictionary inputs for product initialization. ```python from asgard.drivers import s2geo_legacy # Assuming 'product_config' is a custom dictionary product = S2MSIProduct(product_config) ``` -------------------------------- ### Instantiate Sentinel-2 MSI Product Source: https://github.com/avalentino/asgard-legacy/blob/main/HOWTO.md Demonstrates the instantiation of an S2MSIProduct using an S2geoInterface to read configuration from an XML file. This sets up the product for Sentinel-2 Multispectral Instrument data processing. ```python import numpy as np import pytest from asgard_legacy.wrappers.sxgeo import Sxgeo # asgard module import sxgeo # jcc import from org.sxgeo.input.datamodels.sensor import Sensor from org.sxgeo.properties import SXGeoConstants from asgard.drivers.s2geo_legacy.s2geo_interface import S2geoInterface from asgard.products.sentinel2.msi import S2MSIProduct from asgard.products.sentinel2.s2_band import S2Band from asgard.products.sentinel2.s2_detector import S2Detector from asgard.products.sentinel2.s2_sensor import S2Sensor config = S2geoInterface("S2MSIdataset/no_refining/S2GEO_Input_interface.xml").read() product = S2MSIProduct(**config) cols = 2592 min_line = 0 max_line = 1000 ``` -------------------------------- ### Instantiate Sentinel-3 OLCI Product Source: https://github.com/avalentino/asgard-legacy/blob/main/HOWTO.md Demonstrates how to instantiate the S3OLCIProduct by loading various configuration files including DEM, navigation/attitude data, and pointing vectors. It then performs a direct localization operation using image coordinates. ```python import numpy as np from asgard.drivers.sentinel_3_legacy import S3LegacyDriver from asgard_legacy.products.sentinel3 import S3OLCIProduct dem_path = osp.join( ASGARD_DATA, "S3AOLCIdataset", "S3__AX___DEM_AX_20000101T000000_20991231T235959_20151214T120000___________________MPC_O_AL_001.SEN3", "AX___DEM_AX.EEF", ) frames = { "offsets": np.array( [8168.024560769051 + 0.000001 * k for k in range(100)], dtype="float64" ), } navatt_gps = np.load("resources/sample_timestamps_gps.npy") navatt_oop = np.load("resources/sample_oop.npy") navatt_orb = S3LegacyDriver.read_orbit_file("resources/sample_orbit.xml") navatt_att = S3LegacyDriver.read_attitude_file("resources/sample_attitude.xml") config = { "sat": "SENTINEL_3", "orbit_aux_info": { "orbit_state_vectors": [ S3LegacyDriver.read_orbit_file( "resources/S3/FRO/S3A_OPER_MPL_ORBRES_20220510T000000_20220520T000000_0001.EOF" ) ], }, "dem_config_file": dem_path, "pointing_vectors": S3LegacyDriver.olci_pointing_angles("resources/S3/OLCI/CAL/OL_1_CAL_AX.nc"), "thermoelastic": S3LegacyDriver.s3_thermoelastic_tables( "resources/S3/OLCI/CAL/OL_1_CAL_AX.nc", group="thermoelastic_model_EO" ), "frame": {"times": frames}, "navatt": { "orbit": navatt_orb, "attitude": navatt_att, "times": { "offsets": navatt_gps, }, "oop": navatt_oop, }, } prod = S3OLCIProduct(**config) img_coords = np.zeros((100, 740, 2), dtype="int32") for row in range(100): for col in range(740): img_coords[row, col, 0] = row img_coords[row, col, 1] = col ground_coords, times = prod.direct_loc(img_coords, geometric_unit="C2") ``` -------------------------------- ### Instantiate Sentinel-3 SLSTR Product Source: https://github.com/avalentino/asgard-legacy/blob/main/HOWTO.md Shows how to set up and create an S3SLSTRProduct instance. This involves loading orbit, attitude, DEM, and specific SLSTR geometry model files, followed by defining acquisition time configurations. ```python import numpy as np from asgard.drivers.sentinel_3_legacy import S3LegacyDriver from asgard.products.legacy.sentinel3 import S3SLSTRProduct navatt_orbit = S3LegacyDriver.read_orbit_file("navatt/sample_orbit.xml") navatt_attitude = S3LegacyDriver.read_attitude_file("navatt/sample_attitude.xml") navatt_times = np.load("navatt/sample_timestamps_gps.npy") navatt_oop = np.load("navatt/sample_oop.npy") dem_path = osp.join( ASGARD_DATA, "S3AOLCIdataset", "S3__AX___DEM_AX_20000101T000000_20991231T235959_20151214T120000___________________MPC_O_AL_001.SEN3", "AX___DEM_AX.EEF", ) nb_scan = 50 sample_time_array = np.array( [8340.86902955 + k * 0.299808 / 86400 for k in range(nb_scan)], dtype="float64", ) config = { "sat": "SENTINEL_3", "orbit_aux_info": { "orbit_state_vectors": [ S3LegacyDriver.read_orbit_file( "resources/S3/FRO/S3A_OPER_MPL_ORBRES_20221030T000000_20221109T000000_0001.EOF" ) ], }, "dem_config_file": dem_path, "thermoelastic": S3LegacyDriver.s3_thermoelastic_tables("GEC/SL_1_GEC_AX.nc"), "geometry_model": S3LegacyDriver.slstr_geometry_model("GEO/SL_1_GEO_AX.nc"), "sw_geocal": 3, "acquisition_times": { "NAD": { "scan_times": {"offsets": sample_time_array}, "nb_pixels": 1500, "first_acquisition": [2200 for k in range(nb_scan)], }, "OBL": { "scan_times": {"offsets": sample_time_array}, "nb_pixels": 900, "first_acquisition": [1060 for k in range(nb_scan)], }, "reference": "GPS", }, "navatt": { "orbit": navatt_orbit, "attitude": navatt_attitude, "times": {"offsets": navatt_times}, "oop": navatt_oop, }, } prod = S3SLSTRProduct(**config) img_coords = np.zeros((2, 14, 2), dtype="int32") for row in range(2): for col in range(14): img_coords[row, col, 0] = 49 * row img_coords[row, col, 1] = 100 * col gnd_nad, times_nad = prod.direct_loc(img_coords, geometric_unit="NAD/1KM/0") ``` -------------------------------- ### Build SXGeo using JCC and GraalVM Source: https://github.com/avalentino/asgard-legacy/blob/main/HOWTO.md Clones the SXGeo repository, sets up the GraalVM environment, and builds the JCC-GraalVM wrapper. This process generates the SXGeo wheel package. ```bash git clone https://gitlab.eopf.copernicus.eu/geolib/sxgeo.git cd sxgeo make sxgeo-jar export GRAALVM_INSTALL=/path/to/graalvm-community-openjdk-17.0.7+7.1 ./python/build_jcc_graalvm.sh ``` -------------------------------- ### Initialize S3OLCIProduct in Python Source: https://github.com/avalentino/asgard-legacy/blob/main/README.md Demonstrates initializing the S3OLCIProduct from a configuration dictionary. The dictionary contains sensor, orbit, DEM, pointing, thermoelastic, and frame information. Numpy arrays are used for large datasets. ```python config = { "sat": "SENTINEL_3", "orbit_aux_info": { "orbit_state_vectors": [ { "times": { "TAI": {"offsets": np.array([...])}, "UTC": {"offsets": np.array([...])}, "UT1": {"offsets": np.array([...])}, }, "positions": np.array([...]), "velocities": np.array([...]), "absolute_orbit": np.array([...]), }, ], }, "dem_config_file": "path_to_dem", "pointing_vectors": { "X": np.array([...]), "Y": np.array([...]), }, "thermoelastic": { "julian_days": np.array([...]), "quaternions_1": np.array([...]), "quaternions_2": np.array([...]), "quaternions_3": np.array([...]), "quaternions_4": np.array([...]), "on_orbit_positions_angle": np.array([...]), }, "frame": { "times": {"offsets": np.array([...])}, }, } my_product = S3OLCIProduct(**config) ``` -------------------------------- ### Asgard S2MSIProduct Methods for S2GEO Tasks Source: https://github.com/avalentino/asgard-legacy/blob/main/README.md This snippet lists various S2GEO tasks and their corresponding methods within the Asgard S2MSIProduct. It covers footprint computations, mask projections, and angle calculations. ```markdown |S2GEO task| ASGARD S2MSIProduct method | |--|--| |ComputeGranuleBandFootprint()| call footprint() function for all band and detector (step in GIPP)| |ComputeGranuleFootprint()| footprint() | |ComputeDetectorFootprint()| footprint() | |ComputeFullResGlobalFootprint()| footprint() | |ComputeGranuleQLFootprint()| *no specific function* | |ComputeGlobalFootprint()| footprint() | |L1BMaskProjection()| direct_loc() | |ComputeTileInitTileAngles()| sun_angles() | |ComputeIncidenceAngles()| incidence_angles() | |ComputeTOAGRID()| inverse_loc() | |ComputeGeometricHeadertList()| incidence_angles()<r> sun_angles() | |ComputeCollocationGrid()| direct_loc()<r> inverse_loc() | |CloudMaskProjection()| direct_loc()<r>at constant altitude | |ComputeQLDatationModel()| *no specific function* | ``` -------------------------------- ### Time Reference and Leap Second Handling Source: https://github.com/avalentino/asgard-legacy/blob/main/README.md Manages time references, including initialization and retrieving leap second information. This is critical for accurate time correlation in product formatting. ```c xl_time_ref_init_file xp_sat_att_init_file xp_sat_nominal_att_init xp_sat_att_angle_init xp_instr_att_matrix_init xp_attitude_init xl_time_get_leap_second_info ``` -------------------------------- ### Geo-referencing Initialization and Computations (Python) Source: https://github.com/avalentino/asgard-legacy/blob/main/README.md Initializes geo-referencing models, attitude calculators, and DEM structures. It computes sun position vectors and handles satellite attitude alignment. Dependencies include EOCFI functions for model initialization, attitude computation, and sun position calculation. ```Python S3OLCIProduct ThermoelasticModel xl_model_init xo_orbit_init_file xo_orbit_info xl_time_processing_to_processing xp_sat_att_init_file xp_sat_nominal_att_init xp_sat_att_angle_init xp_instr_att_matrix_init xp_attitude_init Sat_to_OLCI_Trans xp_dem_init xl_sun __init__() __init__() __init__() __init__() __init__() ``` -------------------------------- ### Spatial Re-sampling Initialization and Tie Point Computation (Python) Source: https://github.com/avalentino/asgard-legacy/blob/main/README.md Initializes attitude IDs for Forward (FR) and Reverse (RR) tie points and computes tie point grids. This involves initializing attitude data and performing satellite-to-instrument transformations. Dependencies include EOCFI functions for attitude initialization and OSV computation. ```Python GroundTrackGrid S3OLCIProduct xp_attitude_init xp_instr_att_matrix_init xo_osv_compute Sat_to_OLCI_Trans direct_loc() ``` -------------------------------- ### Asgard S2MSIProduct V1.1 Caveats Source: https://github.com/avalentino/asgard-legacy/blob/main/README.md This section details caveats for V1.1 of the Asgard S2MSIProduct, specifically mentioning that certain functions are declared but not yet implemented, and others are not implemented at constant altitude. ```markdown * The `S2MSIProduct.sun_angles()` and `S2MSIProduct.incidence_angles()` functions are declared and documented, but they are not implemented yet. * The `S2MSIProduct.direct_loc()` at constant altitude is not implemented. ``` -------------------------------- ### ASGARD ExplorerOrbitModel and Navigation Functions Source: https://github.com/avalentino/asgard-legacy/blob/main/README.md ASGARD functions for handling orbit data, including initialization and retrieval of Attitude Navigation and Index (ANX) from orbit files. These are vital for precise geolocation. ```Python ExplorerOrbitModel `xo_orbit_init_file` `xo_orbit_info` ``` -------------------------------- ### Time Conversion Utilities Source: https://github.com/avalentino/asgard-legacy/blob/main/README.md Provides utilities for converting time between different processing stages and performing GPS scale conversions. These are essential for accurate temporal processing. ```c xl_time_transport_to_processing xp_target_ground_range xl_time_processing_to_processing xl_time_processing_to_processing ``` -------------------------------- ### Copy GDAL JARs to Maven Repository Source: https://github.com/avalentino/asgard-legacy/blob/main/HOWTO.md Copies GDAL JAR files to the local Maven repository. This is a prerequisite for building SXGeo, ensuring Maven can find the necessary GDAL dependencies. ```bash mkdir -p ~/.m2/repository/org/gdal/gdal/${GDAL_VERSION} cp gdal*.jar ~/.m2/repository/org/gdal/gdal/${GDAL_VERSION} ``` -------------------------------- ### Initialize Time Reference and Data Structures (Python) Source: https://github.com/avalentino/asgard-legacy/blob/main/README.md Initializes time references and data structures for processing, including file reading and time scale conversions. It involves functions to retrieve time IDs, processing times, model IDs, and orbit IDs. Dependencies include specific EOCFI functions for initialization and data transport. ```Python ExplorerTimeReference S3LegacyDriver S3OLCIProduct xl_time_ref_init_file xl_time_transport_to_processing from_transport() xl_model_init xo_orbit_init_file xo_orbit_info __init__() ``` -------------------------------- ### Calculate Pixel Coordinates using NumPy Source: https://github.com/avalentino/asgard-legacy/blob/main/HOWTO.md Calculates 9 pixel coordinates representing edges and centers using NumPy's linspace. These coordinates are then used to call the direct location method from the Asgard product. ```python pixels = np.array( [ [row, col] for row in np.linspace(min_line, max_line, 3) for col in np.linspace(0, cols, 3) ], np.int32, ) grounds, times = product.direct_loc(pixels, geometric_unit="B02/D01") ``` -------------------------------- ### ASGARD S3SLSTRProduct Geolocation Functions Source: https://github.com/avalentino/asgard-legacy/blob/main/README.md Functions for performing direct geolocation and generating quasi-Cartesian grids for SLSTR products. These map satellite measurements to ground coordinates. ```Python S3SLSTRProduct `direct_loc()` `quasi_cartesian_grid()` `tie_points_grid()` ``` -------------------------------- ### Extract and Process NAVATT Data (Python) Source: https://github.com/avalentino/asgard-legacy/blob/main/README.md Extracts Navigation and Attitude (NAVATT) data, converts time scales from GPS to TAI and UTC, and transforms position and velocity from J2000 to Earth Fixed coordinates. It also handles writing orbit and attitude files. Dependencies include EOCFI functions for time conversion, coordinate transformation, and file writing. ```Python ExplorerDriver S3LegacyDriver xl_time_processing_to_processing xl_change_cart_cs xl_time_processing_to_ascii xd_write_orbit_file xd_write_att fill_other_timescales() change_orbit_frame() read_navatt_file() write_orbit_file() write_attitude_file() ``` -------------------------------- ### ASGARD S3LegacyDriver Functions Source: https://github.com/avalentino/asgard-legacy/blob/main/README.md Core driver functions within the S3LegacyDriver for processing navigation and attitude data, including parsing timestamps and converting time formats. These facilitate accurate positioning. ```Python S3LegacyDriver `read_navatt_file()` `parse_timestamps()` ``` -------------------------------- ### Compute Satellite Navigation and Attitude (Python) Source: https://github.com/avalentino/asgard-legacy/blob/main/README.md Computes the satellite's position and velocity (OSV) at current times, including extra data for track direction and Earth-fixed coordinates. It also handles the transformation of satellite attitude data to the instrument's frame. Dependencies include EOCFI functions for OSV computation and satellite-to-instrument transformations. ```Python xo_osv_compute xo_osv_compute_extra Sat_to_OLCI_Trans ``` -------------------------------- ### Sentinel 3 SRAL L1b Pre-processing: Locate Measurements Source: https://github.com/avalentino/asgard-legacy/blob/main/README.md Locates measurements for Sentinel 3 SRAL L1b pre-processing. It utilizes EOCFI functions for time and orbit initialization, and ASGARD's S3SRALProduct.direct_loc for the actual location computation. ```python S3SRALProduct.direct_loc ``` -------------------------------- ### ASGARD TimeReference Functions Source: https://github.com/avalentino/asgard-legacy/blob/main/README.md Functions within the ASGARD library used for managing and processing time references, including initialization, correlation, and transport to processing. These are crucial for synchronizing data. ```Python TimeReference TimestampModel convert() to_str() leap_seconds() ``` -------------------------------- ### Ground Track and Geometry Calculations Source: https://github.com/avalentino/asgard-legacy/blob/main/README.md Provides functions for calculating ground track intersections with a reference ellipsoid, incidence angles, across-track pointing, and sun angles. These are essential for acquisition geometry and targetting. ```c xp_target_ground_range xp_target_extra_main xp_target_extra_target_to_sun ``` -------------------------------- ### Calculate Sun Coordinates in Instrument Frame (S3OLCIProduct) Source: https://github.com/avalentino/asgard-legacy/blob/main/README.md Computes the Sun's coordinates within the instrument's reference frame. This functionality is provided by the `instrument_to_sun` method of the `S3OLCIProduct` class. ```python class S3OLCIProduct: # ... other methods ... def instrument_to_sun(self): """Computes Sun coordinates in the instrument frame.""" # Implementation details for converting instrument frame to sun frame # This would involve internal calculations and potentially accessing # satellite attitude and ephemeris data. pass # Example usage: # product = S3OLCIProduct() # sun_coords_instrument_frame = product.instrument_to_sun() ``` -------------------------------- ### ASGARD ExplorerEarthBody Functions Source: https://github.com/avalentino/asgard-legacy/blob/main/README.md Functions from the ExplorerEarthBody class used for calculating geodetic distances, which are fundamental for accurate Earth-based measurements and mapping. ```Python ExplorerEarthBody `geodetic_distance()` ``` -------------------------------- ### Pixel Georeferencing Computations (Python) Source: https://github.com/avalentino/asgard-legacy/blob/main/README.md Performs pixel georeferencing by computing the first intersection with the reference ellipsoid and DEM. It also calculates target-to-sun directions. Dependencies include EOCFI functions for intersection calculations and target-to-sun direction computation. ```Python S3OLCIProduct direct_loc() sun_angles() xp_target_inter xp_target_inter_extra xp_target_extra_target_to_sun ``` -------------------------------- ### ASGARD ThermoelasticModel Functions Source: https://github.com/avalentino/asgard-legacy/blob/main/README.md Functions related to the ThermoelasticModel, specifically for transforming satellite data to the SLSTR instrument frame. This accounts for instrument-specific geometric considerations. ```Python ThermoelasticModel Sat_to_STR_Trans ``` -------------------------------- ### ASGARD SLSTR Product Angle Calculation Functions Source: https://github.com/avalentino/asgard-legacy/blob/main/README.md Functions for calculating incidence angles and sun angles for SLSTR products. These are important for radiometric calibration and understanding illumination conditions. ```Python S3SLSTRProduct `incidence_angles()` `sun_angles()` ``` -------------------------------- ### Displaying Astronomical Data Table Source: https://github.com/avalentino/asgard-legacy/blob/main/tests/resources/bulletinb-415.txt This snippet represents the tabular data of daily final values for x, y, UT1-UTC, dX, and dY. It includes date, Modified Julian Date (MJD), and their respective errors. The data is formatted for readability. ```plaintext DATE MJD x y UT1-UTC dX dY x err y err UT1 err dX err dY err (0 h UTC) mas mas ms mas mas mas mas ms mas mas Final values Mean formal error 0.026 0.020 0.0116 0.033 0.094 2022 7 2 59762 232.881 459.225 -67.2447 0.393 -0.073 0.025 0.021 0.0117 0.086 0.103 2022 7 3 59763 236.109 457.809 -65.9625 0.367 -0.099 0.025 0.021 0.0116 0.086 0.102 2022 7 4 59764 239.234 456.579 -64.9159 0.340 -0.125 0.025 0.021 0.0117 0.086 0.101 2022 7 5 59765 241.892 455.171 -64.1393 0.313 -0.150 0.025 0.021 0.0088 0.086 0.101 2022 7 6 59766 244.450 453.302 -63.5337 0.314 -0.154 0.026 0.021 0.0109 0.086 0.101 2022 7 7 59767 247.124 451.582 -63.0501 0.321 -0.151 0.026 0.021 0.0108 0.085 0.101 2022 7 8 59768 249.756 450.120 -62.5785 0.318 -0.142 0.026 0.021 0.0105 0.085 0.100 2022 7 9 59769 252.297 448.682 -62.0271 0.311 -0.130 0.026 0.021 0.0104 0.085 0.099 2022 7 10 59770 254.733 447.060 -61.2967 0.305 -0.118 0.027 0.021 0.0102 0.084 0.097 2022 7 11 59771 256.857 445.395 -60.3249 0.298 -0.107 0.027 0.021 0.0101 0.084 0.095 2022 7 12 59772 258.411 443.974 -59.1324 0.291 -0.095 0.027 0.021 0.0099 0.084 0.094 2022 7 13 59773 259.174 442.066 -57.7813 0.300 -0.118 0.028 0.021 0.0098 0.084 0.095 2022 7 14 59774 260.201 439.888 -56.4587 0.313 -0.150 0.027 0.020 0.0138 0.083 0.096 2022 7 15 59775 261.642 438.122 -55.2630 0.326 -0.182 0.027 0.021 0.0146 0.083 0.098 2022 7 16 59776 263.441 436.373 -54.2876 0.335 -0.163 0.027 0.021 0.0147 0.083 0.098 2022 7 17 59777 265.267 434.398 -53.5228 0.344 -0.122 0.027 0.021 0.0148 0.083 0.098 2022 7 18 59778 267.234 432.352 -52.8927 0.352 -0.081 0.028 0.021 0.0147 0.082 0.098 2022 7 19 59779 269.260 430.298 -52.3068 0.360 -0.040 0.028 0.021 0.0144 0.082 0.098 2022 7 20 59780 270.974 428.173 -51.6628 0.337 -0.064 0.028 0.021 0.0143 0.082 0.098 2022 7 21 59781 272.574 426.255 -50.8922 0.306 -0.105 0.028 0.021 0.0130 0.082 0.098 2022 7 22 59782 274.053 424.453 -49.9591 0.275 -0.147 0.028 0.021 0.0127 0.081 0.098 2022 7 23 59783 275.681 422.673 -48.8673 0.282 -0.165 0.028 0.021 0.0124 0.081 0.097 2022 7 24 59784 277.006 420.915 -47.6028 0.304 -0.173 0.028 0.021 0.0122 0.081 0.096 2022 7 25 59785 278.471 419.285 -46.2003 0.327 -0.181 0.027 0.020 0.0121 0.080 0.095 2022 7 26 59786 279.867 417.962 -44.7491 0.349 -0.190 0.027 0.020 0.0134 0.080 0.094 2022 7 27 59787 281.044 416.126 -43.2579 0.331 -0.183 0.027 0.020 0.0126 0.080 0.092 2022 7 28 59788 282.267 414.205 -41.7953 0.303 -0.172 0.027 0.020 0.0118 0.079 0.090 2022 7 29 59789 283.345 411.841 -40.4282 0.274 -0.161 0.026 0.020 0.0115 0.079 0.087 2022 7 30 59790 284.587 409.400 -39.2089 0.267 -0.190 0.026 0.020 0.0114 0.078 0.084 2022 7 31 59791 286.000 407.286 -38.1849 0.267 -0.233 0.026 0.020 0.0112 0.078 0.081 Preliminary extension 2022 8 1 59792 287.161 405.194 -37.3892 0.268 -0.276 0.026 0.020 0.0117 0.078 0.078 2022 8 2 59793 287.882 403.262 -36.7846 0.268 -0.319 0.026 0.019 0.0116 0.077 0.075 2022 8 3 59794 288.468 401.019 -36.2792 0.267 -0.295 0.026 0.019 0.0114 0.077 0.072 2022 8 4 59795 289.493 398.710 -35.8145 0.265 -0.254 0.026 0.019 0.0113 0.076 0.070 2022 8 5 59796 290.582 396.579 -35.3263 0.267 -0.247 0.026 0.019 0.0112 0.076 0.067 2022 8 6 59797 291.085 394.219 -34.7316 0.271 -0.253 0.026 0.019 0.0110 0.075 0.065 2022 8 7 59798 291.486 391.653 -33.9451 0.275 -0.259 0.025 0.019 0.0109 0.075 0.062 2022 8 8 59799 292.295 389.055 -32.9721 0.279 -0.264 0.025 0.019 0.0107 0.074 0.060 2022 8 9 59800 293.212 386.233 -31.8918 0.282 -0.270 0.025 0.019 0.0105 0.074 0.059 ``` -------------------------------- ### ASGARD GroundTrackGrid Geolocation Functions Source: https://github.com/avalentino/asgard-legacy/blob/main/README.md Functions for generating ground track grids and calculating (x,y) coordinates from geographic data. These are essential for mapping sensor data onto the Earth's surface. ```Python GroundTrackGrid `direct_loc()` `ground_to_xy()` ``` -------------------------------- ### Sentinel 3 MWR L1b Pre-processing: Locate Measurements Source: https://github.com/avalentino/asgard-legacy/blob/main/README.md Locates measurements for Sentinel 3 MWR L1b pre-processing. This function relies on multiple EOCFI functions for model initialization, orbit data, time references, and attitude, utilizing ASGARD's S3MWRProduct.direct_loc. ```python S3MWRProduct.direct_loc ``` -------------------------------- ### Compute Satellite Attitude Source: https://github.com/avalentino/asgard-legacy/blob/main/README.md Computes the satellite attitude at a given Tie Frame time. This functionality is used for both FR and RR tie frames and involves setting transformation matrices. ```c xp_attitude_compute xp_instr_att_set_matrix ``` -------------------------------- ### Sentinel 3 SRAL L1b Pre-processing: Convert GPS time to UTC Source: https://github.com/avalentino/asgard-legacy/blob/main/README.md Converts GPS time to UTC for Sentinel 3 SRAL L1b pre-processing. This involves several EOCFI time reference functions and ASGARD's TimeReference.leap_seconds() for leap second information. ```python TimeReference.leap_seconds() ``` -------------------------------- ### Compute Orbit State Vector Source: https://github.com/avalentino/asgard-legacy/blob/main/README.md Calculates the orbit state vector (OSV), which includes position and velocity, at a specified time. This is crucial for satellite navigation and is used for both general orbit calculations and extra processing. ```c xo_osv_compute xo_osv_compute_extra ``` -------------------------------- ### Frame Transformations Source: https://github.com/avalentino/asgard-legacy/blob/main/README.md Handles transformations between different coordinate frames, including satellite to instrument frames and converting to mission CFI instrument frames. This is used in attitude and geometry calculations. ```c Sat_to_OLCI_Trans xp_change_frame ``` -------------------------------- ### Combined Earth Orientation Parameters (IERS Rapid Service) Source: https://github.com/avalentino/asgard-legacy/blob/main/tests/resources/orekit/IERS/S2__OPER_AUX_UT1UTC_ADG__20220916T000000_V20220916T000000_20230915T000000.txt Table of combined Earth Orientation Parameters including Modified Julian Date (MJD), x and y pole coordinates with errors, and UT1-UTC with error. Data is presented in arcseconds (") for coordinates and seconds (s) for time differences. ```text MJD x error y error UT1-UTC error " " " " s s 59831 0.30036 .00009 0.30869 .00009 -0.009817 0.000013 59832 0.29921 .00009 0.30569 .00009 -0.009894 0.000013 59833 0.29855 .00009 0.30287 .00009 -0.010178 0.000013 59834 0.29809 .00009 0.30030 .00009 -0.010551 0.000018 59835 0.29754 .00009 0.29794 .00009 -0.010856 0.000019 59836 0.29696 .00009 0.29582 .00009 -0.010985 0.000021 59837 0.29634 .00009 0.29388 .00009 -0.010935 0.000025 ``` -------------------------------- ### Compute Target to Satellite Elevation Angle using Numpy Source: https://github.com/avalentino/asgard-legacy/blob/main/README.md Calculates the elevation angle between a target and a satellite in the instrument frame. This is derived from three Cartesian positions using the dot product and arccosine functions from the Numpy library. ```python import numpy as np def compute_elevation_angle(target_pos, sat_pos, ref_ground_pos): # Assuming pos are numpy arrays representing cartesian coordinates # Vector from target to satellite target_to_sat = sat_pos - target_pos # Vector from reference ground point to target ref_to_target = target_pos - ref_ground_pos # Normalize vectors target_to_sat_norm = target_to_sat / np.linalg.norm(target_to_sat) ref_to_target_norm = ref_to_target / np.linalg.norm(ref_to_target) # Compute dot product dot_product = np.dot(target_to_sat_norm, ref_to_target_norm) # Ensure dot product is within valid range for arccos due to potential floating point inaccuracies dot_product = np.clip(dot_product, -1.0, 1.0) # Compute angle in radians angle_rad = np.arccos(dot_product) return angle_rad ``` -------------------------------- ### Sun Position Calculation Source: https://github.com/avalentino/asgard-legacy/blob/main/README.md Computes the sun position vector in the Earth-Fixed (EF) frame. This is used for sun angle calculations in acquisition geometry. ```c xl_sun ``` -------------------------------- ### Earth Orientation Calculation Formulas Source: https://github.com/avalentino/asgard-legacy/blob/main/tests/resources/orekit/IERS/S2__OPER_AUX_UT1UTC_ADG__20220916T000000_V20220916T000000_20230915T000000.txt Formulas for calculating Earth orientation parameters, including the relationship between Julian Date and Modified Julian Date (MJD), the formula for UT2-UT1, and the conversion between TT and TAI. ```text MJD = Julian Date - 2 400 000.5 days UT2-UT1 = 0.022 sin(2*pi*T) - 0.012 cos(2*pi*T) - 0.006 sin(4*pi*T) + 0.007 cos(4*pi*T) where pi = 3.14159265... and T is the date in Besselian years. TT = TAI + 32.184 seconds DUT1= (UT1-UTC) transmitted with time signals = 0.0 seconds beginning 28 July 2022 at 0000 UTC Beginning 1 January 2017: TAI-UTC = 37.000 000 seconds ``` -------------------------------- ### Estimate Accuracy of Predictions (Formulas) Source: https://github.com/avalentino/asgard-legacy/blob/main/tests/resources/orekit/IERS/S2__OPER_AUX_UT1UTC_ADG__20220916T000000_V20220916T000000_20230915T000000.txt These formulas estimate the accuracy of the 'x', 'y', and 't' predictions based on the Modified Julian Date (MJD). The accuracy is expressed as a function of the difference between the current MJD and a reference MJD. ```mathematica S x,y = 0.00068 (MJD-59837)**0.80 S t = 0.00025 (MJD-59837)**0.75 ``` -------------------------------- ### Calculate Astronomical Predictions (Formulas) Source: https://github.com/avalentino/asgard-legacy/blob/main/tests/resources/orekit/IERS/S2__OPER_AUX_UT1UTC_ADG__20220916T000000_V20220916T000000_20230915T000000.txt These formulas calculate the 'x' and 'y' polar coordinates and the 'UT1-UTC' difference based on the Modified Julian Date (MJD). They utilize trigonometric functions with arguments derived from MJD. ```mathematica x = 0.1431 + 0.1296 \cos A + 0.0036 \sin A + 0.0186 \cos C - 0.0573 \sin C y = 0.3515 + 0.0034 \cos A - 0.1209 \sin A - 0.0573 \cos C - 0.0186 \sin C UT1-UTC = -0.0453 + 0.00035 (MJD - 59845) - (UT2-UT1) where A = 2*pi*(MJD-59837)/365.25 and C = 2*pi*(MJD-59837)/435. ``` -------------------------------- ### TAI-UTC Offset Source: https://github.com/avalentino/asgard-legacy/blob/main/tests/resources/orekit/IERS/S2__OPER_AUX_UT1UTC_ADG__20220916T000000_V20220916T000000_20230915T000000.txt This line specifies the TAI-UTC offset for a particular Modified Julian Date (MJD). This value is important for time scale conversions in astronomical calculations. ```mathematica TAI-UTC(MJD 59838) = 37.0 ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.