Skip to content

Commit 7c90a3d

Browse files
authored
Merge pull request #215 from moorepants/remove-orient-explicit
Use orient_dcm() instead of orient_explicit().
2 parents 4df3a04 + fac9d7b commit 7c90a3d

File tree

2 files changed

+10
-14
lines changed

2 files changed

+10
-14
lines changed

angular.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@ matrix with time varying elements:
150150
[czx, czy, czz]])
151151

152152
and establish the orientation using
153-
:external:py:meth:`~sympy.physics.vector.frame.ReferenceFrame.orient_explicit`:
153+
:external:py:meth:`~sympy.physics.vector.frame.ReferenceFrame.orient_dcm`:
154154

155155
.. warning::
156156

@@ -160,7 +160,7 @@ and establish the orientation using
160160

161161
A = me.ReferenceFrame('A')
162162
B = me.ReferenceFrame('B')
163-
B.orient_explicit(A, B_C_A.transpose())
163+
B.orient_dcm(A, B_C_A)
164164
B.dcm(A)
165165

166166
This now let's write the :math:`B` unit vectors in terms of the :math:`A` unit
@@ -306,7 +306,7 @@ Applying the definition of angular velocity as before, the angular velocity of
306306

307307
A = me.ReferenceFrame('A')
308308
B = me.ReferenceFrame('B')
309-
B.orient_explicit(A, B_C_A.transpose())
309+
B.orient_dcm(A, B_C_A)
310310

311311
mnx = me.dot(B.y.express(A).dt(A), B.z)
312312
mny = me.dot(B.z.express(A).dt(A), B.x)

orientation.rst

Lines changed: 7 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -556,22 +556,18 @@ orientations. For example:
556556

557557
relates :math:`A` and :math:`N`. ``ReferenceFrame`` objects can be oriented
558558
with respect to one another. The
559-
:external:py:meth:`~sympy.physics.vector.frame.ReferenceFrame.orient_explicit`
559+
:external:py:meth:`~sympy.physics.vector.frame.ReferenceFrame.orient_dcm`
560560
:term:`method` allows you to set the direction cosine matrix between two frames
561561
explicitly:
562562

563563
.. jupyter-execute::
564564

565-
N.orient_explicit(A, A_C_N)
566-
567-
.. todo::
568-
569-
When we change to SymPy 1.13, change ``orient_explicit`` to ``orient_dcm``.
565+
N.orient_dcm(A, A_C_N.transpose())
570566

571567
.. warning::
572568

573569
Note very carefully what version of the direction cosine matrix you pass to
574-
``.orient_explicit()``. Check its docstring with ``N.orient_explicit?``.
570+
``.orient_dcm()``. Check its docstring with ``N.orient_dcm?``.
575571

576572
Now you can ask for the direction cosine matrix of :math:`A` with respect to
577573
:math:`N`, i.e. :math:`{}^A\mathbf{C}^N`, using the
@@ -593,7 +589,7 @@ reversing the order of the arguments:
593589
Orient reference frame :math:`D` with respect to :math:`F` with a simple
594590
rotation about :math:`y` through angle :math:`\beta` and set this
595591
orientation with
596-
:external:py:meth:`~sympy.physics.vector.frame.ReferenceFrame.orient_explicit`.
592+
:external:py:meth:`~sympy.physics.vector.frame.ReferenceFrame.orient_dcm`.
597593

598594
.. admonition:: Solution
599595
:class: dropdown
@@ -609,11 +605,11 @@ reversing the order of the arguments:
609605
[0, 1, 0],
610606
[sm.sin(beta), 0, sm.cos(beta)]])
611607

612-
F.orient_explicit(D, F_C_D.transpose())
608+
F.orient_dcm(D, F_C_D)
613609

614610
F.dcm(D)
615611

616-
:external:py:meth:`~sympy.physics.vector.frame.ReferenceFrame.orient_explicit`
612+
:external:py:meth:`~sympy.physics.vector.frame.ReferenceFrame.orient_dcm`
617613
requires you to form the direction cosine matrix yourself, but there are also
618614
methods that relieve you of that necessity. For example,
619615
:external:py:meth:`~sympy.physics.vector.frame.ReferenceFrame.orient_axis`
@@ -699,7 +695,7 @@ pairs returns the expected direction cosine matrix entry:
699695

700696
.. jupyter-execute::
701697

702-
E.orient_explicit(D, C.dcm(D))
698+
E.orient_dcm(D, D.dcm(C))
703699
E.dcm(D)
704700

705701
Euler Angles

0 commit comments

Comments
 (0)