"""
astrojax is a simple, minimal satellite orbit and attitude dynamics library implemented in JAX.
"""

from ._gp_record import GPRecord
from .attitude_dynamics import (
    AttitudeDynamicsConfig,
    SpacecraftInertia,
    create_attitude_dynamics,
    euler_equation,
    normalize_attitude_state,
    quaternion_derivative,
    torque_gravity_gradient,
)
from .attitude_representations import (
    EulerAngle,
    EulerAngleOrder,
    EulerAxis,
    Quaternion,
    RotationMatrix,
    Rx,
    Ry,
    Rz,
)
from .config import get_dtype, set_dtype
from .constants import (
    AS2RAD,
    AU,
    C_LIGHT,
    DEG2RAD,
    ECC_EARTH,
    GM_EARTH,
    GM_JUPITER,
    GM_MARS,
    GM_MERCURY,
    GM_MOON,
    GM_NEPTUNE,
    GM_PLUTO,
    GM_SATURN,
    GM_SUN,
    GM_URANUS,
    GM_VENUS,
    J2_EARTH,
    JD_MJD_OFFSET,
    MJD2000,
    OMEGA_EARTH,
    P_SUN,
    R_EARTH,
    R_SUN,
    RAD2AS,
    RAD2DEG,
    WGS84_a,
    WGS84_f,
)
from .coordinates import (
    position_ecef_to_geocentric,
    position_ecef_to_geodetic,
    position_enz_to_azel,
    position_geocentric_to_ecef,
    position_geodetic_to_ecef,
    relative_position_ecef_to_enz,
    relative_position_enz_to_ecef,
    rotation_ellipsoid_to_enz,
    rotation_enz_to_ellipsoid,
    state_eci_to_koe,
    state_koe_to_eci,
)
from .datasets import (
    asteroid_state_ecliptic,
    download_mpc_file,
    download_sbdb_file,
    get_asteroid_ephemeris,
    get_sbdb_asteroid_ephemeris,
    load_mpc_asteroids,
    load_mpc_from_file,
    load_mpc_json_to_dataframe,
    load_sbdb_asteroids,
    load_sbdb_csv_to_dataframe,
    load_sbdb_from_file,
    packed_mpc_epoch_to_jd,
    unpack_mpc_epoch,
)
from .eop import (
    EOPData,
    EOPExtrapolation,
    download_standard_eop_file,
    get_dxdy,
    get_eop,
    get_lod,
    get_pm,
    get_ut1_utc,
    load_cached_eop,
    load_default_eop,
    load_eop_from_file,
    load_eop_from_standard_file,
    static_eop,
    zero_eop,
)
from .epoch import Epoch
from .estimation import (
    FilterResult,
    FilterState,
    UKFConfig,
    ekf_predict,
    ekf_update,
    ukf_predict,
    ukf_update,
)
from .frames import (
    bias_precession_nutation,
    earth_rotation,
    earth_rotation_angle,
    polar_motion,
    rotation_ecef_to_eci,
    rotation_eci_to_ecef,
    rotation_gcrf_to_itrf,
    rotation_itrf_to_gcrf,
    state_ecef_to_eci,
    state_eci_to_ecef,
    state_gcrf_to_itrf,
    state_itrf_to_gcrf,
)
from .integrators import (
    AdaptiveConfig,
    StepResult,
    dp54_step,
    rk4_step,
    rkf45_step,
    rkn1210_step,
)
from .orbit_dynamics import (
    EMB_ID,
    JUPITER_ID,
    MARS_ID,
    MERCURY_ID,
    NEPTUNE_ID,
    SATURN_ID,
    URANUS_ID,
    VENUS_ID,
    ForceModelConfig,
    GravityModel,
    SpacecraftParams,
    accel_drag,
    accel_gravity,
    accel_gravity_spherical_harmonics,
    accel_point_mass,
    accel_srp,
    accel_third_body_moon,
    accel_third_body_sun,
    create_orbit_dynamics,
    density_harris_priester,
    density_nrlmsise00,
    density_nrlmsise00_geod,
    eclipse_conical,
    eclipse_cylindrical,
    emb_position_jpl_approx,
    jupiter_position_jpl_approx,
    mars_position_jpl_approx,
    mercury_position_jpl_approx,
    moon_position,
    neptune_position_jpl_approx,
    planet_position_jpl_approx,
    saturn_position_jpl_approx,
    sun_position,
    uranus_position_jpl_approx,
    venus_position_jpl_approx,
)
from .orbit_measurements import (
    gnss_measurement_noise,
    gnss_position_measurement,
    gnss_position_velocity_measurement,
    gnss_position_velocity_noise,
)
from .orbits import (
    anomaly_eccentric_to_mean,
    anomaly_eccentric_to_true,
    anomaly_mean_to_eccentric,
    anomaly_mean_to_true,
    anomaly_true_to_eccentric,
    anomaly_true_to_mean,
    apoapsis_distance,
    apogee_altitude,
    apogee_velocity,
    geo_sma,
    mean_motion,
    orbital_period,
    orbital_period_from_state,
    periapsis_distance,
    perigee_altitude,
    perigee_velocity,
    semimajor_axis,
    semimajor_axis_from_orbital_period,
    state_koe_mean_to_osc,
    state_koe_osc_to_mean,
    sun_synchronous_inclination,
)
from .relative_motion import (
    hcw_derivative,
    hcw_stm,
    rotation_eci_to_rtn,
    rotation_rtn_to_eci,
    state_eci_to_roe,
    state_eci_to_rtn,
    state_oe_to_roe,
    state_roe_to_eci,
    state_roe_to_oe,
    state_rtn_to_eci,
)
from .space_weather import (
    SpaceWeatherData,
    download_sw_file,
    get_sw_ap,
    get_sw_ap_array,
    get_sw_ap_daily,
    get_sw_f107_adj,
    get_sw_f107_obs,
    get_sw_f107_obs_ctr81,
    get_sw_f107_obs_lst81,
    get_sw_kp,
    load_cached_sw,
    load_default_sw,
    load_sw_from_file,
    static_space_weather,
    zero_space_weather,
)

__all__ = [
    # Constants
    "DEG2RAD",
    "RAD2DEG",
    "AS2RAD",
    "RAD2AS",
    "JD_MJD_OFFSET",
    "MJD2000",
    "C_LIGHT",
    "AU",
    "R_EARTH",
    "WGS84_a",
    "WGS84_f",
    "GM_EARTH",
    "ECC_EARTH",
    "J2_EARTH",
    "OMEGA_EARTH",
    "GM_SUN",
    "R_SUN",
    "P_SUN",
    "GM_MOON",
    "GM_MERCURY",
    "GM_VENUS",
    "GM_MARS",
    "GM_JUPITER",
    "GM_SATURN",
    "GM_URANUS",
    "GM_NEPTUNE",
    "GM_PLUTO",
    # Attitude Representations
    "Rx",
    "Ry",
    "Rz",
    "Quaternion",
    "RotationMatrix",
    "EulerAngle",
    "EulerAngleOrder",
    "EulerAxis",
    # Config
    "set_dtype",
    "get_dtype",
    # EOP
    "EOPData",
    "EOPExtrapolation",
    "download_standard_eop_file",
    "get_dxdy",
    "get_eop",
    "get_lod",
    "get_pm",
    "get_ut1_utc",
    "load_cached_eop",
    "load_default_eop",
    "load_eop_from_file",
    "load_eop_from_standard_file",
    "static_eop",
    "zero_eop",
    # Epoch
    "Epoch",
    # Frames (GCRF/ITRF)
    "bias_precession_nutation",
    "earth_rotation_angle",
    "polar_motion",
    "rotation_gcrf_to_itrf",
    "rotation_itrf_to_gcrf",
    "state_gcrf_to_itrf",
    "state_itrf_to_gcrf",
    # Frames (ECI/ECEF aliases)
    "earth_rotation",
    "rotation_eci_to_ecef",
    "rotation_ecef_to_eci",
    "state_eci_to_ecef",
    "state_ecef_to_eci",
    # Relative Motion
    "rotation_rtn_to_eci",
    "rotation_eci_to_rtn",
    "state_eci_to_rtn",
    "state_rtn_to_eci",
    "state_oe_to_roe",
    "state_roe_to_oe",
    "state_eci_to_roe",
    "state_roe_to_eci",
    "hcw_derivative",
    "hcw_stm",
    # Coordinates
    "position_geocentric_to_ecef",
    "position_ecef_to_geocentric",
    "position_geodetic_to_ecef",
    "position_ecef_to_geodetic",
    "state_koe_to_eci",
    "state_eci_to_koe",
    "rotation_ellipsoid_to_enz",
    "rotation_enz_to_ellipsoid",
    "relative_position_ecef_to_enz",
    "relative_position_enz_to_ecef",
    "position_enz_to_azel",
    # Orbits
    "orbital_period",
    "orbital_period_from_state",
    "semimajor_axis_from_orbital_period",
    "semimajor_axis",
    "mean_motion",
    "perigee_velocity",
    "apogee_velocity",
    "periapsis_distance",
    "apoapsis_distance",
    "perigee_altitude",
    "apogee_altitude",
    "sun_synchronous_inclination",
    "geo_sma",
    "anomaly_eccentric_to_mean",
    "anomaly_mean_to_eccentric",
    "anomaly_true_to_eccentric",
    "anomaly_eccentric_to_true",
    "anomaly_true_to_mean",
    "anomaly_mean_to_true",
    "state_koe_osc_to_mean",
    "state_koe_mean_to_osc",
    # Attitude Dynamics
    "AttitudeDynamicsConfig",
    "SpacecraftInertia",
    "quaternion_derivative",
    "euler_equation",
    "torque_gravity_gradient",
    "create_attitude_dynamics",
    "normalize_attitude_state",
    # Orbit Dynamics
    "sun_position",
    "moon_position",
    # Planetary Ephemerides
    "MERCURY_ID",
    "VENUS_ID",
    "EMB_ID",
    "MARS_ID",
    "JUPITER_ID",
    "SATURN_ID",
    "URANUS_ID",
    "NEPTUNE_ID",
    "mercury_position_jpl_approx",
    "venus_position_jpl_approx",
    "emb_position_jpl_approx",
    "mars_position_jpl_approx",
    "jupiter_position_jpl_approx",
    "saturn_position_jpl_approx",
    "uranus_position_jpl_approx",
    "neptune_position_jpl_approx",
    "planet_position_jpl_approx",
    "accel_point_mass",
    "accel_gravity",
    "GravityModel",
    "accel_gravity_spherical_harmonics",
    "accel_third_body_sun",
    "accel_third_body_moon",
    "density_harris_priester",
    "density_nrlmsise00",
    "density_nrlmsise00_geod",
    "accel_drag",
    "accel_srp",
    "eclipse_conical",
    "eclipse_cylindrical",
    "ForceModelConfig",
    "SpacecraftParams",
    "create_orbit_dynamics",
    # Estimation
    "FilterState",
    "UKFConfig",
    "FilterResult",
    "ekf_predict",
    "ekf_update",
    "ukf_predict",
    "ukf_update",
    # Orbit Measurements
    "gnss_position_measurement",
    "gnss_measurement_noise",
    "gnss_position_velocity_measurement",
    "gnss_position_velocity_noise",
    # Integrators
    "StepResult",
    "AdaptiveConfig",
    "rk4_step",
    "rkf45_step",
    "dp54_step",
    "rkn1210_step",
    # Datasets (MPC)
    "asteroid_state_ecliptic",
    "download_mpc_file",
    "get_asteroid_ephemeris",
    "load_mpc_asteroids",
    "load_mpc_from_file",
    "load_mpc_json_to_dataframe",
    "packed_mpc_epoch_to_jd",
    "unpack_mpc_epoch",
    # Datasets (SBDB)
    "download_sbdb_file",
    "get_sbdb_asteroid_ephemeris",
    "load_sbdb_asteroids",
    "load_sbdb_csv_to_dataframe",
    "load_sbdb_from_file",
    # Space Weather
    "SpaceWeatherData",
    "download_sw_file",
    "get_sw_ap",
    "get_sw_ap_array",
    "get_sw_ap_daily",
    "get_sw_f107_adj",
    "get_sw_f107_obs",
    "get_sw_f107_obs_ctr81",
    "get_sw_f107_obs_lst81",
    "get_sw_kp",
    "load_cached_sw",
    "load_default_sw",
    "load_sw_from_file",
    "static_space_weather",
    "zero_space_weather",
    # GP Record
    "GPRecord",
]
