NTNUJAVA Virtual Physics Laboratory
Enjoy the fun of physics with simulations!
Backup site http://enjoy.phy.ntnu.edu.tw/ntnujava/

Easy Java Simulations (2001- ) => Collaborative Community of EJS => Topic started by: lookang on July 17, 2011, 01:53:04 pm



Title: Ejs Open Source 3 Dimensional Rotational Gimbal lock Model java applet
Post by: lookang on July 17, 2011, 01:53:04 pm
Ejs Open Source 3 Dimensional Rotational Gimbal lock Model java applet by Fu-Kwun Hwang and lookang
3 Dimensional Rotational Model
as a response to http://www.phy.ntnu.edu.tw/ntnujava/index.php?topic=2084.0


reference: http://en.wikipedia.org/wiki/Gimbal_lock
Gimbal lock is the loss of one degree of freedom in a three-dimensional space that occurs when the axes of two of the three gimbals are driven into a parallel configuration, "locking" the system into rotation in a degenerate two-dimensional space.
The word lock is misleading: no gimbal is restrained. All three gimbals can still rotate freely about their respective axes of suspension. Nevertheless, because of the parallel orientation of two of the gimbals axes there is no gimbal available to accommodate rotation along one axis.

[ejsapplet]


 3 Dimensional Rotational Model
Flight dynamics is the science of air vehicle orientation and control in three dimensions. The three critical flight dynamics parameters are the angles of rotation in three dimensions about the vehicle's center of mass, known as pitch, roll and yaw.

Description:
The 3 Dimensional Rotational Model is a setup that resembles an actual real life demonstration set using to illustrate and allow exploration of the meaning of pitch, roll and yaw. There are 2 possible frames to choose from cylinder rings or rectangles.
The independent axes when selected allows independent axes to be rotated without affecting the others 2 axes, while when independent is not selected allows a couple rotational model that could be used to explore the concept of gimbal lock.
In simple Java, the is no object rendered in the model, just the frames to explore pitch, roll and yaw.
In Java 3D, a aeroplane (in wrl) is rendered inside the model for better association to aeroplane pitch, roll and yaw angles in 3D.

Exercises:
Engage:
Have you wondered how do airplane pliots communicate to each other about the angles that the airplane makes with a defined equilibrium state?
Do you know that what you learn here can be applied to boat and ships angles too?

Set the sliders to roll = 90 , pitch 90 and yaw = 0 degree.
explore the roll slider and verify whether the following statement is appriopriate.
"The equilibrium roll angle is known as wings level or zero bank angle"
Discuss and suggest a value of roll for this zero bank angle to occur.
hint: roll = 90 degree

Similarly, explore the sliders pitch and yaw and visit http://en.wikipedia.org/wiki/Flight_dynamics_(aircraft) and other websites related to draw sketches and describe in sentence(s) the meaning of
i) roll
ii) pitch
iii) yaw
hint:

According to http://en.wikipedia.org/wiki/Gimbal_lock
Gimbal lock is the loss of one degree of freedom in a three-dimensional space that occurs when the axes of two of the three gimbals are driven into a parallel configuration, "locking" the system into rotation in a degenerate two-dimensional space.

Explore the model and discuss with your classmates what this means?

 
Advanced Learner:
Please submit your remix model that model features that are not available in the existing virtual lab and share your model with the world through NTNUJAVA Virtual Physics Laboratory http://www.phy.ntnu.edu.tw/ntnujava/index.php?board=28.0. Impacting the world with your model now.
Credits:

The 3D rotational Model was created by Fu-Kwun Hwang (original model found here http://www.phy.ntnu.edu.tw/ntnujava/index.php?topic=2084.0) , customized by Loo Kang WEE (newer model found here http://www.phy.ntnu.edu.tw/ntnujava/index.php?topic=2237.0) using the Easy Java Simulations (EJS) version 4.3.3.3 authoring and modeling tool.  An applet version of this model is available on the NTNU website < http://www.phy.ntnu.edu.tw/ntnujava/ >.

You can examine and modify this compiled EJS model if you run the model (double click on the model's jar file), right-click within a plot, and select "Open EJS Model" from the pop-up menu.  You must, of course, have EJS installed on your computer.  Information about EJS is available at: and in the OSP comPADRE collection .


Title: Re: Ejs Open Source Gimbal lock Model java applet
Post by: lookang on July 17, 2011, 01:56:03 pm
changes made:

changes made.
naming convention change to suit airplanes as in picture
made 19 closest instead of 361
set initial values to all zero all blanks
range of slider -180 to 180 degree
added play pause button
axes implementation added instead of box for clearer orientation when talking about pitch roll and yaw
re-design the implementation to suit the physical Gimbal with support structures represented by cylinders using the 3D group method to ease the need to program in the codes as it is the outer ring's motion is automatically translated to the middle ring and the middle ring motion translation to inner ring.
add cylinders to aid the visualization of the support of the Gimbal

added new features
changes made
added rectangles from Prof Hwang's version 6
customized to my version 4 dimensions
added an independent axis control checkbox for egabev mention something about no dependency of each axis of rotation, without the structures and in rectangle shapes, the rectangles do overlap
made it a little bigger
consistent the color with Prof Hwang's version 6
vrml files
render is JAVA3D is the only trick!
think there is a bug in Ejs 4.3.3.2 , it works in the download standalone jar but not VRMLfile cannot show up in web deploy applets.
download file to view the VRML airplane
reference:
http://www.fho-emden.de/~hoffmann/gimbal09082002.pdf
Enjoy! egabev


Title: Re: Ejs Open Source Gimbal lock Model java applet
Post by: lookang on October 04, 2011, 02:02:46 pm
strange error in mac

java.lang.NullPointerException
   at users.sgeducation.lookang.glimbal8wee02_pkg.glimbal8wee02View.reset(glimbal8wee02View.java:1516)
   at org.colos.ejs.library.Animation.reset(Unknown Source)
   at users.sgeducation.lookang.glimbal8wee02_pkg.glimbal8wee02Simulation.(glimbal8wee02Simulation.java:23)
   at users.sgeducation.lookang.glimbal8wee02_pkg.glimbal8wee02.(glimbal8wee02.java:140)
   at users.sgeducation.lookang.glimbal8wee02_pkg.glimbal8wee02Applet.init(glimbal8wee02Applet.java:26)
   at sun.plugin2.applet.Plugin2Manager$AppletExecutionRunnable.run(Plugin2Manager.java:1640)
   at java.lang.Thread.run(Thread.java:680)

but run perfectly in Windows.


Title: Re: Ejs Open Source 3 Dimensional Rotational Gimbal lock Model java applet
Post by: lookang on November 19, 2011, 11:05:18 am
i managed to fix the java in m iMac and the model run well in MacOSX 10.6.8

but the Java 3D is still not working


Title: Re: Ejs Open Source 3 Dimensional Rotational Gimbal lock Model java applet
Post by: ilua on November 27, 2011, 11:51:22 pm
exactly it goes with my thinking.-*-


Title: Re: Ejs Open Source 3 Dimensional Rotational Gimbal lock Model java applet
Post by: alansholto on August 29, 2012, 07:46:34 pm
Sadly, my computer won't let me run the applet as it says it can't trust the source.
Do you have a solution to my problem?
Thanks.


Title: Re: Ejs Open Source 3 Dimensional Rotational Gimbal lock Model java applet
Post by: lookang on August 29, 2012, 07:53:20 pm
U need to download the applet and run it as a standalone.

Since you already registered, u should be able to download the file.

To run in java 3d, please install java 3d else it will be in simple 3d
Good luck!