19.07.2013 Views

Kinematic and Dynamic Analysis of Spatial Six Degree of Freedom ...

Kinematic and Dynamic Analysis of Spatial Six Degree of Freedom ...

Kinematic and Dynamic Analysis of Spatial Six Degree of Freedom ...

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

clicking again will stop recording data. When recording, iMIDAS saves every change<br />

<strong>of</strong> platform position either manual or automatic.<br />

• Clear data in memory: Clears the recorded data from memory.<br />

• Save as: This item opens a dialog for you to give a filename for the data file. However<br />

this item does not save your file, one has to click Save button for that. The filename<br />

extension is .ikd by default (inverse kinematic data). The file is in text format <strong>and</strong> can<br />

be viewed by appropriate viewers such as notepad.<br />

• Save: Saves the data file in memory to disk, using the name selected before.<br />

<strong>Analysis</strong><br />

• Demonstration: iMIDAS will give r<strong>and</strong>om motions to the platform. If you have<br />

already selected to sample data to memory, then the motions created by this option<br />

will also be saved. Clicking on this menu item will stop demonstration.<br />

• Reset position: This will reset the platform to its starting position (x=0, y=0,<br />

z=stroke, yaw = 0, pitch =0, roll =0).<br />

A.2.7 Source Code<br />

Like all visual programming languages, Delphi creates very long codes. Due to this,<br />

only the engine <strong>of</strong> iMIDAS is presented here.<br />

procedure ReadTransformationParameters;<br />

begin<br />

rx:=InvMainForm.UpDownX.Position;<br />

ry:=InvMainForm.UpDownY.Position;<br />

rz:=InvMainForm.UpDownZ.Position;<br />

roll:=InvMainForm.UpDownRoll.Position*pi/180;<br />

pitch:=InvMainForm.UpDownPitch.Position*pi/180;<br />

yaw:=InvMainForm.UpDownYaw.Position*pi/180;<br />

end;<br />

procedure MyPoint.Transform(r,p,y,rox,roy,roz : double);<br />

var<br />

dx,dy,dz : double;<br />

begin<br />

dx:=cos(y)*cos(p)*px;<br />

dx:=(cos(y)*sin(p)*sin(r)-sin(y)*cos(r))*py+dx;<br />

dy:=sin(y)*cos(p)*px;<br />

dy:=(sin(y)*sin(p)*sin(r)+cos(y)*cos(r))*py+dy;<br />

dz:=-sin(p)*px;<br />

dz:=cos(p)*sin(r)*py+dz;<br />

ptx:=rox+dx;<br />

74

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!