Best writers. Best papers. Let professionals take care of your academic papers

Order a similar paper and get 15% discount on your first order with us
Use the following coupon "FIRST15"
ORDER NOW

Position of the robotic elbow joint in Fortran

robotjoints.f implements the needed solution. You need to be able to look at robotjoints.f and already have a pretty good understanding how it’s all works. We will research about the each individual line in the program in just a few seconds.

!     This is the file "robotjoints.f".
      
      program robotjoints
      
      
!     Written by Alex July 31 2001.
!
!     This program calculates the A-B position of a robotic elbow joint.
!
!     Input:
!        Predetermined.
!                    -- The A-B) location of the shoulder joint itself
!                    -- The length of the arm itself. 
!        The user is prompted by the program to enter:
!                    -- The angle of the shoulder joint itself in degrees
!                          counterclockwise from the positive A axis.
!     Output:
!        The output is to the screen:
!                    -- The A-B position of a robotic elbow joint
!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!
!     shouldera and shoulderb are the A and B coordinates of the shoulder joint.
!     robotarm is the length of the robotic arm, in meters.
!
!     alphad is the angle of the shoulder joint, measured in degrees.
!     alphar is the angle of the shoulder joint, measured in radians.
!
!     elbowa and elbowb are the a and b coordinates of the elbow joint.
      
      implicit none             ! no undefined variables

      real :: shouldera, shoulderb
      real :: robotarm
      real :: alphad, alphar
      real :: elbowa, elbowb

      real, parameter :: pi = 3.14159   ! Declares pi to be a constant.
      
!     Set up the known values.
      
      shouldera = 0.0
      shoulderb = 1.45
      robotarm  = 0.343
      
!     Request the angle of the shoulder joint from the user.
      
      print *, 'Enter the angle of the shoulder joint (in degrees): '
      read *, alphad              ! Convert to radians.
      alphar = alphad * (pi / 180.0)
      
!     Determine the (a, b) position of the elbow joint.
      
      elbowa = shouldera + (robotarm * sin(alphar))
      elbowb = shoulderb - (robotarm * cos(alphar))

!     Print out the results.

      print *, 'The A coordinate of the elbow joint is ', elbowa
      print *, 'The B coordinate of the elbow joint is ', elbowb
      
      end
      
!     End of file.

Take a moment to read the program and try to understand how it determines the position of the robotic elbow joint. No need to worry if you don’t “know” how to program Fortran. Using your own knowledge of the problem, you should be able to figure out, more or less, what the programs do and how they do it.

Upload your project here

The post Position of the robotic elbow joint in Fortran appeared first on High Quality Academic Writing Help and Programming Help.

 
Looking for a Similar Assignment? Order now and Get 10% Discount! Use Coupon Code "Newclient"