class_docstr: A reference frame in classical mechanics.
  
  ReferenceFrame is a class used to represent a reference frame in classical
  mechanics. It has a standard basis of three unit vectors in the frame's
  x, y, and z directions.
  
  It also can have a rotation relative to a parent frame; this rotation is
  defined by a direction cosine matrix relating this frame's basis vectors to
  the parent frame's basis vectors.  It can also have an angular velocity
  vector, defined in another frame.
docstr: Rotates this reference frame relative to the parent reference frame
  by right hand rotating through three successive space fixed simple axis
  rotations. Each subsequent axis of rotation is about the "space fixed"
  unit vectors of the parent reference frame.
  
  The computed angular velocity in this method is by default expressed in
  the child's frame, so it is most preferable to use ``u1 * child.x + u2 *
  child.y + u3 * child.z`` as generalized speeds.
  
  Parameters
  ==========
  parent : ReferenceFrame
      Reference frame that this reference frame will be rotated relative
      to.
  angles : 3-tuple of sympifiable
      Three angles in radians used for the successive rotations.
  rotation_order : 3 character string or 3 digit integer
      Order of the rotations about the parent reference frame's unit
      vectors. The order can be specified by the strings ``'XZX'``,
      ``'131'``, or the integer ``131``. There are 12 unique valid
      rotation orders.
  
  Warns
  ======
  
  UserWarning
      If the orientation creates a kinematic loop.
  
  Examples
  ========
  
  Setup variables for the examples:
  
  >>> from sympy import symbols
  >>> from sympy.physics.vector import ReferenceFrame
  >>> q1, q2, q3 = symbols('q1, q2, q3')
  >>> N = ReferenceFrame('N')
  >>> B = ReferenceFrame('B')
  >>> B1 = ReferenceFrame('B1')
  >>> B2 = ReferenceFrame('B2')
  >>> B3 = ReferenceFrame('B3')
  
  >>> B.orient_space_fixed(N, (q1, q2, q3), '312')
  >>> B.dcm(N)
  Matrix([
  [ sin(q1)*sin(q2)*sin(q3) + cos(q1)*cos(q3), sin(q1)*cos(q2), sin(q1)*sin(q2)*cos(q3) - sin(q3)*cos(q1)],
  [-sin(q1)*cos(q3) + sin(q2)*sin(q3)*cos(q1), cos(q1)*cos(q2), sin(q1)*sin(q3) + sin(q2)*cos(q1)*cos(q3)],
  [                           sin(q3)*cos(q2),        -sin(q2),                           cos(q2)*cos(q3)]])
  
  is equivalent to:
  
  >>> B1.orient_axis(N, N.z, q1)
  >>> B2.orient_axis(B1, N.x, q2)
  >>> B3.orient_axis(B2, N.y, q3)
  >>> B3.dcm(N).simplify()
  Matrix([
  [ sin(q1)*sin(q2)*sin(q3) + cos(q1)*cos(q3), sin(q1)*cos(q2), sin(q1)*sin(q2)*cos(q3) - sin(q3)*cos(q1)],
  [-sin(q1)*cos(q3) + sin(q2)*sin(q3)*cos(q1), cos(q1)*cos(q2), sin(q1)*sin(q3) + sin(q2)*cos(q1)*cos(q3)],
  [                           sin(q3)*cos(q2),        -sin(q2),                           cos(q2)*cos(q3)]])
  
  It is worth noting that space-fixed and body-fixed rotations are
  related by the order of the rotations, i.e. the reverse order of body
  fixed will give space fixed and vice versa.
  
  >>> B.orient_space_fixed(N, (q1, q2, q3), '231')
  >>> B.dcm(N)
  Matrix([
  [cos(q1)*cos(q2), sin(q1)*sin(q3) + sin(q2)*cos(q1)*cos(q3), -sin(q1)*cos(q3) + sin(q2)*sin(q3)*cos(q1)],
  [       -sin(q2),                           cos(q2)*cos(q3),                            sin(q3)*cos(q2)],
  [sin(q1)*cos(q2), sin(q1)*sin(q2)*cos(q3) - sin(q3)*cos(q1),  sin(q1)*sin(q2)*sin(q3) + cos(q1)*cos(q3)]])
  
  >>> B.orient_body_fixed(N, (q3, q2, q1), '132')
  >>> B.dcm(N)
  Matrix([
  [cos(q1)*cos(q2), sin(q1)*sin(q3) + sin(q2)*cos(q1)*cos(q3), -sin(q1)*cos(q3) + sin(q2)*sin(q3)*cos(q1)],
  [       -sin(q2),                           cos(q2)*cos(q3),                            sin(q3)*cos(q2)],
  [sin(q1)*cos(q2), sin(q1)*sin(q2)*cos(q3) - sin(q3)*cos(q1),  sin(q1)*sin(q2)*sin(q3) + cos(q1)*cos(q3)]])
docstr_tok: ["Rotates","this","reference","frame","relative","to","the","parent","reference","frame","by","right","hand","rotating","through","three","successive","space","fixed","simple","axis","rotations",".","Each","subsequent","axis","of","rotation","is","about","the","``","space","fixed","''","unit","vectors","of","the","parent","reference","frame",".","The","computed","angular","velocity","in","this","method","is","by","default","expressed","in","the","child","'s","frame",",","so","it","is","most","preferable","to","use","``","u1","*","child.x","+","u2","*","child.y","+","u3","*","child.z","``","as","generalized","speeds",".","Parameters","==========","parent",":","ReferenceFrame","Reference","frame","that","this","reference","frame","will","be","rotated","relative","to",".","angles",":","3-tuple","of","sympifiable","Three","angles","in","radians","used","for","the","successive","rotations",".","rotation_order",":","3","character","string","or","3","digit","integer","Order","of","the","rotations","about","the","parent","reference","frame","'s","unit","vectors",".","The","order","can","be","specified","by","the","strings","``","'XZX","'","``",",","``","'131","'","``",",","or","the","integer","``","131","``",".","There","are","12","unique","valid","rotation","orders",".","Warns","======","UserWarning","If","the","orientation","creates","a","kinematic","loop",".","Examples","========","Setup","variables","for","the","examples",":",">",">",">","from","sympy","import","symbols",">",">",">","from","sympy.physics.vector","import","ReferenceFrame",">",">",">","q1",",","q2",",","q3","=","symbols","(","'q1",",","q2",",","q3","'",")",">",">",">","N","=","ReferenceFrame","(","'N","'",")",">",">",">","B","=","ReferenceFrame","(","'","B","'",")",">",">",">","B1","=","ReferenceFrame","(","'B1","'",")",">",">",">","B2","=","ReferenceFrame","(","'B2","'",")",">",">",">","B3","=","ReferenceFrame","(","'B3","'",")",">",">",">","B.orient_space_fixed","(","N",",","(","q1",",","q2",",","q3",")",",","'312","'",")",">",">",">","B.dcm","(","N",")","Matrix","(","[","[","sin","(","q1",")","*","sin","(","q2",")","*","sin","(","q3",")","+","cos","(","q1",")","*","cos","(","q3",")",",","sin","(","q1",")","*","cos","(","q2",")",",","sin","(","q1",")","*","sin","(","q2",")","*","cos","(","q3",")","-","sin","(","q3",")","*","cos","(","q1",")","]",",","[","-sin","(","q1",")","*","cos","(","q3",")","+","sin","(","q2",")","*","sin","(","q3",")","*","cos","(","q1",")",",","cos","(","q1",")","*","cos","(","q2",")",",","sin","(","q1",")","*","sin","(","q3",")","+","sin","(","q2",")","*","cos","(","q1",")","*","cos","(","q3",")","]",",","[","sin","(","q3",")","*","cos","(","q2",")",",","-sin","(","q2",")",",","cos","(","q2",")","*","cos","(","q3",")","]","]",")","is","equivalent","to",":",">",">",">","B1.orient_axis","(","N",",","N.z",",","q1",")",">",">",">","B2.orient_axis","(","B1",",","N.x",",","q2",")",">",">",">","B3.orient_axis","(","B2",",","N.y",",","q3",")",">",">",">","B3.dcm","(","N",")",".simplify","(",")","Matrix","(","[","[","sin","(","q1",")","*","sin","(","q2",")","*","sin","(","q3",")","+","cos","(","q1",")","*","cos","(","q3",")",",","sin","(","q1",")","*","cos","(","q2",")",",","sin","(","q1",")","*","sin","(","q2",")","*","cos","(","q3",")","-","sin","(","q3",")","*","cos","(","q1",")","]",",","[","-sin","(","q1",")","*","cos","(","q3",")","+","sin","(","q2",")","*","sin","(","q3",")","*","cos","(","q1",")",",","cos","(","q1",")","*","cos","(","q2",")",",","sin","(","q1",")","*","sin","(","q3",")","+","sin","(","q2",")","*","cos","(","q1",")","*","cos","(","q3",")","]",",","[","sin","(","q3",")","*","cos","(","q2",")",",","-sin","(","q2",")",",","cos","(","q2",")","*","cos","(","q3",")","]","]",")","It","is","worth","noting","that","space-fixed","and","body-fixed","rotations","are","related","by","the","order","of","the","rotations",",","i.e",".","the","reverse","order","of","body","fixed","will","give","space","fixed","and","vice","versa",".",">",">",">","B.orient_space_fixed","(","N",",","(","q1",",","q2",",","q3",")",",","'231","'",")",">",">",">","B.dcm","(","N",")","Matrix","(","[","[","cos","(","q1",")","*","cos","(","q2",")",",","sin","(","q1",")","*","sin","(","q3",")","+","sin","(","q2",")","*","cos","(","q1",")","*","cos","(","q3",")",",","-sin","(","q1",")","*","cos","(","q3",")","+","sin","(","q2",")","*","sin","(","q3",")","*","cos","(","q1",")","]",",","[","-sin","(","q2",")",",","cos","(","q2",")","*","cos","(","q3",")",",","sin","(","q3",")","*","cos","(","q2",")","]",",","[","sin","(","q1",")","*","cos","(","q2",")",",","sin","(","q1",")","*","sin","(","q2",")","*","cos","(","q3",")","-","sin","(","q3",")","*","cos","(","q1",")",",","sin","(","q1",")","*","sin","(","q2",")","*","sin","(","q3",")","+","cos","(","q1",")","*","cos","(","q3",")","]","]",")",">",">",">","B.orient_body_fixed","(","N",",","(","q3",",","q2",",","q1",")",",","'132","'",")",">",">",">","B.dcm","(","N",")","Matrix","(","[","[","cos","(","q1",")","*","cos","(","q2",")",",","sin","(","q1",")","*","sin","(","q3",")","+","sin","(","q2",")","*","cos","(","q1",")","*","cos","(","q3",")",",","-sin","(","q1",")","*","cos","(","q3",")","+","sin","(","q2",")","*","sin","(","q3",")","*","cos","(","q1",")","]",",","[","-sin","(","q2",")",",","cos","(","q2",")","*","cos","(","q3",")",",","sin","(","q3",")","*","cos","(","q2",")","]",",","[","sin","(","q1",")","*","cos","(","q2",")",",","sin","(","q1",")","*","sin","(","q2",")","*","cos","(","q3",")","-","sin","(","q3",")","*","cos","(","q1",")",",","sin","(","q1",")","*","sin","(","q2",")","*","sin","(","q3",")","+","cos","(","q1",")","*","cos","(","q3",")","]","]",")"]
code: def orient_space_fixed(self, parent, angles, rotation_order):
      """Rotates this reference frame relative to the parent reference frame
      by right hand rotating through three successive space fixed simple axis
      rotations. Each subsequent axis of rotation is about the "space fixed"
      unit vectors of the parent reference frame.
  
      The computed angular velocity in this method is by default expressed in
      the child's frame, so it is most preferable to use ``u1 * child.x + u2 *
      child.y + u3 * child.z`` as generalized speeds.
  
      Parameters
      ==========
      parent : ReferenceFrame
          Reference frame that this reference frame will be rotated relative
          to.
      angles : 3-tuple of sympifiable
          Three angles in radians used for the successive rotations.
      rotation_order : 3 character string or 3 digit integer
          Order of the rotations about the parent reference frame's unit
          vectors. The order can be specified by the strings ``'XZX'``,
          ``'131'``, or the integer ``131``. There are 12 unique valid
          rotation orders.
  
      Warns
      ======
  
      UserWarning
          If the orientation creates a kinematic loop.
  
      Examples
      ========
  
      Setup variables for the examples:
  
      >>> from sympy import symbols
      >>> from sympy.physics.vector import ReferenceFrame
      >>> q1, q2, q3 = symbols('q1, q2, q3')
      >>> N = ReferenceFrame('N')
      >>> B = ReferenceFrame('B')
      >>> B1 = ReferenceFrame('B1')
      >>> B2 = ReferenceFrame('B2')
      >>> B3 = ReferenceFrame('B3')
  
      >>> B.orient_space_fixed(N, (q1, q2, q3), '312')
      >>> B.dcm(N)
      Matrix([
      [ sin(q1)*sin(q2)*sin(q3) + cos(q1)*cos(q3), sin(q1)*cos(q2), sin(q1)*sin(q2)*cos(q3) - sin(q3)*cos(q1)],
      [-sin(q1)*cos(q3) + sin(q2)*sin(q3)*cos(q1), cos(q1)*cos(q2), sin(q1)*sin(q3) + sin(q2)*cos(q1)*cos(q3)],
      [                           sin(q3)*cos(q2),        -sin(q2),                           cos(q2)*cos(q3)]])
  
      is equivalent to:
  
      >>> B1.orient_axis(N, N.z, q1)
      >>> B2.orient_axis(B1, N.x, q2)
      >>> B3.orient_axis(B2, N.y, q3)
      >>> B3.dcm(N).simplify()
      Matrix([
      [ sin(q1)*sin(q2)*sin(q3) + cos(q1)*cos(q3), sin(q1)*cos(q2), sin(q1)*sin(q2)*cos(q3) - sin(q3)*cos(q1)],
      [-sin(q1)*cos(q3) + sin(q2)*sin(q3)*cos(q1), cos(q1)*cos(q2), sin(q1)*sin(q3) + sin(q2)*cos(q1)*cos(q3)],
      [                           sin(q3)*cos(q2),        -sin(q2),                           cos(q2)*cos(q3)]])
  
      It is worth noting that space-fixed and body-fixed rotations are
      related by the order of the rotations, i.e. the reverse order of body
      fixed will give space fixed and vice versa.
  
      >>> B.orient_space_fixed(N, (q1, q2, q3), '231')
      >>> B.dcm(N)
      Matrix([
      [cos(q1)*cos(q2), sin(q1)*sin(q3) + sin(q2)*cos(q1)*cos(q3), -sin(q1)*cos(q3) + sin(q2)*sin(q3)*cos(q1)],
      [       -sin(q2),                           cos(q2)*cos(q3),                            sin(q3)*cos(q2)],
      [sin(q1)*cos(q2), sin(q1)*sin(q2)*cos(q3) - sin(q3)*cos(q1),  sin(q1)*sin(q2)*sin(q3) + cos(q1)*cos(q3)]])
  
      >>> B.orient_body_fixed(N, (q3, q2, q1), '132')
      >>> B.dcm(N)
      Matrix([
      [cos(q1)*cos(q2), sin(q1)*sin(q3) + sin(q2)*cos(q1)*cos(q3), -sin(q1)*cos(q3) + sin(q2)*sin(q3)*cos(q1)],
      [       -sin(q2),                           cos(q2)*cos(q3),                            sin(q3)*cos(q2)],
      [sin(q1)*cos(q2), sin(q1)*sin(q2)*cos(q3) - sin(q3)*cos(q1),  sin(q1)*sin(q2)*sin(q3) + cos(q1)*cos(q3)]])
  
      """
      from sympy.physics.vector.functions import dynamicsymbols
  
      _check_frame(parent)
  
      (
          amounts,
          rot_order,
          rot_matrices,
      ) = self._parse_consecutive_rotations(angles, rotation_order)
      self._dcm(
          parent, rot_matrices[2] * rot_matrices[1] * rot_matrices[0]
      )
  
      rot_vecs = [zeros(3, 1) for _ in range(3)]
      for i, order in enumerate(rot_order):
          rot_vecs[i][order - 1] = amounts[i].diff(dynamicsymbols._t)
      u1, u2, u3 = rot_vecs[0] + rot_matrices[0].T * (
          rot_vecs[1] + rot_matrices[1].T * rot_vecs[2]
      )
      wvec = (
          u1 * self.x + u2 * self.y + u3 * self.z
      )  # There is a double -
      self._ang_vel_dict.update({parent: wvec})
      parent._ang_vel_dict.update({self: -wvec})
      self._var_dict = {}
  
imports: from sympy import diff, expand, sin, cos, sympify, eye, zeros, ImmutableMatrix, MatrixBase
  from sympy.core.symbol import Symbol
  from sympy.simplify.trigsimp import trigsimp
  from sympy.physics.vector.vector import Vector, _check_vector
  from sympy.utilities.misc import translate
  from warnings import warn
label_desc: Use image node_id 18 for calling the ReferenceFrame obj's underlying member method code with example usage: obj.orient_space_fixed(parent, angles, rotation_order) without return types