File tree Expand file tree Collapse file tree 2 files changed +8
-1
lines changed Expand file tree Collapse file tree 2 files changed +8
-1
lines changed Original file line number Diff line number Diff line change 10
10
11
11
use crate :: {
12
12
astro:: { Aberration , AzElRange } ,
13
+ constants:: SPEED_OF_LIGHT_KM_S ,
13
14
ephemerides:: { EphemerisError , EphemerisPhysicsSnafu } ,
14
15
errors:: { AlmanacError , EphemerisSnafu , PhysicsError } ,
15
16
frames:: Frame ,
@@ -21,6 +22,7 @@ use crate::{
21
22
use super :: Almanac ;
22
23
use crate :: errors:: AlmanacResult ;
23
24
25
+ use hifitime:: TimeUnits ;
24
26
use log:: warn;
25
27
26
28
use snafu:: ResultExt ;
@@ -120,6 +122,7 @@ impl Almanac {
120
122
range_km : rho_sez. norm ( ) ,
121
123
range_rate_km_s,
122
124
obstructed_by,
125
+ light_time : ( rho_sez. norm ( ) / SPEED_OF_LIGHT_KM_S ) . seconds ( ) ,
123
126
} )
124
127
}
125
128
}
Original file line number Diff line number Diff line change @@ -13,7 +13,9 @@ use std::fmt::Display;
13
13
use crate :: errors:: PhysicsError ;
14
14
use crate :: frames:: Frame ;
15
15
16
- use hifitime:: Epoch ;
16
+ use hifitime:: { Duration , Epoch , TimeUnits } ;
17
+
18
+ use crate :: constants:: SPEED_OF_LIGHT_KM_S ;
17
19
18
20
#[ cfg( feature = "python" ) ]
19
21
use pyo3:: exceptions:: PyTypeError ;
@@ -47,6 +49,7 @@ pub struct AzElRange {
47
49
pub range_km : f64 ,
48
50
pub range_rate_km_s : f64 ,
49
51
pub obstructed_by : Option < Frame > ,
52
+ pub light_time : Duration ,
50
53
}
51
54
52
55
#[ cfg_attr( feature = "python" , pymethods) ]
@@ -79,6 +82,7 @@ impl AzElRange {
79
82
range_km,
80
83
range_rate_km_s,
81
84
obstructed_by,
85
+ light_time : ( range_km / SPEED_OF_LIGHT_KM_S ) . seconds ( ) ,
82
86
}
83
87
}
84
88
You can’t perform that action at this time.
0 commit comments