Jump to content

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


r4m0n

Recommended Posts

Can you post the whole log ? I can't see where in the function it crashed with just that.

- - - Updated - - -

I just pushed #389 to dev. It adds the new Velocity calculation and the (pretty) debug arrows. You can find a bunch of check box to play with in the Attitude Adjustment windows.

This should not change much the handling of ship by MJ. The real thing that should help is the next step but I spent already too much of the weekend coding :)

sebi.zzr : I had a quick look at the Plane landing code. And I got lost. I would need a few hours to understand what is going on there and right now it's not a priority. If you are lucky someone else may look, if not I ll have a look sooner or later.

Link to comment
Share on other sites

That was the problem.

I didn't see this documented any where, or did I just miss it in all of the documentation? Being a total newbe, I'm going to say I missed it.

Maybe this should be as a "NOTE:" in the fist post?

Anyway, Thank You! for catching this, I'm now off to crash into the Sun and other fun adventures using KSP.

Denis

Edited by dgdimick
Link to comment
Share on other sites

I can view the debug arrows through attitude adjustment? After I installed Dmagic orbital science, Universal storage stuff, SCANsat, techmanager, custombiomes, and community tech tree, the landing in atmosphere is WAY more flaily than it was before. I was trying to get it to land close to an anomaly on Kerbin that the scansat found, but the landing guidance was being a complete derp, even trying to trick it into thinking parachutes aren't being used doesn't help.

Haven't tried the latest dev build of MechJeb, but going to after this posting.

Edit: Oh, small issue here, when I open the attitude adjustment window, the top part of it goes off the top of the screen and the 'use stock SAS' button is inaccessable, as is the close window button. I'm using 1280x720 resolution. I can click the sidebar to close that window and I don't normally use the attitude adjustment window anyway, so it's not an issue for me, might be for others though.

Also, by freaking out and flailing, I'm seeing the requested attitude blink rapidly between two different angles, and that's with the parachutes unactivated, but the moment I activate them through staging, the behavior stops.

I just saw that the arrows (the red, orange, and yellow ones anyway) actually produce their own re-entry visual effect, I hope that's just purely a visual effect and doesn't indicate some other issue.

Edited by smjjames
Link to comment
Share on other sites

I forgot to handle the "when warping" case for the new velocity stuff. I pushed the fix in dev just now.

smjjames : yes, that window is getting a bit long. I ll see what I can do. I ll have a look at your other issue tomorrow. it s getting late here.

Edit : fixed the re entry effect on arrows too.

Edited by sarbian
Link to comment
Share on other sites

I can view the debug arrows through attitude adjustment? After I installed Dmagic orbital science, Universal storage stuff, SCANsat, techmanager, custombiomes, and community tech tree, the landing in atmosphere is WAY more flaily than it was before. I was trying to get it to land close to an anomaly on Kerbin that the scansat found, but the landing guidance was being a complete derp, even trying to trick it into thinking parachutes aren't being used doesn't help.

Did you put them all in at once or one at a time? Do a clean setup of KSP then put in Mechjeb, then your mods one at a time and try landing on Kerbin after adding each mod.

I've been too busy lately to try the last 3 or 4 MechJeb dev builds to see if any of them have fixed the issue with Stock Drag Fix. I have a clean KSP .90 setup with no mods except MechJeb and Stock Drag Fix and MechJeb cannot land on Kerbin. Works fine without SDF. Same tale with my working setup with a lot of mods. No SDF and it does the high deorbit burn and usually one correction burn then coasts down to do the final "suicide burn" like it is supposed to.

Nothing useful shows up in the log but MechJeb just twists and turns the ship all over the place, firing off short bursts of thrust after doing the high deorbit burn. With .25 and Stock Drag Fix it would only do this some of the time. Usually reloading the quicksave would cure it but in .90 it has flipped out EVERY landing I've tried on bodies with atmosphere.

Here again is a log from my modded install http://partsbyemc.com/pub/output_log.zip I deleted the log then ran KSP. If I have time tonight I'll put in the latest dev of MechJeb and try it again with the vanilla KSP with only MechJeb and SDF then will post here if it works or not, and post another log if not.

Link to comment
Share on other sites

How exactly is the "Launch into rendezvous" feature in the Ascent Guidance Autopilot supposed to work? I've been messing around with the targeted launch features in the AGAP, and while "Launch into plane of target" works very well, LTR doesn't seem to (I'm assuming it's supposed to time your launch such that you make an immediate rendezvous with your target)- but I might just be misunderstanding what it does, or using it wrong. The online manual has no details, and I tried searching the thread but didn't find a good explanation. It's definitely doing something, because it calculates a launch time and will auto-warp and launch on schedule if I hit "Engage autopilot", just like "Launch into plane of target" does. This is on stock 0.90 with nothing but Mechjeb (dev #392) installed. I can add further details if desired.

Link to comment
Share on other sites

Did you put them all in at once or one at a time? Do a clean setup of KSP then put in Mechjeb, then your mods one at a time and try landing on Kerbin after adding each mod.

Nothing useful shows up in the log but MechJeb just twists and turns the ship all over the place, firing off short bursts of thrust after doing the high deorbit burn. With .25 and Stock Drag Fix it would only do this some of the time. Usually reloading the quicksave would cure it but in .90 it has flipped out EVERY landing I've tried on bodies with atmosphere.

None of those should affect MechJeb though.

Also, your description sounds exactly like the behavior I get. The arrows just make it easier to see what the heck is going on.

Link to comment
Share on other sites

How exactly is the "Launch into rendezvous" feature in the Ascent Guidance Autopilot supposed to work? I've been messing around with the targeted launch features in the AGAP, and while "Launch into plane of target" works very well, LTR doesn't seem to (I'm assuming it's supposed to time your launch such that you make an immediate rendezvous with your target)- but I might just be misunderstanding what it does, or using it wrong. The online manual has no details, and I tried searching the thread but didn't find a good explanation. It's definitely doing something, because it calculates a launch time and will auto-warp and launch on schedule if I hit "Engage autopilot", just like "Launch into plane of target" does. This is on stock 0.90 with nothing but Mechjeb (dev #392) installed. I can add further details if desired.

You make me glad I am not the only one seeing errors with mechjeb and a very visible function. According to some, we are doing things wrong. BUT, having used mechjeb from .21 KSP thru .25 KSP <6 full versions mind you> along with my cousin, both of us using the procedures he learned during .21 KSP, Launch to Rendezvous USED to do this after selecting a target: It would calculate your launch window, auto-warp to said window if auto-warp was turned on, then, all the while, it would then alter the inclination box as it was setting up its calculations, then, as the window showed up, it would disengage auto-warp count down the last few seconds, usually from about t minus 10 seconds or so, then hit the milliseconds, then slam on the gas and you were off to the races.

I think it needs to be addressed, but again, thats just me.

Edited by Higgs
Link to comment
Share on other sites

How exactly is the "Launch into rendezvous" feature in the Ascent Guidance Autopilot supposed to work? I've been messing around with the targeted launch features in the AGAP, and while "Launch into plane of target" works very well, LTR doesn't seem to (I'm assuming it's supposed to time your launch such that you make an immediate rendezvous with your target)- but I might just be misunderstanding what it does, or using it wrong. The online manual has no details, and I tried searching the thread but didn't find a good explanation. It's definitely doing something, because it calculates a launch time and will auto-warp and launch on schedule if I hit "Engage autopilot", just like "Launch into plane of target" does. This is on stock 0.90 with nothing but Mechjeb (dev #392) installed. I can add further details if desired.

Do a first launch to rendez-vous an wait until circularization. Revert to launch and redo the launch. MJ record the angle between your launch and the circularization each time, so when you do the second launch it should get near your target.

Galane : you know there is a change log right ? If I don't write that I fixed something there then I did not. Don't waste your time testing :)

Edited by sarbian
Link to comment
Share on other sites

Something has logging messed up. I checked to make sure it's enabled (even though that disable option has never actually worked) but it ends after this

AddonLoader: Instantiating addon 'StockDragFix' from assembly 'StockDragFix'

(Filename: C:/BuildAgent/work/d63dfc6385190b60/artifacts/StandalonePlayerGenerated/UnityEngineDebug.cpp Line: 49)

noseCone switched to CONIC Drag Model

(Filename: C:/BuildAgent/work/d63dfc6385190b60/artifacts/StandalonePlayerGenerated/UnityEngineDebug.cpp Line: 49)

noseConeAdapter switched to CONIC Drag Model

(Filename: C:/BuildAgent/work/d63dfc6385190b60/artifacts/StandalonePlayerGenerated/UnityEngineDebug.cpp Line: 49)

rocketNoseCone switched to CONIC Drag Model

(Filename: C:/BuildAgent/work/d63dfc6385190b60/artifacts/StandalonePlayerGenerated/UnityEngineDebug.cpp Line: 49)

standardNoseCone switched to CONIC Drag Model

(Filename: C:/BuildAgent/work/d63dfc6385190b60/artifacts/StandalonePlayerGenerated/UnityEngineDebug.cpp Line: 49)

avionicsNoseCone switched to CONIC Drag Model

(Filename: C:/BuildAgent/work/d63dfc6385190b60/artifacts/StandalonePlayerGenerated/UnityEngineDebug.cpp Line: 49)

shockConeIntake switched to CONIC Drag Model

(Filename: C:/BuildAgent/work/d63dfc6385190b60/artifacts/StandalonePlayerGenerated/UnityEngineDebug.cpp Line: 49)

HighlightingSystem : Edge Highlighting requires AA to work!

(Filename: C:/BuildAgent/work/d63dfc6385190b60/artifacts/StandalonePlayerGenerated/UnityEngineDebug.cpp Line: 49)

I did a run where I let it go all the way to landing. After the high deorbit, it performed a proper correction burn then suddenly it showed it needed an almost 400 m/sec "correction", pivoted and popped a little burst. The correction dropped instantly to 0 then back up to almost as much as the first one. It kept flipping back and forth, each time the bogus "correction" requirement kept getting smaller. Eventually it quit doing corrections and began a braking burn but instead of decreasing the target speed number was increasing and went up until it popped to 179769313486232 followed by a lot of zeros. (Got a screenshot). Instead of aborting the landing I let it go to see what would happen next. It recovered after coasting down and soft landed in the ocean.

That's one misbehavior I get. Another one is after a few flips back and forth it turns sideways to burn all the fuel doing an inclination change, with the "correction" required steadily increasing. The third way it goes worng is apparently random direction thrusts that like the other ways produce very large changes in m/sec readout from tiny puffs of thrust. Sometimes that way settles down into doing the never ending inclination change.

Quicksave of starting from orbit after launch. I use SASS to do NML+ then manually decouple the lander while it's swinging so the boosters are out of the way. http://partsbyemc.com/pub/quicksave.rar

Persistent from the latest run where it landing guidance decided it had to do a huge inclination change. http://partsbyemc.com/pub/persistent.rar

Album with two shots of the one run where the target speed number went crazy and where it recovered to do the braking burn. The rest are from the other run with the initial incorrect corrections and several showing it stuck trying to change inclination. http://imgur.com/a/zwt84#0

So until it's figured out what/why/how Stock Drag Fix is giving Landing Guidance fits when it's not even in atmosphere, I can't use Stock Drag Fix. Will be returning to my irregularly unscheduled attempts to design a lander and other stuff for a trip to Moho and back, with the mods I normally have installed.

P.S. Putting the Abort Autoland button in a fixed location relative to the top of the window might be a good thing. When it's going wonkers like this with data above it rapidly changing, it's difficult to click on Abort as it's bouncing up and down.

Edited by Galane
Link to comment
Share on other sites

The main problem is that the landing AP simulation use the stock aero. So the AP put the vessel in a trajectory that should bring where you want according to the sim.

But when you use FAR or SDF (I am bit surprised about SDF there, I ll have to test) the vessel does not follow that simulated trajectory so the AP is confused and try to compensate. And as you get lower the difference between the sim and the reality gets even more different and harder to handle by the AP.

Until you reach the altitude where the AP switch to the final landing sequence where there no simulation and just a classic slowdown and suicide burn. If you are slow enough at that point you should land properly even with FAR, NEAR or SDF.

So you'll have to wait for me to tackle the whole "alternate landing sim" problem.

Link to comment
Share on other sites

The main problem is that the landing AP simulation use the stock aero. So the AP put the vessel in a trajectory that should bring where you want according to the sim.

But when you use FAR or SDF (I am bit surprised about SDF there, I ll have to test) the vessel does not follow that simulated trajectory so the AP is confused and try to compensate. And as you get lower the difference between the sim and the reality gets even more different and harder to handle by the AP.

Until you reach the altitude where the AP switch to the final landing sequence where there no simulation and just a classic slowdown and suicide burn. If you are slow enough at that point you should land properly even with FAR, NEAR or SDF.

That's an excellent explanation, Sarbian. I sort of figured that out by experimentation a year or so ago when I was giving a lot of feedback regarding stock aerodynamic parachute landings on places like Laythe. The fellow (name escapes me) who was doing code pushes with that stuff really got the accuracy down well for most sane entry orbits.

So you'll have to wait for me to tackle the whole "alternate landing sim" problem.

REALLY looking forward to this when you get a chance to work on it. FAR makes the game much more fun for me, but it would be nice to be able to get at least within a kilometer or so for Kerbin, Eve, Duna and Laythe to be able to setup multi-ship, long-term bases.

I did find sort of a "close enough" work around, at least for FAR and Kerbin, with the MJ landing autopilot - in the first case, I came in from about a 175 km, 45º orbit and landed within 2 km of the pad on a southerly trajectory using MJ. Alternately, for an equatorial 150 km orbit, I "picked a target" on the map a little ways past the Island Airport and managed about the same accuracy.

Anyway, thank you for as well for change to display units (pascals) on the Ascent Autopilot for dynamic pressure fadeout. Much more understandable now. :)

Link to comment
Share on other sites

There's still one critical maneuver missing from the maneuver planner - changing relative inclination. The only option is to set it to 0, via match planes, but there's no way to set that to a nonzero value. Could you add an option to input the desired relative inclination? Planning a setup for, say, two polar orbiters with perpendicular orbits, can be very frustrating...and the code is already there, just no input option.

Link to comment
Share on other sites

Galane : I noticed you have Stock Drag Fix enableConicDragTypes set to true. I'll repeat what the config file says : "Do not enable". The conic drag model is wrong.

aradapilot : hum nope. Not that easy. There is an infinite number of 2 orbit with a x degree relative inclination. for 90° you could have 2 polar orbit or 1 polar and 1 equatorial. You would need to also specify the orbit inclination, or the the latitude of one of the crossing point.

Math :(

Link to comment
Share on other sites

Do a first launch to rendez-vous an wait until circularization. Revert to launch and redo the launch. MJ record the angle between your launch and the circularization each time, so when you do the second launch it should get near your target.

Well look at that.

bGFkprL.png

Under 1km rendezvous straight from launch. Very nice.

That was for a 0° inclination target orbit. A few more questions regarding LTR:

1. You have to manually adjust the orbit altitude/inclination to match the target's orbit in the ascent autopilot, correct? The LTR button did not seem to ever change those.

2. For inclined orbits it just goes for the first possible rendezvous, correct? Aiming at a 100 km/45° inclination target orbit, it got me a ~13km intercept with a relative orbital inclination of ~24° on the second try (both orbits were 45° with respect to the equator, but the orbital planes were rotated with respect to one another). Image below.

kpG732C.png

I think it does this because in order to launch into the same plane AND directly to rendezvous in a highly inclined orbit would require the target to be in exactly the right orbital position when the launch site crosses the target's orbital plane, which would happen approximately once every zillion years. For equatorial orbits you can launch to an in-plane rendezvous easily because the launch site is always in the target plane, so you just wait until the target is in the correct relative position, which should always take less than one orbit. For high-inclination rendezvous targets, you would want to use "Launch into plane of target" directly into a phasing orbit and then use the Rendezvous Autopilot after circularization.

Am I understanding this correctly?

Link to comment
Share on other sites

For high-inclination rendezvous targets, you would want to use "Launch into plane of target" directly into a phasing orbit and then use the Rendezvous Autopilot after circularization.

Am I understanding this correctly?

Not to answer for sarbian, but speaking as an honest-to-$DEITY aerospace engineer, you got it right.

Link to comment
Share on other sites

Galane : I noticed you have Stock Drag Fix enableConicDragTypes set to true. I'll repeat what the config file says : "Do not enable". The conic drag model is wrong.

I didn't enable it or change anything in SDF, just extracted its folder to Game Data.

*looks at the SDF_Settings.cfg file*

STOCK_DRAG_FIX_SETTINGS

{

dragScale = 1

// Do not enable. Experimental and only partially functional.

enableConicDragTypes = false

}

What may be a problem is that file is not written with the line endings that are standard for Windows. Open with Notepad and it's all on one line with the inverse 0 characters where line endings should be. Open and save in Wordpad and it fixes that. I've noticed that causing issues with other KSP text files in Windows.

Oddly, copying and pasting the file contents as-delivered, to here, it pastes with the appearance of being correctly formatted.

I'll test this and see if that helps.

*after test*

Well, logging no longer stops after Stock Drag Fix loads but I still get the switched to CONIC drag lines in the log and MechJeb still can't land on Kerbin with SDF. :(

I did two flights. First run it looked like it was going to work. It did the high deorbit then a proper single correction burn. Then it jumped right into braking burn with ever increasing target speed until it went to the window full of zeros and quit.

Second try I got the "correcting" in random directions, rather than only in the existing orbital plane.

Edited by Galane
Link to comment
Share on other sites

Well look at that.

http://i.imgur.com/bGFkprL.png

Under 1km rendezvous straight from launch. Very nice.

Nice to see that MJ does not work only for me :D

1. You have to manually adjust the orbit altitude/inclination to match the target's orbit in the ascent autopilot, correct? The LTR button did not seem to ever change those.

Inclination should update itself when the launch to xxx is pressed. There was a fix in one of the last dev version since I messed it up while cleaning that code.

2. For inclined orbits it just goes for the first possible rendezvous, correct? Aiming at a 100 km/45° inclination target orbit, it got me a ~13km intercept with a relative orbital inclination of ~24° on the second try (both orbits were 45° with respect to the equator, but the orbital planes were rotated with respect to one another). Image below.

http://i.imgur.com/kpG732C.png

I think it does this because in order to launch into the same plane AND directly to rendezvous in a highly inclined orbit would require the target to be in exactly the right orbital position when the launch site crosses the target's orbital plane, which would happen approximately once every zillion years. For equatorial orbits you can launch to an in-plane rendezvous easily because the launch site is always in the target plane, so you just wait until the target is in the correct relative position, which should always take less than one orbit. For high-inclination rendezvous targets, you would want to use "Launch into plane of target" directly into a phasing orbit and then use the Rendezvous Autopilot after circularization.

Am I understanding this correctly?

You seems to understand it better than I do :wink:

Link to comment
Share on other sites

Nice to see that MJ does not work only for me :D

It's been working like a charm for me for ages, getting along nicely with SDF and DRE to boot. :)

Link to comment
Share on other sites

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