Jump to content

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


r4m0n

Recommended Posts

Torque is mostly right. The part I am not sure about is the torque from a reaction wheel far from the CoM.

If MechJeb is having problems turning a rocket during launch or if it's sluggish or constantly over-correcting in orbit and adding moar RCS just burns mono faster, I add more reaction wheels. I try to have as large/strong of one as possible near the COM and others out near the ends.

I rebuilt my Eve mission assembly and have the parts count down a lot, while increasing the fuel it will leave with. My computer can now (just) handle the load. Hopefully unlike the Duna return I won't manage to nearly hit two moons on the way back.

(What I really need is a quad core AM3 Phenom II 2.5Ghz or faster CPU at a decent price.)

Edited by Galane
Link to comment
Share on other sites

Might I suggest adding the 'Force Roll' option selector to the ascent and landing autopilots, as well as any other window where I might wish to have control over that parameter? Or at least give us the option to add or remove it to any or all windows we choose via the custom window editor? Or do we already have that option? I haven't been able to actually PLAY the game very much in the last few weeks, most of my free time has been taken up by installing and/or tweaking mods and mod updates, so I haven't yet been able to explore recent updates to MJ. :)

Link to comment
Share on other sites

"Force Roll" means different thing in the various module. For the ascent AP the 0° roll is related to the surface vel at low alt and then to the orbital vel higher up. For the Docking AP it's related to the orientation of the source and target docking ports. It means each module compute roll in its own way, and you can't have a common check box for it now.

But I plan to change that since I don't like code duplication spawning all around the modules. I already have some code on my PC to change that, but as always I need time :)

Link to comment
Share on other sites

"Force Roll" means different thing in the various module. For the ascent AP the 0° roll is related to the surface vel at low alt and then to the orbital vel higher up. For the Docking AP it's related to the orientation of the source and target docking ports. It means each module compute roll in its own way, and you can't have a common check box for it now.

But I plan to change that since I don't like code duplication spawning all around the modules. I already have some code on my PC to change that, but as always I need time :)

I see. I hadn't realized it was quite that complicated. :) But if you say you're working on implementing a similar feature into all, or at least most, modules, then that's good enough for me. :)

Good luck, and thanks again for what you do, Sarbian. You enhance this game so much with your various plugins, I don't think - scratch that, I KNOW that I couldn't and wouldn't want to play KSP without MechJeb and Crew Manifest, to name just a few items of your work.

Keep up the fantastic efforts, sir! And hopefully have a great day/ week/ month/ year/ other time unit of your choice while doing so. :D

Link to comment
Share on other sites

KSP 0.24.2 x32

win7 sp1 x64

Mechjeb 309 dev build

got this error while trying to circularize orbit

ArgumentOutOfRangeException: Argument is out of range.

Parameter name: index

at System.Collections.Generic.List`1[unityEngine.Quaternion].get_Item (Int32 index) [0x00000] in <filename unknown>:0

at MuMech.VesselState+EngineInfo.AddNewEngine (.ModuleEngines e) [0x00000] in <filename unknown>:0

at MuMech.VesselState.AnalyzeParts (.Vessel vessel, MuMech.EngineInfo einfo, MuMech.IntakeInfo iinfo) [0x00000] in <filename unknown>:0

at MuMech.VesselState.Update (.Vessel vessel) [0x00000] in <filename unknown>:0

at MuMech.MechJebCore.FixedUpdate () [0x00000] in <filename unknown>:0

(Filename: Line: -1)

https://www.dropbox.com/s/v1nbixxdtjutkkc/MJ-Error.rar?dl=0

hate to bump but i heed help please

Link to comment
Share on other sites

There have been numerous experiments with reactions wheels which indicate that distance from CoM is not a factor in the torque they impart on the vessel.

Another way to look at this issue is that angular momentum is conserved.

skips

Link to comment
Share on other sites

sarbian, first, thanks for all the great work and time you put into this auto-pilot thing.

I have a suggestion that you might like to put into MJ. It might be easy, it might not be, it might throw out your dV charting a bit.

Basically, in using real fuels and realism overhaul, most of the boosters for instance have a power curve they follow. Currently, if MJ is running the staging, MJ doesn't "hit the next stage button" until the booster is totally depleted of fire/push. This is usually not optimum. Optimum time to discard the booster is when it is no longer pushing the craft. I don't know if you can know if a booster is pushing or pulling it back slower at a given output.

It sure is cool though to watch your boosters peal away from your craft at just the right time. They only fall back slowly at first as they are pushed away with small rockets. Basically, if they're no longer helping, they need to go.

The other thing as a suggestion is... MJ is controlling the controlling pod/unit. It is getting all of its angular velocities and whatnot all from that component. If that component is at the top (for example) the rocket, and the rocket is long and limber, then MJ tends to chase. Could a flag be added that we could turn on that would have MJ use the component closest to CoM instead, even if MJ's controlling unit is on the top/end? This would help with these problem type crafts. Right now, I usually put another MJ controller on a large tank about half way up the rocket and control from there. Keeps the chasing down, but when that tank is dropped, I run into problems (have to switch crafts with the ] key).

Link to comment
Share on other sites

The other thing as a suggestion is... MJ is controlling the controlling pod/unit. It is getting all of its angular velocities and whatnot all from that component. If that component is at the top (for example) the rocket, and the rocket is long and limber, then MJ tends to chase.

You don't have to set Control from here to the MJ box. The box can be attached anywhere on the rocket then control can be set to a docking port or any other part that has the control capability. MJ just has to be present in at least one component *somewhere* on the part of the craft you want MJ to control. Then you don't have to perfectly align the MJ box straight up.

Link to comment
Share on other sites

What's up with the force roll in the ascent autopilot? It rolls my rocket "heads up" shortly after beginning the gravity turn. I assume this is exactly what it's programmed to do and it seems to do it perfectly, but why? Don't rockets generally roll to a "heads down" attitude?

Easy to fix that by installing a remote guidance unit or docking port rotated 180 degrees from the rest of the rocket then setting control from here to it so that when it's oriented by ascent guidance to be right side up the rest of your vehicle will have the orientation you want. Since Squad fixed having the rockets rotate 90 degrees from VAB to pad it's much easier to have them spawn on the pad in the orientation you want.

Link to comment
Share on other sites

Try #310. I added a few more test, but even if it fix your problem I'll need more info on your ship to understand why it does that

hey sorry for the late reply i found out what the error was a few typo's in a engine cfg from novapunch now its working like a charm

and thx for the reply sorry to cause the false alarm :blush:

Edited by dtoxic
Link to comment
Share on other sites

You don't have to set Control from here to the MJ box. The box can be attached anywhere on the rocket then control can be set to a docking port or any other part that has the control capability. MJ just has to be present in at least one component *somewhere* on the part of the craft you want MJ to control. Then you don't have to perfectly align the MJ box straight up.

That's not the issue he's having. He's saying that MJ uses the defaulted command pod as the "control point" of the ship resulting in the typical "fish tailing" behavior. As a correction for this he is suggesting that MJ should use the COM of the ship as the "control point" regardless of the actual command pod location. He's using multiple MJ ar202's and "control from here" as a work around currently.

Edited by sojourner
Link to comment
Share on other sites

I don't know WHY I didn't think of doing what Galane is saying though. I'll have to give that a try. But I don't like docking ports in the middle of my rocket. They are too flimsy for my liking and you can't do a "control from here" on a large main tank, which is where I'd like MJ to control from.

Link to comment
Share on other sites

You don't have to use docking ports. Use a Remote Guidance Unit. They also add a bit of reaction wheel torque to aid steering.

You could use Module Manager to add the control function to various parts that don't have it, or just directly edit the one specific cfg file. (But keep that to yourself as Squad's new licensing says you're not supposed to directly muck around with files outside GameData's folder tree.)

Common Force Roll code would be useful, easier to debug etc. Using TGT+ on two ships' docking ports, the SASS and docking auto pilot's zero degrees have gotten opposite again. SASS is the inverted one.

I did a testing craft assembled with two standard clampotrons together. Popped to orbit with hyperedit and decoupled node. When I engaged SASS force roll at 0 the craft flipped upside down from how it had been assembled. When I engaged DAP it flipped it back the way it was.

Edited by Galane
Link to comment
Share on other sites

As a correction for this he is suggesting that MJ should use the COM of the ship as the "control point" regardless of the actual command pod location.

it's not that simple. control reference points use part transforms and not locations.

Link to comment
Share on other sites

Yes, not using the active command part would not be easy. Worth looking into it but don't wait for it.

dtoxic : Can you tell me what the type was ? I d rather not have MJ crash on typo in part :)

Link to comment
Share on other sites

dtoxic : Can you tell me what the type was ? I d rather not have MJ crash on typo in part :)

sure this is the part NP_LFE_1_25m_RMA3_OrbiterEngine

MODULE

{

name = ModuleGimbal

gimbalTransformName = Engine_Nozzel

gimbalRange = 0.5

}

should be

MODULE

{

name = ModuleGimbal

gimbalTransformName = Engine_Nozzle

gimbalRange = 0.5

}

anyway just search the novapunch folder for Engine_Nozzel inside cfg files there are a couple of other engines that have this typo

P.S also the engine [NP_LFE_1_25m_RMA3_OrbiterEngine]

had this typo (i think not shure...so please confirm if it is or not a typo) node_stack_bottom = 0.0, -.375, 0.0, 0.0, 1.0, 0.0

i changed it to node_stack_bottom = 0.0, -0.375, 0.0, 0.0, 1.0, 0.0

so i am not sure witch one fixed the problem but i have it no more...hope it helps

Link to comment
Share on other sites

It's the gimbal typo. The code I added in the last build should solve that problem, but I may change it to something cleaner.

Thanks :)

heheh wish i knew that before it was driving me crazy :D

anyway thx :)

Link to comment
Share on other sites

Why do the solar panels keep folding up when I try to put a rover in "Break when Energy depletion" mode, that mode is useless to me because of that.

-- seriously this really ticks me off.

Edited by RuBisCO
Link to comment
Share on other sites

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