This is the web version of EJS interface
EJS version 4.3.3.3
  1. Title=Gimbal Model
  2. Author=Fu-Kwun Hwang - Dept. of Physics,National Taiwan normal Univ. remixed by lookang
  3. Abstract=http://www.phy.ntnu.edu.tw/ntnujava/ hwang@phy.ntnu.edu.tw this remix version is edited by weelookang@gmail.com
  4. CaptureTools=true
  5. DataTools=false
  6. LanguageTools=false
  7. EmersionSupport=false
  8. AppletColSupport=false
  9. UseInterpreter=true
  10. DetectedFiles=./EarthAndSatelite/java3dicon25px.png;./EarthAndSatelite/javasimpleicon25px.png;./gimbal/V_fighter.wrl;./gimbal/gimbal.html;
  11. AuxiliaryFiles=./gimbal/;

Intro Page

    NameValueTypeDimension
    NameValueTypeDimension
    NameValueTypeDimension
    NameValueTypeDimension
    NameValueTypeDimension

    Init Page

    Indep. Var. Increment
    d c1 /dt=wc1
    d b2 /dt=wb2
    d wb2 /dt=k2*wc1*wc1*Math.sin(b2)*Math.cos(b2)
    d a3 /dt=wa3
    d wa3 /dt=k3*wc1*wc1*Math.sin(a3)*Math.cos(a3)
    SolverRungeKutta AbsoluteTolerance=0.00001
    Indep. Var. Increment
    d c1 /dt=wc1
    d a2 /dt=wb2
    d c3 /dt=wa3
    SolverEuler AbsoluteTolerance=0.00001

    FixRel Page

    //textyaw = "yaw = "+ double2String(c3a,1.0); textyaw = "yaw "; textpitch = "pitch"; textroll = "roll"; //b2=b3; //b3=b2; //c3=c2; //mat1="z:"+c1+" & x:"+a2+" & z:"+c3; //mat2="x:"+a2+" & z:"+c3;//" & z:"+a2; mat3="z:"+c3;//+" & y:"+b3+" & z:"+a3; // mat2="z:"+c3+ "& y:"+a2; mat2= "x:"+a2; mat1="z:"+c1; /* older code by lookang mat3="z:"+c3;//+" & y:"+b3+" & z:"+a3; mat2="z:"+c3+ "& y:"+a2; //mat2="z:"+c3; //+ "& y:"+a2; mat1="z:"+c3+ "& y:"+a2+"& x:"+c1; */ if (c1>=0){ c1a=(c1/a2c)%360; } else{ c1a=((+2*pi+c1)/a2c)%360; } if (a2>=0){ a2a=(a2/a2c)%360; } else{ a2a=((+2*pi+a2)/a2c)%360; } if (c3>=0){ c3a=(c3/a2c)%360; } else{ c3a=((+2*pi+c3)/a2c)%360; } //c1a=c1/a2c%360; //a2a=a2/a2c%360; //c3a=c3/a2c%360; /* if (showroll==true) { wc1= pi2/T1; showroll2=false; } else{ wc1= 0.; } if (showpitch==true) { wb2= pi2/T1; showpitch2=false; } else{ wb2= 0.; } if (showyaw==true) { wa3= pi2/T1; showyaw2=false; } else{ wa3= 0.; } if (showroll2==true) { wc1= -pi2/T1; showroll=false; } else{ wc1= 0.; } if (showpitch2==true) { wb2= -pi2/T1; showpitch=false; } else{ wb2= 0.; } if (showyaw2==true) { wa3= -pi2/T1; showyaw=false; } else{ wa3= 0.; } */

    Lib Page

    double dv; public String double2String(double v,double divider){ if(v>0)dv=0.5; else if(v<0)dv=-0.5; else dv=0; return (int)(v*divider+dv)/divider+""; } // this code has to do with displaying the number 2.3 instead of 2.300000001 when using % %
    EJSVIEW: Click link to view it's content
    Control variables:(testing)
    double,double,double
    title="Gimbal Model"
    layout=border
    visible=true
    location="51,75"
    size="510,475"
    position=center
    minimumX=-1.0
    maximumX=1.0
    minimumY=-1.0
    maximumY=1.0
    minimumZ=-1.0
    maximumZ=1.0
    cameraAzimuth=0.9299999999999999
    cameraAltitude=0.2350000000000002
    cameraFocusX=0.0
    cameraFocusY=0.0
    cameraFocusZ=0.0
    cameraRotation=0.0
    cameraDistanceToScreen=15.759999999999987
    implementation=mode
    illumination=true
    decorationType=NONE
    useColorDepth=true
    tooltip="Gimbal Model"
    transformation=%mat3%
    visible=gimbal
    x=0
    y=0
    z=r3+size/2
    sizeX=size
    sizeY=size
    sizeZ=size
    fillColor=MAGENTA
    x=0
    y=0
    z=-r3-size/2
    sizeX=size
    sizeY=size
    sizeZ=size
    fillColor=MAGENTA
    x=0
    y=0
    z=0
    sizeX=r3*2
    sizeY=r3*2
    sizeZ=size2*2
    transformation="x:1.57"
    visible=!show
    closedTop=false
    closedBottom=false
    lineColor=MAGENTA
    fillColor=MAGENTA
    resolution="1,25,1"
    x=0
    y=r3
    z=0
    visible=gimbal&&(dragz||!(wa3==0))
    text=%textyaw%
    lineColor=MAGENTA
    fillColor=MAGENTA
    sizeX=0
    sizeY=r3
    sizeZ=0
    visible=dragz||!(wa3==0)
    lineColor=MAGENTA
    fillColor=MAGENTA
    sizeX=2.4*r1
    sizeY=w
    sizeZ=2.4*r1
    visible=show
    lineColor=MAGENTA
    fillColor=MAGENTA
    lineWidth=stroke
    drawingFill=false
    resolution="1,255,1"
    transformation=mat2
    x=(r2+(r3-r2)/2)
    y=0
    z=0
    sizeX=size/2
    sizeY=size/2
    sizeZ=size/2
    transformation="y:1.57"
    fillColor=GREEN
    x=0
    y=0
    z=0
    sizeX=r2*2
    sizeY=r2*2
    sizeZ=size2*2
    transformation="x:1.57"
    visible=!show
    closedTop=false
    closedBottom=false
    lineColor=GREEN
    fillColor=GREEN
    resolution="1,25,1"
    x=-(r2+(r3-r2)/2)
    y=0
    sizeX=size/2
    sizeY=size/2
    sizeZ=size/2
    transformation="y:1.57"
    fillColor=GREEN
    sizeX=0
    sizeY=r2
    sizeZ=0
    visible=dragy||!(wb2==0)
    lineColor=GREEN
    fillColor=GREEN
    x=0
    y=r2
    z=0
    visible=gimbal&&(dragy||!(wb2==0))
    text=%textpitch%
    lineColor=GREEN
    fillColor=GREEN
    x=0
    y=0
    z=0
    sizeX=2.2*r1
    sizeY=w
    sizeZ=2.2*r1
    visible=show
    lineColor=GREEN
    lineWidth=stroke
    drawingFill=false
    resolution="1,255,1"
    transformation=mat1
    x=0
    y=0
    z=(r1+(r2-r1)/2)
    sizeX=size/2
    sizeY=size/2
    sizeZ=size/2
    transformation="z:1.57"
    fillColor=BLUE
    x=0
    y=0
    z=0
    sizeX=r1*2
    sizeY=r1*2
    sizeZ=size2*2
    transformation="x:1.57"
    visible=!show
    closedTop=false
    closedBottom=false
    lineColor=BLUE
    fillColor=BLUE
    resolution="1,25,1"
    x=0
    y=0
    z=-(r1+(r2-r1)/2)/1.3
    sizeX=size/2
    sizeY=size/2
    sizeZ=size*2
    transformation="z:1.57"
    fillColor=BLUE
    sizeX=0
    sizeY=r1
    sizeZ=0
    visible=dragx||!(wc1==0)
    x=0
    y=r1
    z=0
    visible=gimbal&&(dragx||!(wc1==0))
    text=%textroll%
    lineColor=BLUE
    fillColor=BLUE
    sizeX=2*r1
    sizeY=w
    sizeZ=2*r1
    visible=show
    lineColor=BLUE
    lineWidth=stroke
    drawingFill=false
    resolution="1,255,1"
    x=0
    y=0
    z=0
    sizeX=0.9
    sizeY=0.9
    sizeZ=1
    transformation="x:0 & y:-1.57 & z:3.14"
    visible=mode==1
    VRMLfile="./gimbal/V_fighter.wrl"
    fillColor=BLUE
    drawingFill=true
    transformation=%mat3%
    visible=!gimbal
    x=0
    y=0
    z=r3+size/2
    sizeX=size
    sizeY=size
    sizeZ=size
    visible=false
    fillColor=MAGENTA
    x=0
    y=0
    z=-r3-size/2
    sizeX=size
    sizeY=size
    sizeZ=size
    visible=false
    fillColor=MAGENTA
    x=0
    y=0
    z=0
    sizeX=r3*2
    sizeY=r3*2
    sizeZ=size2*2
    transformation="x:1.57"
    visible=!show
    closedTop=false
    closedBottom=false
    lineColor=MAGENTA
    fillColor=MAGENTA
    resolution="1,25,1"
    sizeX=0
    sizeY=r3
    sizeZ=0
    visible=dragz
    lineColor=MAGENTA
    fillColor=MAGENTA
    x=0
    y=r3
    z=0
    pixelSize=true
    visible=dragz&&(!(wa3==0)&&!gimbal)
    text=%textpitch%
    font=Monospaced,PLAIN,10
    lineColor=MAGENTA
    fillColor=MAGENTA
    sizeX=2.4*r1
    sizeY=w
    sizeZ=2.4*r1
    visible=show
    lineColor=MAGENTA
    lineWidth=stroke
    drawingFill=false
    resolution="1,255,1"
    transformation=mat2
    visible=!gimbal
    x=(r2+(r3-r2)/2)
    y=0
    z=0
    sizeX=size/2
    sizeY=size/2
    sizeZ=size/2
    transformation="y:1.57"
    visible=false
    fillColor=GREEN
    x=0
    y=0
    z=0
    sizeX=r2*2
    sizeY=r2*2
    sizeZ=size2*2
    transformation="x:1.57"
    visible=!show
    closedTop=false
    closedBottom=false
    lineColor=GREEN
    fillColor=GREEN
    resolution="1,25,1"
    x=-(r2+(r3-r2)/2)
    y=0
    sizeX=size/2
    sizeY=size/2
    sizeZ=size/2
    transformation="y:1.57"
    visible=false
    fillColor=GREEN
    sizeX=0
    sizeY=r2
    sizeZ=0
    visible=dragy
    lineColor=GREEN
    fillColor=GREEN
    sizeX=2.2*r1
    sizeY=w
    sizeZ=2.2*r1
    visible=show
    lineColor=GREEN
    fillColor=GREEN
    lineWidth=stroke
    drawingFill=false
    resolution="1,255,1"
    x=0
    y=r2
    z=0
    pixelSize=true
    visible=dragz&&(!(wb2==0)&&!gimbal)
    text=%textpitch%
    lineColor=GREEN
    fillColor=GREEN
    transformation=mat1
    visible=!gimbal
    x=0
    y=0
    z=(r1+(r2-r1)/2)
    sizeX=size/2
    sizeY=size/2
    sizeZ=size/2
    transformation="z:1.57"
    visible=false
    fillColor=BLUE
    x=0
    y=0
    z=0
    sizeX=r1*2
    sizeY=r1*2
    sizeZ=size2*2
    transformation="x:1.57"
    visible=!show
    closedTop=false
    closedBottom=false
    lineColor=BLUE
    fillColor=BLUE
    resolution="1,25,1"
    x=0
    y=0
    z=-(r1+(r2-r1)/2)
    sizeX=size/2
    sizeY=size/2
    sizeZ=size/2
    transformation="z:1.57"
    visible=false
    fillColor=BLUE
    sizeX=0
    sizeY=r1
    sizeZ=0
    visible=dragx
    sizeX=2*r1
    sizeY=w
    sizeZ=2*r1
    visible=show
    lineColor=BLUE
    lineWidth=stroke
    drawingFill=false
    resolution="1,255,1"
    x=0
    y=r1
    z=0
    pixelSize=true
    visible=dragz&&(!(wc1==0)&&!gimbal)
    text=%textroll%
    lineColor=BLUE
    fillColor=BLUE
    position=west
    layout=VBOX
    visible=false
    position=center
    variable=axes
    format="axes=0.0"
    position=north
    variable=wc1
    format="wc1=0.00"
    position=south
    variable=wb2
    format="wb2=0.00"
    variable=wa3
    format="wa3=0.00"
    variable=c1a
    format="c1a=0.0"
    variable=c1
    format="c1=0.0"
    position=south
    layout=VBOX
    layout=HBOX
    layout=HBOX
    layout=HBOX
    variable=showroll2
    actionon=wc1= -pi2/T1; showroll=false;
    actionoff=wc1= 0.;
    background=BLUE
    position=north
    variable=c1a
    minimum=0
    maximum=360
    format="roll = 000"
    ticks=37
    closest=true
    pressaction=dragx=true;
    dragaction=c1=c1a*a2c;
    action=dragx=false;
    background=BLUE
    position=center
    variable=showroll
    actionon=wc1= pi2/T1; showroll2=false;
    actionoff=wc1= 0.;
    background=BLUE
    layout=HBOX
    variable=showpitch2
    actionon=wb2= -pi2/T1; showpitch=false;
    actionoff=wb2= 0.;
    background=GREEN
    variable=a2a
    minimum=0
    maximum=360
    format="pitch = 000"
    ticks=37
    closest=true
    pressaction=dragy=true;
    dragaction=a2=a2a*a2c;
    action=dragy=false;
    background=GREEN
    variable=showpitch
    actionon=wb2= pi2/T1; showpitch2=false;
    actionoff=wb2= 0.;
    background=GREEN
    layout=HBOX
    variable=showyaw2
    actionon=wa3= -pi2/T1; showyaw=false;
    actionoff=wa3= 0.;
    background=MAGENTA
    variable=c3a
    minimum=0
    maximum=360
    format="yaw = 000"
    ticks=37
    closest=true
    enabled=true
    pressaction=dragz=true;
    dragaction=c3=c3a*a2c;
    action=dragz=false;
    background=MAGENTA
    variable=showyaw
    actionon=wa3= pi2/T1; showyaw2=false;
    actionoff=wa3= 0.;
    background=MAGENTA
    layout=HBOX
    layout=VBOX
    variable=gimbal
    selected=true
    text="gimbal"
    variable=show
    selected=true
    text="rectangle"
    layout=HBOX
    selected=true
    image="./EarthAndSatelite/javasimpleicon25px.png"
    noUnselect=true
    actionon=mode = 0;
    tooltip="Simple Java"
    image="./EarthAndSatelite/java3dicon25px.png"
    noUnselect=true
    actionon=mode = 1;
    tooltip="Java 3D "
    layout=HBOX
    position=center
    variable=t
    minimum=0.0
    maximum=1.0
    format="t=0.00 s"
    layout=HBOX
    position=center
    variable=_isPaused
    imageOn="/org/opensourcephysics/resources/controls/images/play.gif"
    actionOn=_play()
    imageOff="/org/opensourcephysics/resources/controls/images/pause.gif"
    actionOff=_pause()
    position=east
    image="/org/opensourcephysics/resources/controls/images/stepforward.gif"
    action=_step()
    image="/org/opensourcephysics/resources/controls/images/reset.gif"
    action=_reset()