Example #1
0
RigidMotion<InertialFrame, ThisFrame>
BodySurfaceDynamicFrame<InertialFrame, ThisFrame>::ToThisFrameAtTime(
    Instant const& t) const {
  DegreesOfFreedom<InertialFrame> const centre_degrees_of_freedom =
      centre_trajectory_->EvaluateDegreesOfFreedom(t, &hint_);

  Rotation<InertialFrame, ThisFrame> rotation =
      centre_->template ToSurfaceFrame<ThisFrame>(t);
  AngularVelocity<InertialFrame> angular_velocity = centre_->angular_velocity();
  RigidTransformation<InertialFrame, ThisFrame> const
      rigid_transformation(centre_degrees_of_freedom.position(),
                           ThisFrame::origin,
                           rotation.Forget());
  return RigidMotion<InertialFrame, ThisFrame>(
             rigid_transformation,
             angular_velocity,
             centre_degrees_of_freedom.velocity());
}