Vessel Chang'e 4 Lander, Rover, Queqiao and Longjiang 1 and 2 Lunar probes

gattispilot

Addon Developer
Addon Developer
Joined
Oct 17, 2007
Messages
8,707
Reaction score
2,683
Points
203
Location
Dallas, TX
Working on that. It is a matter of adjusting the attachment point to match the animation. I have gotten the rover to move out but not angled and follow it as it lowers
 
Last edited:

gattispilot

Addon Developer
Addon Developer
Joined
Oct 17, 2007
Messages
8,707
Reaction score
2,683
Points
203
Location
Dallas, TX
Thanks. I think I may have to do that. Have mesh groups of the rover. Then move those groups along the ramp. and to the ground. Then create a rover vessel there? And make the rover mesh groups disappear. But the draw back is you don't get the rover animations so the rover would remained stowed until it was on ground. But I guess I could animate the rover mesh on lander.
 
Last edited:

fred18

Addon Developer
Addon Developer
Donator
Joined
Feb 2, 2012
Messages
1,667
Reaction score
104
Points
78
Thanks. I think I may have to do that. Have mesh groups of the rover. Then move those groups along the ramp. and to the ground. Then create a rover vessel there? And make the rover mesh groups disappear. But the draw back is you don't get the rover animations so the rover would remained stowed until it was on ground. But I guess I could animate the rover mesh on lander.

why don't you just move the attachment point? it should work very well if you put down the right movements
 

gattispilot

Addon Developer
Addon Developer
Joined
Oct 17, 2007
Messages
8,707
Reaction score
2,683
Points
203
Location
Dallas, TX
Thats what i am doing. But not being able to match animation. Any clue why rover is not going straight.
 

fred18

Addon Developer
Addon Developer
Donator
Joined
Feb 2, 2012
Messages
1,667
Reaction score
104
Points
78
Any clue why rover is not going straight.

yes, in the scenario you provided:

Code:
CHANGE4WHEELS:GV_CHANGE4WHEELSnew
  STATUS Landed Moon
  POS -33.4375000 41.1184070
[B][COLOR="Red"]  HEADING -917798380887773310.00[/COLOR][/B]
  ALT 0.987
  AROT -131.248 -19.348 138.219
  AFCMODE 7
  NAVFREQ 0 0
END

of course it's wrong and messes up all the internal calculation of GV. I put 0 for test and it worked perfectly
 

gattispilot

Addon Developer
Addon Developer
Joined
Oct 17, 2007
Messages
8,707
Reaction score
2,683
Points
203
Location
Dallas, TX
Thanks. I will update the scenario.

Not sure about moving the point. Basically I have it translate out and then translate down and out. But it needs to rotate also and then translate down and away.
 

Donamy

Addon Developer
Addon Developer
Donator
Beta Tester
Joined
Oct 16, 2007
Messages
6,907
Reaction score
205
Points
138
Location
Cape
You might need time steps to get it right.
 

gattispilot

Addon Developer
Addon Developer
Joined
Oct 17, 2007
Messages
8,707
Reaction score
2,683
Points
203
Location
Dallas, TX
FU84WLR.jpg
rover translates out
EM9fbfT.jpg
ramp moves but rover is not in synch
qhvtlrA.jpg
rover need to rotate 30 degrees? But not going down in synch.
Code:
if (rampstart == 1){   //ramp sequence
			//double dc = simdt * LIFT_SPEED;
			double dc = simdt * .1;
			double dd = simdt * .06;
			double de = simdt * .2;
			double dh = simdt * .3;
			SetAttachmentParams(LR2, ROVER[POS], ROVER[DIR], ROVER[ROT]);


			{
				if (step == 1)
				{
					sprintf(oapiDebugString(), "anim %2.2f anim %3.4f ", R3, R2);

					R3 = (R3 - dc);
					if (R3 < -2.3){
						R3 = -2.3;
						step = 0;
					}
				}
				
				if (step == 2)
				{
					sprintf(oapiDebugString(), "anim %2.2f anim %3.4f ", R3, R2);

					R3 = (R3 - de);//x

					R2 = (R2 - dh);//y
					if (R3 < -3.4){
						R3 = -3.4;
						step = 0;
					}
				}


			}
		}

ramp animation:
Code:
//RAMP
	anim_RAMP1 = CreateAnimation(0);
	anim_RAMP2 = CreateAnimation(0);
	anim_RAMP3 = CreateAnimation(0);
	static UINT RAMPGrp0[1] = { 43 };//PANEL1
	static MGROUP_ROTATE RAMP1(0, RAMPGrp0, 1, _V(0, - 2.130815, - 1.388644), _V(1, 0, 0), (float)(-120 * RAD));
	parent = AddAnimationComponent(anim_RAMP1, 0, 1, &RAMP1);

	static UINT RAMPGrp1[1] = { 41 };//PANEL1
	static MGROUP_ROTATE RAMP2(0, RAMPGrp1, 1, _V(0, -1.083262, - 1.377369), _V(1, 0, 0), (float)(210 * RAD));
	parent1 = AddAnimationComponent(anim_RAMP2, 0, 1, &RAMP2,parent);

	//static MGROUP_ROTATE RAMP2a(0, RAMPGrp1, 2, _V(0, -1.083262, -1.377369), _V(1, 0, 0), (float)(90 * RAD));
	//parent2 = AddAnimationComponent(anim_RAMP2, 0, 1, &RAMP2a, parent1);



	static UINT RAMPGrp2[1] = { 42 };//PANEL1
	static MGROUP_ROTATE RAMP3(0, RAMPGrp2, 1, _V(0, - 2.542481, - 1.386626), _V(1, 0, 0), (float)(160 * RAD));
    AddAnimationComponent(anim_RAMP3, 0, 1, &RAMP3, parent1);

Code:
//RAMP1
	if (RAMP1_status >= DOOR_RAISING) {
		//sprintf(oapiDebugString(), "anim %2.2f ramp2 %2.2f ", RAMP1_proc, RAMP2_proc);
		double da = simdt * .19;
		if (RAMP1_status == DOOR_RAISING) {
			if (RAMP1_proc > 0.0){
				RAMP1_proc = max(0.0, RAMP1_proc - da);
				RAMP2_proc = (RAMP2_proc + da/2);
			}




			else RAMP1_status = DOOR_UP;
		}
		else {
			if (RAMP1_proc < 1.0) {
				RAMP1_proc = min(1.0, RAMP1_proc + da);
				RAMP2_proc = (RAMP2_proc + da/2);
			}
			//if (RAMP2_proc < 1.0) RAMP1_proc = min(1.0, RAMP2_proc + da);
			else RAMP1_status = DOOR_DOWN;
		}
		SetAnimation(anim_RAMP1, RAMP1_proc);
		SetAnimation(anim_RAMP2, RAMP2_proc);
	}
	if (RAMP2_status >= DOOR_RAISING) {
		double da = simdt * LIFT_SPEED;
		if (RAMP2_status == DOOR_RAISING) {
			if (RAMP2_proc > 0.0) RAMP2_proc = max(0.0, RAMP2_proc - da);
			else RAMP2_status = DOOR_UP;
		}
		else {
			if (RAMP2_proc < .43) RAMP2_proc = min(.43, RAMP2_proc + da);
			else RAMP2_status = DOOR_DOWN;
		}
		SetAnimation(anim_RAMP2, RAMP2_proc);

	}
	if (RAMP3_status >= DOOR_RAISING) {
		double da = simdt * LIFT_SPEED;
		if (RAMP3_status == DOOR_RAISING) {
			if (RAMP3_proc > 0.45) RAMP3_proc = max(0.0, RAMP3_proc - da);
			else RAMP3_status = DOOR_UP;
		}
		else {
			if (RAMP3_proc < 1.0) RAMP3_proc = min(1.0, RAMP3_proc + da);
			else RAMP3_status = DOOR_DOWN;
		}
		SetAnimation(anim_RAMP3, RAMP3_proc);

	}
}
 

Donamy

Addon Developer
Addon Developer
Donator
Beta Tester
Joined
Oct 16, 2007
Messages
6,907
Reaction score
205
Points
138
Location
Cape
You have to animate the wheels separately also
 

gattispilot

Addon Developer
Addon Developer
Joined
Oct 17, 2007
Messages
8,707
Reaction score
2,683
Points
203
Location
Dallas, TX
The wheels are ground vehicle. So they like the rover are separate vessels. If i make the rover as part of the lander mesh then i maay rotate wheels
 

4throck

Enthusiast !
Joined
Jun 19, 2008
Messages
3,502
Reaction score
1,008
Points
153
Location
Lisbon
Website
orbiterspaceport.blogspot.com
I suggest focusing on most crucial feature.
For deployment, that means instant spawning of the rover on the ground as a new vessel (and making it disappear from the lander ;) ).
No animation, just make it happen on key press.

Worry about this first, and how to handle it in scenarios and saves.
Then animations will be simpler, because you already have code to work with. :thumbup:

Otherwise you will keep going in circles and never have it working.
 
Last edited:

gattispilot

Addon Developer
Addon Developer
Joined
Oct 17, 2007
Messages
8,707
Reaction score
2,683
Points
203
Location
Dallas, TX
Well So I tried to do a robotic arm that way I can more easily change the attachment. But all I have is translate and the attachment rotation changes.
O6A72uu.jpg

Code:
//new
	static UINT ROVERRAMPGrp[1] = { 15 };//LEFTARM0
	rms_anim[0] = new MGROUP_TRANSLATE(0, ROVERRAMPGrp	, 1,_V(0, 0, -1.6) ); // TRANSLATE
	anim_ROVERRAMP = CreateAnimation(0.0);
	ROVERparent = AddAnimationComponent(anim_ROVERRAMP, 0, 1, rms_anim[0]);

	rms_anim[1] = new MGROUP_ROTATE(LOCALVERTEXLIST, MAKEGROUPARRAY(arm1_tip), 3,_V(0, -2.130815, -.671), _V(0, 0, 1), (float)(0 * RAD)); // -447 .. +447
	anim_ROVERRAMP1 = CreateAnimation(0.0);
	hAC_arm = AddAnimationComponent(anim_ROVERRAMP1, 0, 1, rms_anim[1], ROVERparent);
Code:
	//new ramp
	xp1 = arm1_tip[1] - arm1_tip[0]; normalise(xp1);
	xr1 = arm1_tip[2] - arm1_tip[0]; normalise(xr1);
	//SetAttachmentParams(LR2, arm1_tip[0], xp1, xr1);
	if (rampstart == 1){
		double dc = simdt * LIFT_SPEED;
		ROVERRAMP_proc = (ROVERRAMP_proc + dc);
		SetAnimation(anim_ROVERRAMP, ROVERRAMP_proc);
		sprintf(oapiDebugString(), "anim %2.2f ", ROVERRAMP_proc);
		SetAttachmentParams(LR2, arm1_tip[0], xp1, xr1);
	}

Well what I can do just to get on. Is deploy the ramp. press another key and the now the rover is at the end.


Any info on thrust amount?
 

fwd0502

chinese boy,the heir of dragon
Joined
Aug 28, 2018
Messages
56
Reaction score
0
Points
6
Location
SHANGHAI
as a chinese,im really proud of our achievements in space flights:cheers:
 

4throck

Enthusiast !
Joined
Jun 19, 2008
Messages
3,502
Reaction score
1,008
Points
153
Location
Lisbon
Website
orbiterspaceport.blogspot.com
There are 3 thruster systems it seems:


The engine was baselined to provide 1,500 - 7,500 N of thrust , which is sufficient to lift/land the vehicle in the 1/6 G environment of the moon. The engine can be throttled with a very high accuracy of 7.5 N and features and active cooling system.

The lander features eight thruster modules – each consisting of two 150 N and one 10 N thrusters. The remaining four 10 N thrusters are installed separately, one on each of the smaller side panels.
 

gattispilot

Addon Developer
Addon Developer
Joined
Oct 17, 2007
Messages
8,707
Reaction score
2,683
Points
203
Location
Dallas, TX
so the main thrust should be
Code:
th_main[0] = CreateThruster(_V(0, 0, 0), _V(0, 1, 0), 7500, ph_main, RCS_ISP);

maybe add if thrustlevel =0 set thrust level to 1500

Eight of the 150 N thrusters are oriented in an identical orientation for ΔV burns, using all or a a number of those engines. These eight 150 N thrusters are likely used for smaller trajectory correction maneuvers during the Earth-Moon transfer and small orbital adjustments, and possibly during LOI (Lunar Orbit Insertion) and landing.

The 10 N thrusters are used for attitude control and reorientation maneuvers. A combination of all ADCS (Attitude Determination and Control Subsystem) thrusters is used for attitude control during main engine burns. Using the relatively high-thrust 150 N engines for attitude control provides quick response capability which is required for fast attitude adjustments during the landing phase (Ref. 2).

but what ISP?

---------- Post added at 10:18 AM ---------- Previous post was at 08:14 AM ----------

So I added this:
Code:
if (rampstart == 1){
		//double dc = simdt * LIFT_SPEED;
		//ROVERRAMP_proc = (ROVERRAMP_proc + dc);
		//SetAnimation(anim_ROVERRAMP, ROVERRAMP_proc);
		//sprintf(oapiDebugString(), "anim %2.2f ", ROVERRAMP_proc);
		SetAttachmentParams(LR2, _V(0, -4.5, -5.3), _V(0, 1, 0), _V(0, 0, 1));
		DetachChild(LR2, 0);
	}

So it moves the attachment point to the end of the ramp. but when I detach the rover and wheels are now orbiting the moon?
 

gattispilot

Addon Developer
Addon Developer
Joined
Oct 17, 2007
Messages
8,707
Reaction score
2,683
Points
203
Location
Dallas, TX
So this is what I so far.
https://drive.google.com/open?id=1wqSUTTl7eR2omkaGwNxHVkazBXTy4zWt
On the lander keys 1 extend antenna, 2 shields, 3,4,5 extend/rotate ramp. G- gear, J moves rover to ramp, k releases rover.

Really what we need is rcs and main thrust.
And it could be added into the launch scn also.

So it looked like it landed here:
45.47084 South, 177.60563 East

---------- Post added 01-04-19 at 07:06 AM ---------- Previous post was 01-03-19 at 11:33 AM ----------

So adding rcs.
but something seems wrong:
Code:
th_main[0] = CreateThruster(_V(0, 0, 0), _V(0, 1, 0), 10000, ph_main, RCS_ISP);
AddExhaust(th_main[0], 1, 0.3, _V(0, -2.8, 0), _V(0, -1, 0));
thg_main = CreateThrusterGroup(th_main, 1, THGROUP_MAIN);







th_rcs[0] = CreateThruster(_V(6, 0, 10), _V(0, -1, 0), RCS_THRUST, ph_main, RCS_ISP);

Code:
static const int ntdvtx = 3;
static TOUCHDOWNVTX tdvtx[ntdvtx] = {
	{ _V(0, -3.28, 1.5), 26150.8, 18409.6, 3.2, 0.8 },
	{ _V(-2, -3.28, -2.6), 26150.8, 18409.6, 3.2, 0.4 },
	{ _V(2, -3.28, -2.6), 26150.8, 18409.6, 3.2, 0.4 }//,

	SetTouchdownPoints(tdvtx, ntdvtx);
Testing for a landing and I end up under the surface!

She is ready for launch if someone wants to try for launch

Can someone make a scn of where and when it landed.
 
Last edited:

Jeremyxxx

Active member
Joined
Jan 25, 2013
Messages
296
Reaction score
88
Points
43
Location
Dawson Springs
I had to be creative with the steering speed of the Yutu 2 rover by changing its steering speed on the wheels to .1

I'd love to see the Longjiang probes next.
 
Top