Jump to content

[PART, 1.0.2] Anatid Robotics / MuMech - MechJeb - Autopilot - Historical thread


r4m0n

Recommended Posts

hum, the test in "set" of attitudeTarget could relate to that. But if I don't have a repeatable case I won't be able to fix it ...

Try doing a reentry from a Mun return.

I don't know if that's a 100% repro or not though. I'm going to try one now. That's when it was most obvious to me. My Mk1 pod would not maintain orientation and I didn't see the control indicators moving at all. However I don't know if that necessarily translates to 'MJ didn't try at all' because I've seen it perform an orientation and the markers don't move at all. No repro on that either; I saw it a few times.

Both might be intermittent

Link to comment
Share on other sites

Try doing a reentry from a Mun return.

I don't know if that's a 100% repro or not though. I'm going to try one now. That's when it was most obvious to me. My Mk1 pod would not maintain orientation and I didn't see the control indicators moving at all. However I don't know if that necessarily translates to 'MJ didn't try at all' because I've seen it perform an orientation and the markers don't move at all. No repro on that either; I saw it a few times.

Both might be intermittent

I've seen it try to change orientation during reentry, but it's unable to overcome the aerodynamic drag forces that are forcing the craft to point in one specific direction. Using more powerful RCS thrusters or vernier jets might work, but MJ doesn't seem to know how to use them or keeps over correcting when those are being used.

Link to comment
Share on other sites

Lift is not thrust, and shouldn't be included in TWR calculations. Most real life aircraft have TWR<1, often quite significantly so.

I realize that Lift isn't thrust, but as this is the first time I've ever made something that flew on Kerbin with a TWR<1, I wanted to make sure. Is there a way to find a lift-weight-thrust ratio to be able to determine if something can actually fly? Like for say a 10 ton spaceplane, with a TWR of .75, how much lift would you need to get off the ground? And would it be possible to implement this into MechJeb?

Link to comment
Share on other sites

I realize that Lift isn't thrust, but as this is the first time I've ever made something that flew on Kerbin with a TWR<1, I wanted to make sure. Is there a way to find a lift-weight-thrust ratio to be able to determine if something can actually fly? Like for say a 10 ton spaceplane, with a TWR of .75, how much lift would you need to get off the ground? And would it be possible to implement this into MechJeb?

That's actually a bit of a complex calculation, because lift is dependent on speed, air density, and angle of attack. With the aero model changing in the next version, I wouldn't expect any mod developers to be putting their time into analyzing the current one.

Link to comment
Share on other sites

I've seen it try to change orientation during reentry, but it's unable to overcome the aerodynamic drag forces that are forcing the craft to point in one specific direction. Using more powerful RCS thrusters or vernier jets might work, but MJ doesn't seem to know how to use them or keeps over correcting when those are being used.

I don't know PID well enough to say but I think it's not seeing that there's errors on one of the 3 controllers. I.e. it doesn't realize the degree to which it's off course.

@Sarbian: This part right here:


[COLOR=#333333][FONT=Consolas]pidAction = pid.Compute(err, omega)[/FONT][/COLOR][COLOR=#333333][FONT=Consolas] + attitudeTargetAcc[/FONT][/COLOR][COLOR=#333333][FONT=Consolas];
[/FONT][/COLOR]

Shouldn't attitudeTargetAcc be added to err instead of being added to the output of pid.Compute? Or if not then what is that actually supposed to be doing?

Id like to disable some features (e.g Landing Guidance) to make the mod less cheaty for myself (Its just too tempting :blush: ). Can anyone tell me how to do that?

Right, right. Because, of course REAL space ships don't have computerized landing computers... ;)

Link to comment
Share on other sites

What's PID though? I thought it might be 'pilot induced something', but not sure on that.

Proportional Integral Derivative controller

In a nutshell, the difference between where you want something to be and where it is, is treated as an error.

Proportional is the current set of errors, integral is the accumulated errors? Or past errors? And Derivative is predicted errors.

As I understand it, they actually date all the way back to the 1700s (obviously not in digital) and were used in (among other things) steam engines on steam ships and even for rudder control of the same.

Link to comment
Share on other sites

I believe that I have seen the issue with failure to control the attitude of the spacecraft on re-entry. In my case, it was from a vertical launch, which is normally very consistent. This time the predicted landing miss distance was 3 m and unchanging, and the time to landing was negative with the ship at approximately 40 km altitude. It looked like one of the pointers to the control or state array got badly scrambled. I have tried to reproduce the issue a half a dozen times without any success, which suggests that it is either a race or thread synchronization condition.

skips

Link to comment
Share on other sites

I don't know PID well enough to say but I think it's not seeing that there's errors on one of the 3 controllers. I.e. it doesn't realize the degree to which it's off course.

@Sarbian: This part right here:


[COLOR=#333333][FONT=Consolas]pidAction = pid.Compute(err, omega)[/FONT][/COLOR][COLOR=#333333][FONT=Consolas] + attitudeTargetAcc[/FONT][/COLOR][COLOR=#333333][FONT=Consolas];
[/FONT][/COLOR]

Shouldn't attitudeTargetAcc be added to err instead of being added to the output of pid.Compute? Or if not then what is that actually supposed to be doing?

attitudeTargetAcc is the acceleration of the target (ie when the target changes) and is added directly to the command on purpose. The technique is called feed-forward and makes the controller faster.

@Sarbian: my nickname is spelled Xytovl

Link to comment
Share on other sites

hum, the test in "set" of attitudeTarget could relate to that. But if I don't have a repeatable case I won't be able to fix it ...

If you're talking about this test:


+ if (Quaternion.Dot(value, _lastAttitudeTarget) < 0)
+ _attitudeTarget = value.Mult(-1);
+ else
+ _attitudeTarget = value;

It's to make sure the quaternion is continuous before differentiating it for the feedforward.

Link to comment
Share on other sites

Meumeu. No, I was talking about the next one.


if (Math.Abs(Vector3d.Angle(_attitudeTarget * Vector3d.forward, _lastAttitudeTarget * Vector3d.forward)) > 10)
{
attitudeChanged = true;
_lastAttitudeTarget = value;
}

Sorry Xytovl :)

Link to comment
Share on other sites

Hi all,

New guy here.

I have just purchased the game and followed the online installation instructions.

I'm playing in the sandbox.

Have problem - I see others have had it but not sure how to correct it -

I get the MecJeb2 parts, have place one a spacecraft but not getting the MechJeb windows.

Any suggestions?!

Thanks!

Red5

Link to comment
Share on other sites

Hi all,

New guy here.

I have just purchased the game and followed the online installation instructions.

I'm playing in the sandbox.

Have problem - I see others have had it but not sure how to correct it -

I get the MecJeb2 parts, have place one a spacecraft but not getting the MechJeb windows.

Any suggestions?!

Thanks!

Red5

That is for sure an instalation issue. Show us a screenshot of the gamedata/mechjeb2/plugins folder open.

Link to comment
Share on other sites

Theres a small problem with the 'land somewhere function', when it gets to the last 500 meters, it does, well, something, that causes the chutes to auto-cut. While it does land normally, it's rather annoying that it does something (not sure what exactly) that causes the chutes to cut themselves when at the last 500 meters sometimes or at the final burn.

As for the something, I'm really not sure what it is, maybe a movement it does or maybe it hits the speed cutoff point or something.

Edit: It kind of seems like the 'land somewhere' doesn't realize that it's in atmosphere or that kerbin HAS an atmosphere.

Edit2: I am very sure it's acting like theres no atmosphere. and yes I have the FAR extension dll.

Edited by smjjames
Link to comment
Share on other sites

Theres a small problem with the 'land somewhere function', when it gets to the last 500 meters, it does, well, something, that causes the chutes to auto-cut. While it does land normally, it's rather annoying that it does something (not sure what exactly) that causes the chutes to cut themselves when at the last 500 meters sometimes or at the final burn.

As for the something, I'm really not sure what it is, maybe a movement it does or maybe it hits the speed cutoff point or something.

Edit: It kind of seems like the 'land somewhere' doesn't realize that it's in atmosphere or that kerbin HAS an atmosphere.

Edit2: I am very sure it's acting like theres no atmosphere. and yes I have the FAR extension dll.

FAR sets the drag of all parts to 0 so stock drag doesn't interfere with it's drag. This means that while mechjeb knows about the atmosphere it doesn't think it will slow you down at all. This means you can not use land at x location at all for bodies with atmosphere. Also if you are using parachutes you must use land anywhere only after the parachutes have opened fully or mechjeb will over thrust, this will lead to velocity going to 0 before you land which will cut stock parachutes. Land anywhere without parachutes is fine. Mechjeb will use more fuel than is strictly necessary but you will have a safe landing.

Airless bodies are unaffected by FAR of course.

Edited by futrtrubl
Link to comment
Share on other sites

FAR sets the drag of all parts to 0 so stock drag doesn't interfere with it's drag. This means that while mechjeb knows about the atmosphere it doesn't think it will slow you down at all. This means you can not use land at x location at all for bodies with atmosphere. Also if you are using parachutes you must use land anywhere only after the parachutes have opened fully or mechjeb will over thrust, this will lead to velocity going to 0 before you land which will cut stock parachutes. Land anywhere without parachutes is fine. Mechjeb will use more fuel than is strictly necessary but you will have a safe landing.

Airless bodies are unaffected by FAR of course.

Okay, thanks for the tips. It's just a conflict with FAR then.

Also, it will at least try to correct the landing when 'land at x' in atmosphere. Once it's able to overcome the reentry drag.

Link to comment
Share on other sites

Hi all,

New guy here.

I have just purchased the game and followed the online installation instructions.

I'm playing in the sandbox.

Have problem - I see others have had it but not sure how to correct it -

I get the MecJeb2 parts, have place one a spacecraft but not getting the MechJeb windows.

Any suggestions?!

Thanks!

Red5

Do you have the game (or steam) install in C:\Program Files ? Windows protection may stop the game from loading the mod. You need to move the game elsewhere if this is the case.

Link to comment
Share on other sites

FAR sets the drag of all parts to 0 so stock drag doesn't interfere with it's drag. This means that while mechjeb knows about the atmosphere it doesn't think it will slow you down at all. This means you can not use land at x location at all for bodies with atmosphere. Also if you are using parachutes you must use land anywhere only after the parachutes have opened fully or mechjeb will over thrust, this will lead to velocity going to 0 before you land which will cut stock parachutes. Land anywhere without parachutes is fine. Mechjeb will use more fuel than is strictly necessary but you will have a safe landing.

Airless bodies are unaffected by FAR of course.

This problem of MechJeb aggressively attempting to reduce the shock of the parachute opening and reducing the velocity below 0.5 meters per second, which cuts the parachutes, occurs with the stock aerodynamics on occasion.

skips

Link to comment
Share on other sites

to any and all who actualy do the coding on mechjeb:

small suggestion, can mechjeb be set up to detect this mod

http://forum.kerbalspaceprogram.com/threads/113507-0-90-Timewarp-Rotate-0-1-3

and, when in space and about to auto-timeskip make sure the ship is not moving //up and down on the nav ball relative to the target vector// and then give the ship a tiny bit of rotational spin along its axis? i have found that when i manually do this the ship stays pointed at the target, but without it mechjeb keeps drift off target, dropping the timeskip, re aiming itsself at the target, timeskipping, failing again.. the stop and spin technique would make mechjeb even more awsome in combination with this mod :D

hope anyone know how to implement this and that its easy enough that someone will XD

Link to comment
Share on other sites

Hi Guys,

I installed machjeb a while ago and used it to learn how to do the stuff in real.

So now im getting into rovers and i got the rover autopilot working (speed and direction) but when i exit the scene, to the space center or to another ship, the rover stops and does not follow its route like it should. Also time warp is not posibble while moving so essentially i neet to watch the autopilot so it works....

How can i time warp with the rover autopilot active so things progress ?

Thanks

Edited by ManuxKerb
Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...