"""This file was generated by xsdata, v26.1, on 2026-02-18 00:41:07

Generator: DataclassGenerator
See: https://xsdata.readthedocs.io/
"""

from __future__ import annotations

from dataclasses import dataclass, field

from ccsds_ndm.models.ndmxml4.ndmxml_4_0_0_common_4_0 import (
    AcmAttitudeType,
    AcmCovarianceLineType,
    AdMethodType,
    AdmHeader,
    AngleRateType,
    AttBasisType,
    AttRateType,
    CpType,
    DurationType,
    FrequencyType,
    MassType,
    MomentType,
    RelTimeType,
    RotseqType,
    SensorNoiseType,
    SigmaUtype,
    SigmaVtype,
    TargetMomentumType,
    TimeOffsetType,
    UserDefinedType,
)

__NAMESPACE__ = "urn:ccsds:schema:ndmxml"


@dataclass(kw_only=True)
class AcmAttitudeStateType:
    class Meta:
        name = "acmAttitudeStateType"

    comment: list[str] = field(
        default_factory=list,
        metadata={
            "name": "COMMENT",
            "type": "Element",
            "namespace": "",
        },
    )
    att_id: None | str = field(
        default=None,
        metadata={
            "name": "ATT_ID",
            "type": "Element",
            "namespace": "",
        },
    )
    att_prev_id: None | str = field(
        default=None,
        metadata={
            "name": "ATT_PREV_ID",
            "type": "Element",
            "namespace": "",
        },
    )
    att_basis: None | AttBasisType = field(
        default=None,
        metadata={
            "name": "ATT_BASIS",
            "type": "Element",
            "namespace": "",
        },
    )
    att_basis_id: None | str = field(
        default=None,
        metadata={
            "name": "ATT_BASIS_ID",
            "type": "Element",
            "namespace": "",
        },
    )
    ref_frame_a: str = field(
        metadata={
            "name": "REF_FRAME_A",
            "type": "Element",
            "namespace": "",
            "required": True,
        }
    )
    ref_frame_b: str = field(
        metadata={
            "name": "REF_FRAME_B",
            "type": "Element",
            "namespace": "",
            "required": True,
        }
    )
    number_states: int = field(
        metadata={
            "name": "NUMBER_STATES",
            "type": "Element",
            "namespace": "",
            "required": True,
        }
    )
    att_type: AcmAttitudeType = field(
        metadata={
            "name": "ATT_TYPE",
            "type": "Element",
            "namespace": "",
            "required": True,
        }
    )
    euler_rot_seq: None | RotseqType = field(
        default=None,
        metadata={
            "name": "EULER_ROT_SEQ",
            "type": "Element",
            "namespace": "",
        },
    )
    rate_type: None | AttRateType = field(
        default=None,
        metadata={
            "name": "RATE_TYPE",
            "type": "Element",
            "namespace": "",
        },
    )
    att_line: list[str] = field(
        default_factory=list,
        metadata={
            "name": "attLine",
            "type": "Element",
            "namespace": "",
            "min_occurs": 1,
        },
    )


@dataclass(kw_only=True)
class AcmCovarianceMatrixType:
    class Meta:
        name = "acmCovarianceMatrixType"

    comment: list[str] = field(
        default_factory=list,
        metadata={
            "name": "COMMENT",
            "type": "Element",
            "namespace": "",
        },
    )
    cov_id: None | str = field(
        default=None,
        metadata={
            "name": "COV_ID",
            "type": "Element",
            "namespace": "",
        },
    )
    cov_prev_id: None | str = field(
        default=None,
        metadata={
            "name": "COV_PREV_ID",
            "type": "Element",
            "namespace": "",
        },
    )
    cov_basis: None | AttBasisType = field(
        default=None,
        metadata={
            "name": "COV_BASIS",
            "type": "Element",
            "namespace": "",
        },
    )
    cov_basis_id: None | str = field(
        default=None,
        metadata={
            "name": "COV_BASIS_ID",
            "type": "Element",
            "namespace": "",
        },
    )
    cov_ref_frame: None | str = field(
        default=None,
        metadata={
            "name": "COV_REF_FRAME",
            "type": "Element",
            "namespace": "",
        },
    )
    cov_type: AcmCovarianceLineType = field(
        metadata={
            "name": "COV_TYPE",
            "type": "Element",
            "namespace": "",
            "required": True,
        }
    )
    cov_line: list[str] = field(
        default_factory=list,
        metadata={
            "name": "covLine",
            "type": "Element",
            "namespace": "",
            "min_occurs": 1,
        },
    )


@dataclass(kw_only=True)
class AcmManeuverParametersType:
    class Meta:
        name = "acmManeuverParametersType"

    comment: list[str] = field(
        default_factory=list,
        metadata={
            "name": "COMMENT",
            "type": "Element",
            "namespace": "",
        },
    )
    man_id: None | str = field(
        default=None,
        metadata={
            "name": "MAN_ID",
            "type": "Element",
            "namespace": "",
        },
    )
    man_prev_id: None | str = field(
        default=None,
        metadata={
            "name": "MAN_PREV_ID",
            "type": "Element",
            "namespace": "",
        },
    )
    man_purpose: str = field(
        metadata={
            "name": "MAN_PURPOSE",
            "type": "Element",
            "namespace": "",
            "required": True,
        }
    )
    man_begin_time: RelTimeType = field(
        metadata={
            "name": "MAN_BEGIN_TIME",
            "type": "Element",
            "namespace": "",
            "required": True,
        }
    )
    man_end_time: None | RelTimeType = field(
        default=None,
        metadata={
            "name": "MAN_END_TIME",
            "type": "Element",
            "namespace": "",
        },
    )
    man_duration: None | DurationType = field(
        default=None,
        metadata={
            "name": "MAN_DURATION",
            "type": "Element",
            "namespace": "",
        },
    )
    actuator_used: None | str = field(
        default=None,
        metadata={
            "name": "ACTUATOR_USED",
            "type": "Element",
            "namespace": "",
        },
    )
    target_momentum: None | TargetMomentumType = field(
        default=None,
        metadata={
            "name": "TARGET_MOMENTUM",
            "type": "Element",
            "namespace": "",
        },
    )
    target_mom_frame: None | str = field(
        default=None,
        metadata={
            "name": "TARGET_MOM_FRAME",
            "type": "Element",
            "namespace": "",
        },
    )
    target_attitude: list[float] = field(
        default_factory=list,
        metadata={
            "name": "TARGET_ATTITUDE",
            "type": "Element",
            "namespace": "",
            "length": 4,
            "tokens": True,
        },
    )
    target_spinrate: None | AngleRateType = field(
        default=None,
        metadata={
            "name": "TARGET_SPINRATE",
            "type": "Element",
            "namespace": "",
        },
    )


@dataclass(kw_only=True)
class AcmMetadata:
    class Meta:
        name = "acmMetadata"

    comment: list[str] = field(
        default_factory=list,
        metadata={
            "name": "COMMENT",
            "type": "Element",
            "namespace": "",
        },
    )
    object_name: str = field(
        metadata={
            "name": "OBJECT_NAME",
            "type": "Element",
            "namespace": "",
            "required": True,
        }
    )
    international_designator: None | str = field(
        default=None,
        metadata={
            "name": "INTERNATIONAL_DESIGNATOR",
            "type": "Element",
            "namespace": "",
        },
    )
    catalog_name: None | str = field(
        default=None,
        metadata={
            "name": "CATALOG_NAME",
            "type": "Element",
            "namespace": "",
        },
    )
    object_designator: None | str = field(
        default=None,
        metadata={
            "name": "OBJECT_DESIGNATOR",
            "type": "Element",
            "namespace": "",
        },
    )
    originator_poc: None | str = field(
        default=None,
        metadata={
            "name": "ORIGINATOR_POC",
            "type": "Element",
            "namespace": "",
        },
    )
    originator_position: None | str = field(
        default=None,
        metadata={
            "name": "ORIGINATOR_POSITION",
            "type": "Element",
            "namespace": "",
        },
    )
    originator_phone: None | str = field(
        default=None,
        metadata={
            "name": "ORIGINATOR_PHONE",
            "type": "Element",
            "namespace": "",
        },
    )
    originator_email: None | str = field(
        default=None,
        metadata={
            "name": "ORIGINATOR_EMAIL",
            "type": "Element",
            "namespace": "",
        },
    )
    originator_address: None | str = field(
        default=None,
        metadata={
            "name": "ORIGINATOR_ADDRESS",
            "type": "Element",
            "namespace": "",
        },
    )
    odm_msg_link: None | str = field(
        default=None,
        metadata={
            "name": "ODM_MSG_LINK",
            "type": "Element",
            "namespace": "",
        },
    )
    center_name: None | str = field(
        default=None,
        metadata={
            "name": "CENTER_NAME",
            "type": "Element",
            "namespace": "",
        },
    )
    time_system: str = field(
        metadata={
            "name": "TIME_SYSTEM",
            "type": "Element",
            "namespace": "",
            "required": True,
        }
    )
    epoch_tzero: str = field(
        metadata={
            "name": "EPOCH_TZERO",
            "type": "Element",
            "namespace": "",
            "required": True,
            "pattern": r"\-?\d{4}\d*-((\d{2}\-\d{2})|\d{3})T\d{2}:\d{2}:\d{2}(\.\d*)?(Z|[+|\-]\d{2}:\d{2})?|[+|\-]?\d*(\.\d*)?",
        }
    )
    acm_data_elements: None | str = field(
        default=None,
        metadata={
            "name": "ACM_DATA_ELEMENTS",
            "type": "Element",
            "namespace": "",
        },
    )
    start_time: None | str = field(
        default=None,
        metadata={
            "name": "START_TIME",
            "type": "Element",
            "namespace": "",
            "pattern": r"\-?\d{4}\d*-((\d{2}\-\d{2})|\d{3})T\d{2}:\d{2}:\d{2}(\.\d*)?(Z|[+|\-]\d{2}:\d{2})?|[+|\-]?\d*(\.\d*)?",
        },
    )
    stop_time: None | str = field(
        default=None,
        metadata={
            "name": "STOP_TIME",
            "type": "Element",
            "namespace": "",
            "pattern": r"\-?\d{4}\d*-((\d{2}\-\d{2})|\d{3})T\d{2}:\d{2}:\d{2}(\.\d*)?(Z|[+|\-]\d{2}:\d{2})?|[+|\-]?\d*(\.\d*)?",
        },
    )
    taimutc_at_tzero: None | TimeOffsetType = field(
        default=None,
        metadata={
            "name": "TAIMUTC_AT_TZERO",
            "type": "Element",
            "namespace": "",
        },
    )
    next_leap_epoch: None | str = field(
        default=None,
        metadata={
            "name": "NEXT_LEAP_EPOCH",
            "type": "Element",
            "namespace": "",
            "pattern": r"\-?\d{4}\d*-((\d{2}\-\d{2})|\d{3})T\d{2}:\d{2}:\d{2}(\.\d*)?(Z|[+|\-]\d{2}:\d{2})?|[+|\-]?\d*(\.\d*)?",
        },
    )
    next_leap_taimutc: None | TimeOffsetType = field(
        default=None,
        metadata={
            "name": "NEXT_LEAP_TAIMUTC",
            "type": "Element",
            "namespace": "",
        },
    )


@dataclass(kw_only=True)
class AcmPhysicalDescriptionType:
    class Meta:
        name = "acmPhysicalDescriptionType"

    comment: list[str] = field(
        default_factory=list,
        metadata={
            "name": "COMMENT",
            "type": "Element",
            "namespace": "",
        },
    )
    drag_coeff: None | float = field(
        default=None,
        metadata={
            "name": "DRAG_COEFF",
            "type": "Element",
            "namespace": "",
        },
    )
    wet_mass: None | MassType = field(
        default=None,
        metadata={
            "name": "WET_MASS",
            "type": "Element",
            "namespace": "",
        },
    )
    dry_mass: None | MassType = field(
        default=None,
        metadata={
            "name": "DRY_MASS",
            "type": "Element",
            "namespace": "",
        },
    )
    cp_ref_frame: None | str = field(
        default=None,
        metadata={
            "name": "CP_REF_FRAME",
            "type": "Element",
            "namespace": "",
        },
    )
    cp: None | CpType = field(
        default=None,
        metadata={
            "name": "CP",
            "type": "Element",
            "namespace": "",
        },
    )
    inertia_ref_frame: None | str = field(
        default=None,
        metadata={
            "name": "INERTIA_REF_FRAME",
            "type": "Element",
            "namespace": "",
        },
    )
    ixx: None | MomentType = field(
        default=None,
        metadata={
            "name": "IXX",
            "type": "Element",
            "namespace": "",
        },
    )
    iyy: None | MomentType = field(
        default=None,
        metadata={
            "name": "IYY",
            "type": "Element",
            "namespace": "",
        },
    )
    izz: None | MomentType = field(
        default=None,
        metadata={
            "name": "IZZ",
            "type": "Element",
            "namespace": "",
        },
    )
    ixy: None | MomentType = field(
        default=None,
        metadata={
            "name": "IXY",
            "type": "Element",
            "namespace": "",
        },
    )
    ixz: None | MomentType = field(
        default=None,
        metadata={
            "name": "IXZ",
            "type": "Element",
            "namespace": "",
        },
    )
    iyz: None | MomentType = field(
        default=None,
        metadata={
            "name": "IYZ",
            "type": "Element",
            "namespace": "",
        },
    )


@dataclass(kw_only=True)
class SensorDataType:
    class Meta:
        name = "sensorDataType"

    sensor_number: None | int = field(
        default=None,
        metadata={
            "name": "SENSOR_NUMBER",
            "type": "Element",
            "namespace": "",
        },
    )
    sensor_used: None | str = field(
        default=None,
        metadata={
            "name": "SENSOR_USED",
            "type": "Element",
            "namespace": "",
        },
    )
    number_sensor_noise_covariance: None | int = field(
        default=None,
        metadata={
            "name": "NUMBER_SENSOR_NOISE_COVARIANCE",
            "type": "Element",
            "namespace": "",
        },
    )
    sensor_noise_stddev: None | SensorNoiseType = field(
        default=None,
        metadata={
            "name": "SENSOR_NOISE_STDDEV",
            "type": "Element",
            "namespace": "",
        },
    )
    sensor_frequency: None | FrequencyType = field(
        default=None,
        metadata={
            "name": "SENSOR_FREQUENCY",
            "type": "Element",
            "namespace": "",
        },
    )


@dataclass(kw_only=True)
class AcmAdParametersType:
    class Meta:
        name = "acmAdParametersType"

    comment: list[str] = field(
        default_factory=list,
        metadata={
            "name": "COMMENT",
            "type": "Element",
            "namespace": "",
        },
    )
    ad_id: None | str = field(
        default=None,
        metadata={
            "name": "AD_ID",
            "type": "Element",
            "namespace": "",
        },
    )
    ad_prev_id: None | str = field(
        default=None,
        metadata={
            "name": "AD_PREV_ID",
            "type": "Element",
            "namespace": "",
        },
    )
    ad_method: None | AdMethodType = field(
        default=None,
        metadata={
            "name": "AD_METHOD",
            "type": "Element",
            "namespace": "",
        },
    )
    attitude_source: None | str = field(
        default=None,
        metadata={
            "name": "ATTITUDE_SOURCE",
            "type": "Element",
            "namespace": "",
        },
    )
    number_states: None | int = field(
        default=None,
        metadata={
            "name": "NUMBER_STATES",
            "type": "Element",
            "namespace": "",
        },
    )
    attitude_states: AcmAttitudeType = field(
        metadata={
            "name": "ATTITUDE_STATES",
            "type": "Element",
            "namespace": "",
            "required": True,
        }
    )
    euler_rot_seq: None | RotseqType = field(
        default=None,
        metadata={
            "name": "EULER_ROT_SEQ",
            "type": "Element",
            "namespace": "",
        },
    )
    cov_type: None | AcmCovarianceLineType = field(
        default=None,
        metadata={
            "name": "COV_TYPE",
            "type": "Element",
            "namespace": "",
        },
    )
    ref_frame_a: str = field(
        metadata={
            "name": "REF_FRAME_A",
            "type": "Element",
            "namespace": "",
            "required": True,
        }
    )
    ref_frame_b: str = field(
        metadata={
            "name": "REF_FRAME_B",
            "type": "Element",
            "namespace": "",
            "required": True,
        }
    )
    rate_states: None | AttRateType = field(
        default=None,
        metadata={
            "name": "RATE_STATES",
            "type": "Element",
            "namespace": "",
        },
    )
    sigma_u: None | SigmaUtype = field(
        default=None,
        metadata={
            "name": "SIGMA_U",
            "type": "Element",
            "namespace": "",
        },
    )
    sigma_v: None | SigmaVtype = field(
        default=None,
        metadata={
            "name": "SIGMA_V",
            "type": "Element",
            "namespace": "",
        },
    )
    rate_process_noise_stddev: None | SigmaUtype = field(
        default=None,
        metadata={
            "name": "RATE_PROCESS_NOISE_STDDEV",
            "type": "Element",
            "namespace": "",
        },
    )
    sensor_data: list[SensorDataType] = field(
        default_factory=list,
        metadata={
            "name": "sensorData",
            "type": "Element",
            "namespace": "",
        },
    )


@dataclass(kw_only=True)
class AcmData:
    class Meta:
        name = "acmData"

    att: list[AcmAttitudeStateType] = field(
        default_factory=list,
        metadata={
            "type": "Element",
            "namespace": "",
        },
    )
    phys: None | AcmPhysicalDescriptionType = field(
        default=None,
        metadata={
            "type": "Element",
            "namespace": "",
        },
    )
    cov: list[AcmCovarianceMatrixType] = field(
        default_factory=list,
        metadata={
            "type": "Element",
            "namespace": "",
        },
    )
    man: list[AcmManeuverParametersType] = field(
        default_factory=list,
        metadata={
            "type": "Element",
            "namespace": "",
        },
    )
    ad: None | AcmAdParametersType = field(
        default=None,
        metadata={
            "type": "Element",
            "namespace": "",
        },
    )
    user: None | UserDefinedType = field(
        default=None,
        metadata={
            "type": "Element",
            "namespace": "",
        },
    )


@dataclass(kw_only=True)
class AcmSegment:
    class Meta:
        name = "acmSegment"

    metadata: AcmMetadata = field(
        metadata={
            "type": "Element",
            "namespace": "",
            "required": True,
        }
    )
    data: AcmData = field(
        metadata={
            "type": "Element",
            "namespace": "",
            "required": True,
        }
    )


@dataclass(kw_only=True)
class AcmBody:
    class Meta:
        name = "acmBody"

    segment: AcmSegment = field(
        metadata={
            "type": "Element",
            "namespace": "",
            "required": True,
        }
    )


@dataclass(kw_only=True)
class AcmType:
    class Meta:
        name = "acmType"

    header: AdmHeader = field(
        metadata={
            "type": "Element",
            "namespace": "",
            "required": True,
        }
    )
    body: AcmBody = field(
        metadata={
            "type": "Element",
            "namespace": "",
            "required": True,
        }
    )
    id: str = field(
        init=False,
        default="CCSDS_ACM_VERS",
        metadata={
            "type": "Attribute",
            "required": True,
        },
    )
    version: str = field(
        init=False,
        default="2.0",
        metadata={
            "type": "Attribute",
            "required": True,
        },
    )
