Skip to content

Commit c9e1e52

Browse files
committed
Explict use of units in documentation is better than implicit.
1 parent 5da92be commit c9e1e52

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

docs/jplhorizons/jplhorizons.rst

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ must still be entered in east-longitude, which means they must be negative; Hori
7878
will raise an error if given any positive longitude value for such bodies. Instead enter
7979
the west-longitude - 360. For instance, a site on Mars (id code 499) at 30 degrees
8080
longitude, 30 degrees latitude, 0 km elevation should be specified as
81-
``{'body': 499, 'elevation': 0, 'lon': -330, 'lat': 30}``.
81+
``{'body': 499, 'elevation': 0 * u.km, 'lon': -330 * u.deg, 'lat': 30 * u.deg}``.
8282
2. This does not apply to the Earth, Moon, and Sun. Although they are prograde,
8383
Horizons interprets east-longitude as positive and west-longitude as negative for these
8484
bodies.
@@ -96,9 +96,9 @@ as the observer's location, and Ceres as the target:
9696

9797
.. doctest-remote-data::
9898

99-
>>> statue_of_liberty = {'lon': -74.0466891,
100-
... 'lat': 40.6892534,
101-
... 'elevation': 0.093}
99+
>>> statue_of_liberty = {'lon': -74.0466891 * u.deg,
100+
... 'lat': 40.6892534 * u.deg,
101+
... 'elevation': 0.093 * u.km}
102102
>>> obj = Horizons(id='Ceres',
103103
... location=statue_of_liberty,
104104
... epochs=2458133.33546)
@@ -116,8 +116,8 @@ at a particular point in time to the center of the crater Double:
116116

117117
.. doctest-remote-data::
118118

119-
>>> ce_2 = {'lon': 23.522, 'lat': 0.637, 'elevation': 181.2, 'body': 301}
120-
>>> double = {'lon': 23.47, 'lat': 0.67, 'elevation': 0, 'body': 301}
119+
>>> ce_2 = {'lon': 23.522 * u.deg, 'lat': 0.637 * u.deg, 'elevation': 181.2 * u.km, 'body': 301}
120+
>>> double = {'lon': 23.47 * u.deg, 'lat': 0.67 * u.deg, 'elevation': 0 * u.km, 'body': 301}
121121
>>> obj = Horizons(id=double, location=ce_2, epochs=2454483.84247)
122122
>>> vecs = obj.vectors()
123123
>>> distance_km = (vecs['x'] ** 2 + vecs['y'] ** 2 + vecs['z'] ** 2) ** 0.5 * 1.496e8

0 commit comments

Comments
 (0)