path_endpoint#
- pycraf.atm.path_endpoint(elevation, obs_alt, atm_layers_cache, max_arc_length=<Quantity 180. deg>, max_path_length=<Quantity 1000. km>)[source]#
Calculate endpoint of propagation path through atmosphere by ray-tracing.
Like
raytrace_path
this calculates the exact path geometry of a propagating ray through Earth’s atmosphere. The difference toraytrace_path
is that only the final point is returned. This is sufficient for some applications, e.g., when an elevation angle needs to be determined with an optimization algorithm (seefind_elevation
).- Parameters:
- elevation
Quantity
, scalar (Apparent) elevation of source/target as seen from observer [deg]
- obs_alt
Quantity
, scalar Height of observer above sea-level [km]
- atm_layers_cache
dict
Pre-computed physical parameters for each atmopheric layer as returned by the
atm_layers
function.- max_path_length
Quantity
, scalar Maximal length of path before stopping the ray-tracing [km]
(default: 1000 km; useful for terrestrial paths)
- max_arc_length
Quantity
, scalar Maximal arc-length (true angular distance between observer and source/ target) of path before stopping ray-tracing [deg]
(default: 180 deg; useful for terrestrial paths)
- elevation
- Returns:
- a_n
Quantity
, scalar Length of path through final layer of the ray-tracing. [km]
This is not too useful (perhaps for space-paths, where it gives the fraction of the path that doesn’t go through the atmosphere.)
- r_n
Quantity
, scalar Distance to Earth’s center after complete ray-tracing. [km]
- h_n
Quantity
, scalar Height above Earth’s surface after complete ray-tracing. [km]
- x_n/y_n
Quantity
, scalar Cartesian coordinates of path complete ray-tracing. [km] The reference is Earth’s center. Starting point is
(0, r_E + obs_alt)
.- alpha_n
Quantity
, scalar Exit angle of path after going through the layer (relative to surface normal vector) after complete ray-tracing. [km]
- delta_n
Quantity
, scalar Angular distance of path position after complete ray-tracing w.r.t. starting point. [deg]
The polar coordinates
(r_n, delta_n)
are directly associated with the cartesian coordinates(x_n, y_n)
.- layer_idx
int
Index of the layer, through which the path went during the last step. This is probably only useful for debugging purposes.
- path_length
Quantity
, scalar Total path length of the propagation path. [km]
- nsteps
int
Number of steps the algorithm performed.
- refraction
Quantity
, scalar Refraction angle (i.e., the total “bending” angle of the ray) [deg]
- is_space_pathbool
Whether the paths ends outside of Earth’s atmosphere (in terms of the atmospheric profile function used).
- a_n
Notes
Terrain heights are neglected by the
atm
sub-package. All heights are w.r.t. the flat (spherical) Earth (with a radius of 6371 km).See also
raytrace_path
.