# import methods from the corresponding modules
from .cal import (
    cal_ahrs_so3,
    cal_dvl_acc_so3,
    cal_dvl_correct_by_sound_velocity,
    cal_dvl_jck_so3,
    cal_mag_ellipsoid_fit,
    cal_mag_ellipsoid_fit_fang,
    cal_mag_magfactor3,
    cal_mag_magyc_bfg,
    cal_mag_magyc_ifg,
    cal_mag_magyc_ls,
    cal_mag_magyc_nls,
    cal_mag_sar_aid,
    cal_mag_sar_kf,
    cal_mag_sar_ls,
    cal_mag_sphere_fit,
    cal_mag_twostep_hi,
    cal_mag_twostep_hsi,
)
from .environment import (
    ctd2oxygen_saturation,
    ctd2salinity,
    ctd2svel,
    ctp2pden,
    ctp2salinity,
    depth2pressure,
)
from .geo import (
    deg2m_lat,
    deg2m_lon,
    dms_to_decimal,
    get_local_gravity,
    latlon_to_zone_letter,
    latlon_to_zone_number,
    ll2utm,
    ll2xy,
    utm2ll,
    xy2ll,
)
from .lcmlog import (
    dict_to_struct,
    filter_channels_from_data,
    lcmlog_to_dict,
    merge_lcm_logs,
    msg_getconstants,
    msg_getfields,
    nav_structtype,
    parse_and_save,
    read_log,
    read_logs,
    struct_to_dict,
)
from .logging import setup_logging
from .math import (
    adjoint,
    axis_ang3,
    axis_ang6,
    derivative,
    difference,
    distance_to_se3,
    distance_to_so3,
    distance_traveled,
    filter_lowpass,
    filter_median,
    filter_savgol,
    hpr2quat,
    hpr2rot,
    left_qmatrix,
    matrix2xyzrph,
    matrix_exp3,
    matrix_exp6,
    matrix_inverse,
    matrix_log3,
    matrix_log6,
    max,
    mean,
    median,
    min,
    norm,
    normalize,
    pose_diff,
    print_stats,
    project_to_se3,
    project_to_so3,
    quat2hpr,
    quat2rot,
    quat2rph,
    quat_conj,
    quat_inv,
    quat_normalize,
    quat_positive_scalar,
    remove_mean,
    remove_median,
    remove_offset,
    resample,
    right_qmatrix,
    rot2hpr,
    rot2quat,
    rot2rph,
    rot_diff,
    rot_inv,
    rph2quat,
    rph2rot,
    saturate,
    se3_to_vec,
    so3_optimization,
    so3_to_vec,
    std,
    transpose,
    unwrap1pi,
    unwrap2pi,
    unwrap180,
    unwrap360,
    vec_to_se3,
    vec_to_so3,
    wrap1pi,
    wrap2pi,
    wrap180,
    wrap360,
    wrapunwrap,
    wrapunwrap360,
    xyzrph2matrix,
)
from .mbsystem import mbs_read_fnv
from .nav import (
    UUV_EKF,
    ahrs_complementary_filter,
    ahrs_correct_magfield,
    ahrs_hua_filter,
    ahrs_madgwick_filter,
    ahrs_mahony_filter,
    ahrs_raw_hdg,
    ahrs_raw_rp,
    ahrs_raw_rph,
    kf_lti_discretize,
    kf_predict,
    kf_update,
    navdvl_dead_reckoning,
    navdvl_kf,
    so3_integrator,
)
from .time import (
    datestr2utime,
    time_interval_indices,
    time_now,
    time_now_utc,
    timestamps_make_uniform,
    utime2datestr,
)

# Get __all__ from the corresponding modules
# time module
__all__ = [
    "time_now",
    "time_now_utc",
    "utime2datestr",
    "datestr2utime",
    "time_interval_indices",
    "timestamps_make_uniform",
]
# nav module
__all__ += [
    "so3_integrator",
    "ahrs_correct_magfield",
    "ahrs_raw_rp",
    "ahrs_raw_hdg",
    "ahrs_raw_rph",
    "ahrs_complementary_filter",
    "ahrs_mahony_filter",
    "ahrs_hua_filter",
    "ahrs_madgwick_filter",
    "kf_lti_discretize",
    "kf_predict",
    "kf_update",
    "navdvl_dead_reckoning",
    "navdvl_kf",
    "UUV_EKF",
]
# math module
__all__ += [
    "filter_median",
    "filter_savgol",
    "filter_lowpass",
    "xyzrph2matrix",
    "matrix2xyzrph",
    "matrix_inverse",
    "pose_diff",
    "adjoint",
    "vec_to_se3",
    "se3_to_vec",
    "axis_ang6",
    "matrix_exp6",
    "matrix_log6",
    "project_to_se3",
    "distance_to_se3",
    "rph2rot",
    "hpr2rot",
    "rot2hpr",
    "rot2rph",
    "rot_diff",
    "vec_to_so3",
    "so3_to_vec",
    "so3_optimization",
    "axis_ang3",
    "matrix_exp3",
    "matrix_log3",
    "rot_inv",
    "project_to_so3",
    "distance_to_so3",
    "rph2quat",
    "hpr2quat",
    "quat2rph",
    "quat2hpr",
    "quat2rot",
    "rot2quat",
    "norm",
    "normalize",
    "mean",
    "median",
    "std",
    "min",
    "max",
    "print_stats",
    "remove_offset",
    "remove_mean",
    "remove_median",
    "difference",
    "derivative",
    "resample",
    "distance_traveled",
    "saturate",
    "wrap360",
    "wrap180",
    "wrap2pi",
    "wrap1pi",
    "unwrap2pi",
    "unwrap1pi",
    "unwrap360",
    "unwrap180",
    "wrapunwrap",
    "wrapunwrap360",
    "transpose",
    "right_qmatrix",
    "left_qmatrix",
    "quat_conj",
    "quat_inv",
    "quat_normalize",
    "quat_positive_scalar",
]
# lcmlog module
__all__ += [
    "msg_getfields",
    "msg_getconstants",
    "parse_and_save",
    "lcmlog_to_dict",
    "dict_to_struct",
    "read_log",
    "read_logs",
    "merge_lcm_logs",
    "filter_channels_from_data",
    "nav_structtype",
    "struct_to_dict",
]
# geo module
__all__ += [
    "latlon_to_zone_number",
    "latlon_to_zone_letter",
    "ll2utm",
    "utm2ll",
    "deg2m_lat",
    "deg2m_lon",
    "ll2xy",
    "get_local_gravity",
    "xy2ll",
    "dms_to_decimal",
]
# environment module
__all__ += [
    "ctd2svel",
    "depth2pressure",
    "ctp2salinity",
    "ctd2salinity",
    "ctp2pden",
    "ctd2oxygen_saturation",
]
# cal module
__all__ += [
    "cal_ahrs_so3",
    "cal_dvl_acc_so3",
    "cal_dvl_correct_by_sound_velocity",
    "cal_mag_ellipsoid_fit",
    "cal_mag_ellipsoid_fit_fang",
    "cal_mag_magfactor3",
    "cal_mag_twostep_hi",
    "cal_mag_twostep_hsi",
    "cal_mag_sphere_fit",
    "cal_mag_sar_ls",
    "cal_mag_sar_kf",
    "cal_mag_sar_aid",
    "cal_mag_magyc_ls",
    "cal_mag_magyc_nls",
    "cal_mag_magyc_bfg",
    "cal_mag_magyc_ifg",
    "cal_mag_magyc_ifg",
    "cal_dvl_jck_so3",
]
# mbsystem module
__all__ += [
    "mbs_read_fnv",
]

# logging module
__all__ += ["setup_logging"]
