Jump to content

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


r4m0n

Recommended Posts

There's something wrong with this image.

In the middle are two docking ports together. Around the big tank were six asparagus staged boosters. Right after the last pair drop, MechJeb lights the lander engines in the higher stage. Yes, all but the lowest engine in the list ARE in a higher stage.

You worked out what's going on, because they are not separated by a decoupler the upper engines fire off and it will also drain any upper tanks. Whether this behaviour is correct or not, there are a couple of solutions. Disable crossfeed on the ports or to be sure put a decoupler between them. You can get that to come off both sides later and still be able to dock or use a separator instead.

Link to comment
Share on other sites

Is 2.1.1 supposed to be built into each probe / command pod or do we still need to stick the little box on the side of the craft? If so, I can't seem to get mechjeb to work without attaching the little box on the side.

Link to comment
Share on other sites

Download Module Manager 1.5.6, save this as a .cfg and put it in your GameData Folder:


@PART[*]:HAS[@MODULE[ModuleCommand],!MODULE[MechJebCore]]
{
MODULE
{
name = MechJebCore
}
}

Link to comment
Share on other sites

There's something wrong with this image...

As well as the other fixes, you can also use "Stop at stage" in the Ascent Guidance panel. Enter into it the number of the last stage before that of the lander and MechJeb will ignore the lander's engines. So if the lander is stage 0, enter 1 into Stop at stage. I use this all the time - damn handy!

Link to comment
Share on other sites

The advanced tab offers you various vectors to align to, and the six cardinal orientations. So Surface_Forward is your surface velocity vector (and choosing Surface_Forward and forward will align you with surface prograde); Surface_North is towards the north pole, etc.

Thanks! that is very useful.

Link to comment
Share on other sites

Most recent dev build shows crazy delta-v stats in VAB/SPH for jet engines. Like about 80000 while engineer redux shows ~5000. Any ideas?

Well jet engines do have a lot of delta v. Think about it, you get 5k with a nuke lets say which burns for 10-15 minutes. It has at least 5 times less ISP than the jet. The jet burns for a long time with very little fuel. Better said, you use 4500 to get to orbit in 2-3 minutes, imagine how much your plane will use by flying in the atmosphere for 10 times longer.

Link to comment
Share on other sites

I've been playing around with techniques for positioning satellites in constellations, such as putting a satellite in Kerbin-synchronous orbit directly above KSC. Most of this is aimed at RemoteTech-type systems, but might be useful to others.

What I'm wondering is whether anyone else would find these useful enough to integrate into MechJeb, or if they'd just confuse with options:

- Change orbit to a specific semi-major axis and therefore orbital period (to make synchronous or semi-synchronous orbits easier to achieve);

- Change orbit so that the next periapsis/apoapsis occurs with the spacecraft over a specific longitude (to get the spacecraft to be over a particular spot on the planet before enter synchronous or semi-synchronous orbits);

- Change orbit to adjust the Longitude of the Ascending Node (useful for offsetting the orbital planes of multi-satelitte constellations like GPS or Iridium).

Thoughts? Additional maneuver mode ideas?

Link to comment
Share on other sites

You worked out what's going on, because they are not separated by a decoupler the upper engines fire off and it will also drain any upper tanks. Whether this behaviour is correct or not, there are a couple of solutions. Disable crossfeed on the ports or to be sure put a decoupler between them. You can get that to come off both sides later and still be able to dock or use a separator instead.

Would be nice if it could automate it the same way as staging works manually with the spacebar.

Link to comment
Share on other sites

I've been playing around with techniques for positioning satellites in constellations, such as putting a satellite in Kerbin-synchronous orbit directly above KSC. Most of this is aimed at RemoteTech-type systems, but might be useful to others.

What I'm wondering is whether anyone else would find these useful enough to integrate into MechJeb, or if they'd just confuse with options:

- Change orbit to a specific semi-major axis and therefore orbital period (to make synchronous or semi-synchronous orbits easier to achieve);

- Change orbit so that the next periapsis/apoapsis occurs with the spacecraft over a specific longitude (to get the spacecraft to be over a particular spot on the planet before enter synchronous or semi-synchronous orbits);

- Change orbit to adjust the Longitude of the Ascending Node (useful for offsetting the orbital planes of multi-satelitte constellations like GPS or Iridium).

Thoughts? Additional maneuver mode ideas?

MechJeb has 'resonant orbit' under maneuver planner, that's pretty much all you need. Ascent to the correct orbit, resonant orbit then warp till it's in position and circularize.

Link to comment
Share on other sites

MechJeb has 'resonant orbit' under maneuver planner, that's pretty much all you need. Ascent to the correct orbit, resonant orbit then warp till it's in position and circularize.

Certainly you can use 'resonant orbit' to do the job, if you're willing to wait. For that matter, you can skip MechJeb altogether and still do this. But figuring out what that intermediate orbit should be so that you end up in the right place in a short amount of time requires a non-trivial amount of calculation.

Edited by bk2w
Link to comment
Share on other sites

As with most new feature it needs either some free time from me or someone else to write it.

Also : If someone give me the math its easier/faster

If you're interested, I will show you the math I use to compute the longitude where to burn while in LKO to put a craft in KSO at a desired longitude; that was one improvement I already asked to see with MJ, and answers the second one of bk2w requests. PM me in case.

Link to comment
Share on other sites

Yes, I am interested. I'll just need to remember to use it, since I seems to forget/miss half the requested feature :)

Not sure I'll have time to code much for MJ until mid next week.

Link to comment
Share on other sites

Hmm, latest build is from the 17:th? That's a long time ago.

Is there some way to tweak how aggressive the PID is? I find it way too aggressive in atmosphere (specially with FAR) and way too meek in space, has a tendency to almost stop very close to the angle you want, but not quite there, slowly slowly correcting the last bit.

Link to comment
Share on other sites

Yes, I worked on the Docking AP for a long time and won't do a new release until it's working properly. And I'm busy with an other project.

Open the attitude adjustment window, uncheck the auto tune and set Tf to 0.3. The autotune is too aggressive in atmo, even more when you have control surface.

Link to comment
Share on other sites

Thanks, that helps, I guess the primary issue with the PID is that it doesn't really do the over time averaging, it's very important in PID to eliminate resonance or standing waves, feels like MJ is really profficient atm in making you fly in a sine wave.

Link to comment
Share on other sites

The math is simple, you just need to know the planet/moon rotational speed and how long does it take from your current orbit to the Apoapsis of your desired orbit.

Example: You are orbiting Kerbin. You want to go from a 100 Km orbit to a KEO of 2,868.75 Km. You want to end up above KSC (around 74 deg W)

The time it takes to get from your initial orbit to the Ap of your desired one is:

t = pi*sqrt(a^3/u);

a (sma) = (100,000+2,868,750)/2 + 600,000;

u (Grav Param) = 3.5316E12;

We get t = 5030.694 s (1h 23m 50.694s).

In that time Kerbin, which rotates 360 deg every 21600s (6h), has rotated 5030.694*360/21600 = 83.845 deg.

That means that if we want to end up just above KSC we need to do our transfer burn 83.845 deg before 74 deg W. That is when we are at 157.845 deg W

Link to comment
Share on other sites

My approach is similar to resonance. I've got some MechJeb code that does pretty much all of this that I'm cleaning up right now. Hopefully I'll have a pull-request later today for you to take a look at.

I'll setup an initial orbit with an apside at my desired final altitude. The code determines the longitude of the apside ground track at the time the vessel arrives at the apside. The difference between that and target a longitude is used to calculate how long it will take the body to rotate the correct longitude underneath the apside. I'll then adjust the SMA so that the orbital period is the rotation time plus some integer number of "days", choosing the integer number to ensure that the orbit doesn't dip below the 5x time warp limit. The code I've got calculates the adjusted SMA and drops a maneuver node on the apside.

For Kerbin-synchronous, I skip the 100km orbit, and simply launch directly to an apoapsis of 2868.75km. Burn at the apoapsis to insert into the transfer orbit calculated above, wait a full orbit, then burn again to circularize. This reliably puts my spacecraft in a synchronous orbit within an arc-minute of my goal longitude. And has the bonus of keeping the spacecraft above KSC's horizon almost the entire trip.

Link to comment
Share on other sites

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