2323
2424from __future__ import annotations
2525
26+ from ._typing import FloatLike
27+
2628from .mathfun import sin , cos , radians
2729from .ecef import ecef2enu , enu2ecef
2830from .enu import geodetic2enu , enu2geodetic , aer2enu , enu2aer
4244]
4345
4446
45- def enu2dca (e , n , u , heading , deg : bool = True ):
47+ def enu2dca (e : FloatLike , n : FloatLike , u : FloatLike , heading : FloatLike , deg : bool = True ):
4648 """
4749 Converts ENU (East, North, Up) coordinates to DCA (Downrange, Crossrange, Above).
4850 """
@@ -56,7 +58,7 @@ def enu2dca(e, n, u, heading, deg: bool = True):
5658 return dr , cr , u
5759
5860
59- def dca2enu (dr , cr , above , heading , deg : bool = True ):
61+ def dca2enu (dr : FloatLike , cr : FloatLike , above : FloatLike , heading : FloatLike , deg : bool = True ):
6062 """
6163 Converts DCA (Downrange, Crossrange, Above) coordinates to ENU (East, North, Up).
6264 """
@@ -70,23 +72,33 @@ def dca2enu(dr, cr, above, heading, deg: bool = True):
7072 return e , n , above
7173
7274
73- def dca2ned (dr , cr , above , heading , deg : bool = True ):
75+ def dca2ned (dr : FloatLike , cr : FloatLike , above : FloatLike , heading : FloatLike , deg : bool = True ):
7476 """
7577 Converts DCA (Downrange, Crossrange, Above) coordinates to NED (North, East, Down).
7678 """
7779 e , n , u = dca2enu (dr , cr , above , heading , deg = deg )
7880 return n , e , - u
7981
8082
81- def ned2dca (n , e , d , heading , deg : bool = True ):
83+ def ned2dca (n : FloatLike , e : FloatLike , d : FloatLike , heading : FloatLike , deg : bool = True ):
8284 """
8385 Converts NED (North, East, Down) coordinates to DCA (Downrange, Crossrange, Above).
8486 """
8587 dr , cr , above = enu2dca (e , n , - d , heading , deg = deg )
8688 return dr , cr , above
8789
8890
89- def ecef2dca (x , y , z , lat0 , lon0 , h0 , heading , ell : Ellipsoid | None = None , deg : bool = True ):
91+ def ecef2dca (
92+ x : FloatLike ,
93+ y : FloatLike ,
94+ z : FloatLike ,
95+ lat0 : FloatLike ,
96+ lon0 : FloatLike ,
97+ h0 : FloatLike ,
98+ heading : FloatLike ,
99+ ell : Ellipsoid | None = None ,
100+ deg : bool = True ,
101+ ):
90102 """
91103 Converts ECEF (Earth-Centered, Earth-Fixed) coordinates to DCA (Downrange, Crossrange, Above).
92104 """
@@ -96,13 +108,13 @@ def ecef2dca(x, y, z, lat0, lon0, h0, heading, ell: Ellipsoid | None = None, deg
96108
97109
98110def dca2ecef (
99- dr ,
100- cr ,
101- above ,
102- lat0 ,
103- lon0 ,
104- h0 ,
105- heading ,
111+ dr : FloatLike ,
112+ cr : FloatLike ,
113+ above : FloatLike ,
114+ lat0 : FloatLike ,
115+ lon0 : FloatLike ,
116+ h0 : FloatLike ,
117+ heading : FloatLike ,
106118 ell : Ellipsoid | None = None ,
107119 deg : bool = True ,
108120):
@@ -115,7 +127,15 @@ def dca2ecef(
115127
116128
117129def geodetic2dca (
118- lat , lon , h , lat0 , lon0 , h0 , heading , ell : Ellipsoid | None = None , deg : bool = True
130+ lat : FloatLike ,
131+ lon : FloatLike ,
132+ h : FloatLike ,
133+ lat0 : FloatLike ,
134+ lon0 : FloatLike ,
135+ h0 : FloatLike ,
136+ heading : FloatLike ,
137+ ell : Ellipsoid | None = None ,
138+ deg : bool = True ,
119139):
120140 """
121141 Converts geodetic coordinates (latitude, longitude, altitude) to DCA (Downrange, Crossrange, Above) coordinates.
@@ -125,13 +145,13 @@ def geodetic2dca(
125145
126146
127147def dca2geodetic (
128- dr ,
129- cr ,
130- above ,
131- lat0 ,
132- lon0 ,
133- h0 ,
134- heading ,
148+ dr : FloatLike ,
149+ cr : FloatLike ,
150+ above : FloatLike ,
151+ lat0 : FloatLike ,
152+ lon0 : FloatLike ,
153+ h0 : FloatLike ,
154+ heading : FloatLike ,
135155 ell : Ellipsoid | None = None ,
136156 deg : bool = True ,
137157):
@@ -142,15 +162,15 @@ def dca2geodetic(
142162 return enu2geodetic (e , n , u , lat0 , lon0 , h0 , ell , deg = deg )
143163
144164
145- def aer2dca (az , el , srange , heading , deg : bool = True ):
165+ def aer2dca (az : FloatLike , el : FloatLike , srange : FloatLike , heading : FloatLike , deg : bool = True ):
146166 """
147167 Converts AER (Azimuth, Elevation, Range) coordinates to DCA (Downrange, Crossrange, Above).
148168 """
149169 e , n , u = aer2enu (az , el , srange , deg = deg )
150170 return enu2dca (e , n , u , heading , deg = deg )
151171
152172
153- def dca2aer (dr , cr , above , heading , deg : bool = True ):
173+ def dca2aer (dr : FloatLike , cr : FloatLike , above : FloatLike , heading : FloatLike , deg : bool = True ):
154174 """
155175 Converts DCA (Downrange, Crossrange, Above) coordinates to AER (Azimuth, Elevation, Range).
156176 """
0 commit comments