Skip to content

Commit 63535f5

Browse files
committed
Merge remote-tracking branch 'origin/develop' into feature/interpolated-trajectories
2 parents 7aca568 + 60d3957 commit 63535f5

1 file changed

Lines changed: 25 additions & 25 deletions

File tree

climada/util/coordinates.py

Lines changed: 25 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1161,9 +1161,9 @@ def degree_to_km(degree):
11611161
The conversion is based on the formula:
11621162
11631163
.. math::
1164-
distance = angle_{radians} \\times R
1164+
d = a \times R
11651165
1166-
where R is the Earth's radius in km.
1166+
where d is the distance in km, a is the angle in radians, and R is the Earth's radius in km.
11671167
11681168
Examples
11691169
--------
@@ -1176,37 +1176,37 @@ def degree_to_km(degree):
11761176
def km_to_degree(km):
11771177
r"""Convert a distance from kilometers to degrees.
11781178
1179-
This function converts a given distance in kilometers on the Earth's surface
1180-
to its equivalent angle in degrees. It assumes a spherical Earth with a
1181-
constant radius.
1179+
This function converts a given distance in kilometers on the Earth's surface
1180+
to its equivalent angle in degrees. It assumes a spherical Earth with a
1181+
constant radius.
11821182
1183-
Parameters
1184-
----------
1185-
km : float or array_like
1186-
The distance(s) in kilometers to convert.
1183+
Parameters
1184+
----------
1185+
km : float or array_like
1186+
The distance(s) in kilometers to convert.
11871187
1188-
Returns
1189-
-------
1190-
float or ndarray
1191-
The equivalent angle(s) in degrees.
1188+
Returns
1189+
-------
1190+
float or ndarray
1191+
The equivalent angle(s) in degrees.
11921192
1193-
See Also
1194-
--------
1195-
degree_to_km : The inverse function to convert degrees to kilometers.
1193+
See Also
1194+
--------
1195+
degree_to_km : The inverse function to convert degrees to kilometers.
11961196
1197-
Notes
1198-
-----
1199-
The conversion is based on the formula:
1197+
Notes
1198+
-----
1199+
The conversion is based on the formula:
12001200
12011201
.. math::
1202-
angle_{radians} = distance / R
1202+
a = d / R
12031203
1204-
where R is the Earth's radius in km.
1204+
where a is the angle in radians, d is the distance in km, and R is the Earth's radius in km.
12051205
1206-
Examples
1207-
--------
1208-
>>> km_to_degree(111.195)
1209-
1.0000030589140416
1206+
Examples
1207+
--------
1208+
>>> km_to_degree(111.195)
1209+
1.0000030589140416
12101210
"""
12111211
return np.rad2deg(km / EARTH_RADIUS_KM)
12121212

0 commit comments

Comments
 (0)