1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
// SPDX-License-Identifier: AGPL-3.0-or-later
// Copyright (C) 2026 Vallés Puig, Ramon
//! Typed integrator adapter.
//!
//! Re-exports of [`crate::pod::propagation::Integrator`] (and the concrete
//! Rk4/Dopri5/Dop853 wrappers) live in the crate root. This module provides
//! the POD-level convenience helpers that take a [`SpacecraftState`] (or
//! [`OrbitState`]) plus a registry-built composite force model and return
//! the propagated state.
//!
//! No new integrator math is invented here — every call delegates to the
//! upstream propagator.
use crate;
use Second;
use crateSiderustAccelerationModel;
use crateIntegrator;
use PodDynamicsError;
/// Propagate a bare [`OrbitState`] forward by `dt` under `force` using the
/// supplied [`Integrator`].
///
/// # Example
///
/// ```
/// use siderust::pod::propagation::{propagate_orbit, Rk4Integrator};
/// use siderust::astro::dynamics::forces::TwoBody;
/// use siderust::astro::dynamics::{OrbitState, DynamicsContext};
/// use siderust::astro::dynamics::{Position, Velocity};
/// use siderust::coordinates::frames::GCRS;
/// use siderust::time::JulianDate;
/// use qtty::Second;
///
/// let s0 = OrbitState::new(
/// JulianDate::new(2_451_545.0).to_j2000s(),
/// Position::<GCRS>::new(7_000.0, 0.0, 0.0),
/// Velocity::<GCRS>::new(0.0, 7.5450, 0.0),
/// );
/// let s1 = propagate_orbit(
/// &Rk4Integrator { step: Second::new(10.0) },
/// &TwoBody::new(siderust::astro::dynamics::GM_EARTH), s0, Second::new(60.0), &DynamicsContext::empty(),
/// ).unwrap();
/// assert!((s1.epoch - s0.epoch).value() > 0.0);
/// ```
/// Propagate a [`SpacecraftState`] (orbit + properties) forward by `dt`.
///
/// Spacecraft properties (`C_D`, `C_R`, `A/m`, mass) are passed through
/// unchanged — finite-burn / mass-flow integration is the responsibility of
/// the `crate::pod::force::thrust` module, not this adapter.
///
/// # Example
///
/// ```
/// use siderust::pod::propagation::{propagate_spacecraft, Rk4Integrator};
/// use siderust::astro::dynamics::forces::TwoBody;
/// use siderust::astro::dynamics::{
/// DynamicsContext, OrbitState, SpacecraftProperties, SpacecraftState,
/// };
/// use siderust::astro::dynamics::{Position, Velocity};
/// use siderust::coordinates::frames::GCRS;
/// use siderust::time::JulianDate;
/// use qtty::Second;
///
/// let orbit = OrbitState::new(
/// JulianDate::new(2_451_545.0).to_j2000s(),
/// Position::<GCRS>::new(7_000.0, 0.0, 0.0),
/// Velocity::<GCRS>::new(0.0, 7.5450, 0.0),
/// );
/// let sc = SpacecraftState { orbit, properties: SpacecraftProperties::demo_leo() };
/// let sc1 = propagate_spacecraft(
/// &Rk4Integrator { step: Second::new(10.0) },
/// &TwoBody::new(siderust::astro::dynamics::GM_EARTH), sc, Second::new(60.0), &DynamicsContext::empty(),
/// ).unwrap();
/// assert_eq!(sc1.properties, sc.properties);
/// ```