#### gattispilot

Something that I am working on is A James Webb Telescope for Orbiter2016.

But I am needing help on the unfolding/folding of the mirror and arms.

So this is how it ends up:

I have the lower arm as the parent and the pivot point is at the bottom.
The arm and front Mirror are all in the same group.

That parts works
But the upper arm is what I can't seem to get.

Code:
static UINT MIRRORARMGrp1[5] = { 70, 0, 79, 72, 84 };
MIRRORARM1 = new MGROUP_ROTATE(mesh_JWST, MIRRORARMGrp1, 5, _V(-1.733, 2.334611, - 1.599423), _V(.9, -.01, 0), (float)(75 * RAD));
MIRRORPARENT = AddAnimationComponent(anim_MIRROR, 0, 1, MIRRORARM1);

static UINT MIRRORARMGrp2[1] = { 73 };
MIRRORARM2 = new MGROUP_ROTATE(mesh_JWST, MIRRORARMGrp2, 1, _V(1.733, 2.334611, -1.599423), _V(.9, 0, 0), (float)(75 * RAD));
MIRRORPARENT1 = AddAnimationComponent(anim_MIRROR, 0, 1, MIRRORARM2, SCOPEPARENT);

static UINT MIRRORARMGrp4[1] = { 48 };
MIRRORARM4 = new MGROUP_ROTATE(mesh_JWST, MIRRORARMGrp4, 1, _V(0, 5.659166 ,- 8.857357), _V(-1, 0, 0), (float)(90 * RAD));
MIRRORPARENT3 = AddAnimationComponent(anim_MIRROR, 0, 1, MIRRORARM4, MIRRORPARENT1);

static UINT MIRRORARMGrp5[1] = { 49 };
MIRRORARM5 = new MGROUP_ROTATE(mesh_JWST, MIRRORARMGrp5, 1, _V(0, 9.174574, - 1.599423), _V(1, 0, 0), (float)(240 * RAD));
MIRRORPARENT4 = AddAnimationComponent(anim_MIRROR, 0, 1, MIRRORARM5 );

#### Urwumpe

##### Not funny anymore
Donator
Actually, it is simple geometry. Do you know some of the basic formulas regarding triangles? For example this one?

https://en.wikipedia.org/wiki/Law_of_sines

You know all three distances, so you can calculate all angles. You only need two angles, the third one is implicit then.

#### gattispilot

Thanks
Here are the angles.

I think the issue is the animation.

As arm1 moves the mirror . Arm 2 need to move and take arm3 with it and then arm 3 needs to rotate a total of 250 degrees.

#### Urwumpe

##### Not funny anymore
Donator
I think the issue is the animation.

As arm1 moves the mirror . Arm 2 need to move and take arm3 with it and then arm 3 needs to rotate a total of 250 degrees.

Yes, but as already written in the PM, the issue is that arm3 does not rotate at the same speed all the time. The angle between arm2 and arm3 is more important to you. If you look at your drawing and look at where arm2 connects to the secondary mirror and arm3 connects to the main mirror assembly, you can easily imagine a triangle formed by a line between those rotation axes, arm2 and arm3. If you can calculate the angles between arm2 and arm3, you are approaching victory.

The angle between secondary and arm2 is another small problem, but much easier to calculate than the angle between arm2 and arm3.

#### GLS

##### Well-known member
Orbiter Contributor
Looks like a 4-bar linkage to me.

#### gattispilot

Looks like a 4-bar linkage to me.

Not sure what that is?

---------- Post added at 07:47 AM ---------- Previous post was at 07:46 AM ----------

Yes, but as already written in the PM, the issue is that arm3 does not rotate at the same speed all the time. The angle between arm2 and arm3 is more important to you. If you look at your drawing and look at where arm2 connects to the secondary mirror and arm3 connects to the main mirror assembly, you can easily imagine a triangle formed by a line between those rotation axes, arm2 and arm3. If you can calculate the angles between arm2 and arm3, you are approaching victory.

The angle between secondary and arm2 is another small problem, but much easier to calculate than the angle between arm2 and arm3.

So calculate the arm2 and arm3? at what point. They are 180 degrees of each other when extended

#### gattispilot

Oh. Well it does look like that then.

So as I see it. Arm1 rotates the arm and mirror towards the main mirror.
this I have. I may need to go back and modify the mesh for that 4 bar linkage.

But not sure how to get the upper arms to animate and follow the secondary mirror.

#### Urwumpe

##### Not funny anymore
Donator
The big question you should maybe ask yourself: Which arm does the movement? If arm3 is driven by a motor, arm3 would move at constant speed, but the other arms won't.

#### gattispilot

Not sure on the real one which arm moves. I thought about have the arm attached to the mirror on top center as the parent. Then the upper arms would stay together but en the mirror and lower arm would be child?

#### Urwumpe

##### Not funny anymore
Donator
Not sure on the real one which arm moves. I thought about have the arm attached to the mirror on top center as the parent. Then the upper arms would stay together but en the mirror and lower arm would be child?

You have to differ a bit between "What moves the mechanism" and "How do I represent this in software". As you can easily see, you have a circle of structures there, where Orbiter expects a tree structure (parent-> children relations) - so you need to decide where and in which direction this circle should be turned into a tree.

Software animation and real mechanism are completely different worlds, but your animation should look like the mechanism.

#### barrygolden

##### Active member
I want to thank you guys for having a go at this addon. It would be a great payload for the SLS. and with a docking port on the bottom a place to fly the MPCV. The deployment on you tube is awesome but complicated some simple form in orbiter would be super. Some one should give a thought to a MFD where when the JWST looks at a target in the sky it could show maybe an HST image of that site a lot like the camera MFD

Last edited:

#### Urwumpe

##### Not funny anymore
Donator
Yes - and the motor to drive the deployment sits on top of the mirror, acting as a crank.

#### gattispilot

Ok. I using the 2 animations. I think the timing/speed of animation might be the key.

I am going to try it with 2 animations and adjust accordingly

#### GLS

##### Well-known member
Orbiter Contributor
Look at math here https://www.softintegration.com/chhtml/toolkit/mechanism/fourbar/fourbarpos.html that's where I learned to do it for SSU. The CISS and PLBD animations are not good examples (too specific), but the ET umbilical door is something you can look at to see how I did it.

the "driver angle" should be the angle that the arm3 has with the horizontal, you use it for the arm3 animation and that's the only animation state you save. arm1 is another animation, not connected to the arm3 animation, and the arm2 animation you make a child animation of arm1 or arm3, which one happens to be easier. You use the math to calculate angles of arm1 and arm2, and with the angles you can calculate the point where in their animation they are.
BTW: the distances in the math above are between the rotation axis, so on arm1 the distance is not the length of the structure but the (linear) distance between the hinge at the base and the top of the secondary mirror.

A word of advice: it probably won't be easy nor will it be the work of an afternoon, but (for me at least) it paid off to see the animations work perfectly as if the whole thing was mechanically connected.
I sorry I can't be of more help.

#### gattispilot

Ok the "driver Angle " is 26 degrees.

Ok this is what I have for measurements. I have it now in 3 animation. Mainly change the speed.
But I have anim 1 is arm 1 and mirror, anim 2 arm2 and anim 3 arm3.

On on that web site Theta 1 is 26 is Theta2 241 (26+180+35)?

Fortunately this is the only complex animation.

#### Urwumpe

##### Not funny anymore
Donator
Remember that the rotation axis between arm2 and arm3 is somewhere else...

#### gattispilot

Remember that the rotation axis between arm2 and arm3 is somewhere else...

No sure what you mean?

I may need to adjust the arms lengths.

Last edited:

#### GLS

##### Well-known member
Orbiter Contributor

SDK Question robotic arm tip issue
Replies
0
Views
501
General Question mesh handles/UNIT
Replies
6
Views
2K
Replies
2
Views
1K
Replies
5
Views
3K
Replies
5
Views
2K