@@ -52,7 +52,7 @@ pub struct TrkConfig {
5252 pub sampling : Duration ,
5353 /// List of tracking strands during which the given tracker will be tracking
5454 #[ builder( default , setter( strip_option) ) ]
55- pub strands : Option < Vec < EpochRanges > > ,
55+ pub strands : Option < Vec < Strand > > ,
5656}
5757
5858impl ConfigRepr for TrkConfig { }
@@ -133,18 +133,18 @@ impl Default for TrkConfig {
133133 }
134134}
135135
136- /// Stores an epoch range for tracking.
136+ /// Stores a tracking strand with a start and end epoch
137137#[ derive( Copy , Clone , Debug , Serialize , Deserialize , PartialEq ) ]
138138#[ cfg_attr( feature = "python" , pyclass) ]
139139#[ cfg_attr( feature = "python" , pyo3( module = "nyx_space.orbit_determination" ) ) ]
140- pub struct EpochRanges {
140+ pub struct Strand {
141141 #[ serde( serialize_with = "epoch_to_str" , deserialize_with = "epoch_from_str" ) ]
142142 pub start : Epoch ,
143143 #[ serde( serialize_with = "epoch_to_str" , deserialize_with = "epoch_from_str" ) ]
144144 pub end : Epoch ,
145145}
146146
147- impl EpochRanges {
147+ impl Strand {
148148 /// Returns whether the provided epoch is within the range
149149 pub fn contains ( & self , epoch : Epoch ) -> bool {
150150 ( self . start ..=self . end ) . contains ( & epoch)
@@ -179,21 +179,21 @@ mod trkconfig_ut {
179179
180180 let start = Epoch :: now ( ) . unwrap ( ) ;
181181 let end = start + 10 . seconds ( ) ;
182- cfg. strands = Some ( vec ! [ EpochRanges { start, end } ] ) ;
182+ cfg. strands = Some ( vec ! [ Strand { start, end } ] ) ;
183183 assert ! (
184184 cfg. sanity_check( ) . is_err( ) ,
185185 "strand of too short of a duration should mark this insane"
186186 ) ;
187187
188188 let end = start + cfg. sampling ;
189- cfg. strands = Some ( vec ! [ EpochRanges { start, end } ] ) ;
189+ cfg. strands = Some ( vec ! [ Strand { start, end } ] ) ;
190190 assert ! (
191191 cfg. sanity_check( ) . is_ok( ) ,
192192 "strand allowing for a single measurement should be OK"
193193 ) ;
194194
195195 // An anti-chronological strand should be invalid
196- cfg. strands = Some ( vec ! [ EpochRanges {
196+ cfg. strands = Some ( vec ! [ Strand {
197197 start: end,
198198 end: start,
199199 } ] ) ;
0 commit comments