Jump to content

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


r4m0n

Recommended Posts

Myself I would be happy to see a general landing overhaul to expand the capabilities. I`d like it to look at (and predict) the TWR for the descent and notice if it will have to stage in the next 800Dv say and what the TWR would be afterward (not enough, loads more?) then adjust the descent profile to match.

For example a craft with 200 remaning DV on a stage with a TWR of 4 may well use that up in the first part of a descent and the stage that follows might be TWR 1.8. It may be that the craft stages in the middle of a suicide burn with obvious results. It would be better to treat the first 200Dv as though it were at TWR 1.8 so a more shallow profile could be flown.

Conversely, if the first 200Dv is TWR 1.8 followed by a TWR of 4 then you could follow the current normal descent. You would slow down too early then freefall for a while and suicide burn. Still not perfect but ok.

Also for low TWR craft coming in with a Pe of below 10-15km there should be a way of getting MJ to follow a very low stop and drop. I`d like it to keep altitude until the horizontal speed is less than 100m/s and altitude is just above the highest mountain at that lattitude then drop and land. Without going to the lengths of active surface scanning I reckon this may be the easiest way to get better low TWR landings from low altitude.

I`d like MJ to be able to do this type of landing

EDIT 1 : I have also noticed that MJ is starting burns too close to the node with low TWR craft leading to it always overshooting the node. I manually adjust for this but it is not good.

EDIT 2 : The `end autostage at stage X` is not remembered when launching another of the same craft. Is it possible to get MJ to remember this setting with the others?

Edited by John FX
Link to comment
Share on other sites

Hey there guys, I use the KSO mod to do all my docking and station construction.

I've been using MechJeb2 to do all my docking (rendezvous assistant). Works great each time and gets me to within 50-100m depending what I want.

The problem is that MechJeb2 wants to do a 189km orbit before it does a Hohmann transfer to my target. I almost always have to take up extra fuel in either the KSO Auxiliary Fuel Module, or a stock TL-100 tank.

Is it possible to reduce that orbit to say 100km?

I've done several pre-orbits to see if MechJeb2 will skip the 189km circularization, but it seems it always wants to.

Let me know guys if there is a setting I can change, I'd really appreciate it. I think a lot of folks using the KSO may as well :D

Thanks for the help!

Link to comment
Share on other sites

Personnaly, I override the automatic rendez-vous by establishing my chasing orbit myself... So I use the Rendez-vous planner instead, and when it comes to the chase orbit I choose an orbit 25 km above or below, preferably below... then compute the Hohmann. Results in deltaV of a few dozens of meters instead... much more fuel efficient.

Link to comment
Share on other sites

I use Maneuver planner and Node Editor for Rendezvous. The Maneuver Planner gives you so many more options then the Rendezvous Autopilot or the Rendezvous Planner. Just memorize the steps and then you won't need the Rendezvous modules any more.

Tip: After performing the Hohmann Transfer maneuver, use the "Fine Tune Closest Approach" option in the Maneuver Planner. This will make your closest approach very close (sometimes too close, so I commonly abort the maneuver early).

Link to comment
Share on other sites

A second attempt with a modified lander to Moho has produced an even more bizzare control input condition. The lander is swinging back-and-forth in both pitch and yaw, while the roll is vibrating rapidly. It looks like the lander is being suspended in a rubber band. The Landing AP has completely gone bonkers. I've tried various values of Tf, with no improvement. If anything, changing the Tf only makes it worse. The interesting bit in all of this is, the de-orbit burn starts out OK, but craps out in the last few m/s of the burn. This also occurred with every maneuver node activity from Kerbin to Moho. I've had to kill the maneuver manually and engage Smart A.S.S. with some direction to stop the resulting spin.

As an experiment, I aborted the AP and engaged Smart A.S.S in RETR GRADE attitude, and the lander just went into a spasm. The needles on the lower-left of the screen are now all three vibrating rapidly, and the navball is quivering with various data targets flashing on and off. Killing SA and hitting "Land Somewhere" just puts the lander back into another quiver mode. The only positive note in all of this is, it's flying retro-grade.

ADDENDUM: The Landing AP must have woke up from its nightmare, because in "Land Somewhere" mode, it actually landed safely. It was quivering all the way down, and I wasn't sure if it was going to recover. The final "heads up" maneuver was just a few meters above the surface (which appeared to be coming up very rapidly).

Here's the logfile for this event. I don't know if there's anything valuable in it. I couldn't find any error calls.

Edited by BARCLONE
Link to comment
Share on other sites

@Barclone try initiating the landing from a higher orbit. It seems something has got into the landing AP code that makes it go bonkers when starting from a minimum safe altitude, ie 70~71 KM around Kerbin. May also have something to do with having a high amount of control power VS craft mass. Try disabling some RCS thrusters and/or reaction wheels to slow down the turn rate.

'Course the best fix will be when Sarbian figures out why it's doing this and fixes it. ;) I posted a test craft that always goes nuts trying to land from 71 KM but from 100 or higher it works. (It's also built as a MIRV I was trying to hit the VAB with, but wasn't able to from LKO due to the landing AP problem.)

Link to comment
Share on other sites

Hey there guys, I use the KSO mod to do all my docking and station construction.

I've been using MechJeb2 to do all my docking (rendezvous assistant). Works great each time and gets me to within 50-100m depending what I want.

The problem is that MechJeb2 wants to do a 189km orbit before it does a Hohmann transfer to my target. I almost always have to take up extra fuel in either the KSO Auxiliary Fuel Module, or a stock TL-100 tank.

Is it possible to reduce that orbit to say 100km?

I've done several pre-orbits to see if MechJeb2 will skip the 189km circularization, but it seems it always wants to.

Let me know guys if there is a setting I can change, I'd really appreciate it. I think a lot of folks using the KSO may as well :D

Thanks for the help!

Question: Are you setting your ascent orbit's altitude above/equal to your intended target's orbit? If so, that could be part of the problem. Here's what I do...

Assuming my target is orbiting Kerbin at ~126km, I set my KSO's ascent orbit goal altitude to about 5-10km lower (say ~120km). If done properly, no Hohmann transfer should be necessary. Heck, you probably won't even have to align planes. You should come in right under your rendezvous target and simply have to plot an intercept/match velocities. For best results, make sure you've set up your ascent guidance window accordingly:

ArE4QHX.jpg

Note: "Limit to terminal velocity" is ticked. This will help conserve your delta V on ascent (dramatically). Also, and this is key, I've pre-selected my intended target (KSO Skylab) prior to lift off. All I had to do then was select "Engage autopilot" and click the "Launch to rendezvous" button - MechJeb took care of all the heavy lifting for me, choosing when best to launch for an encounter.

Here I am later in the mission (after circularizing) coming in right under my rendezvous target (as expected). Look at that distance... only 7km away! :)

0r2Slee.png

And here I am, under 5km away, plotting intercept... with still nearly 2/3rds of the orbiter's fuel remaining! And that's carrying the SST as payload, with NO supplemental tanks.

fjeeGe9.png

Hope that helps!

P.S.: Love your mod! :)

Link to comment
Share on other sites

@Barclone try initiating the landing from a higher orbit. It seems something has got into the landing AP code that makes it go bonkers when starting from a minimum safe altitude, ie 70~71 KM around Kerbin. May also have something to do with having a high amount of control power VS craft mass. Try disabling some RCS thrusters and/or reaction wheels to slow down the turn rate.

'Course the best fix will be when Sarbian figures out why it's doing this and fixes it. ;) I posted a test craft that always goes nuts trying to land from 71 KM but from 100 or higher it works. (It's also built as a MIRV I was trying to hit the VAB with, but wasn't able to from LKO due to the landing AP problem.)

Galane,

I just tried a third lander and the LGAP went nuts again. All three of the landings I've talked about while using dev193 were from a starting orbit of 200 Km. I did notice the following on the third attempt:

  • When the "Pick Target On Map" / "Land At Target" options are chosen, the AP has no problem starting the burn. When the burn gets down to the last 0.4 m/s, the trouble begins.
  • The problem now manifests itself as a rapid swinging back-and-forth of the yaw and pitch controls. This condition locks up the AP to the exclusion of everything else, unless you abort.
  • On the last attempt, I aborted early, and clicked the "Land Somewhere" option. The lander this time smoothed out and started a more controlled decent. When I spotted my second attempt passing under my path, I clicked on it and made it the new landing target. The AP dutifully put the lander into an attitude to slow the horizontal movement to nearly nothing, then began a vertical decent. I let the lander drop for a while, then aborted and went back to "Land Anywhere". The AP maintained a controlled decent all the way to touchdown, with no jitters. I only had 233 m/s out of over 1700 m/s of Dv left, though.

This lander has no RCS; it's all torque. At Moho, the TWR is 9.28 at the surface. The torque is only 4.0 in all three axis (axes? axi? What's the plural of "axis"?). Here's a screenshot of the lander I'm using.

Link to comment
Share on other sites

Question: Are you setting your ascent orbit's altitude above/equal to your intended target's orbit? If so, that could be part of the problem. Here's what I do...

My station is at 91km. I think my first time I was at 74km and it still did a 189 orbit...

Think I'm going to manually fly to 80km, set my engines up (OMS only) and then let MechJeb2 do the rest. I'm trying to avoid having to take up the KSOAFM when ever I can.

I have my own MechJeb2 KSO model (it's the KSO Avionics) I put up on the nose. Will PM the authors to see if it's ok to have that as an alternate download in the KSO thread for those that wish the part on their KSO that uses MechJeb2.

NN8XyrA.jpg

Are you able to stage properly with v2.06 plus MechJeb2 doing all the work?

Edited by helldiver
Link to comment
Share on other sites

My station is at 91km. I think my first time I was at 74km and it still did a 189 orbit...

Think I'm going to manually fly to 80km, set my engines up (OMS only) and then let MechJeb2 do the rest. I'm trying to avoid having to take up the KSOAFM when ever I can.

I have my own MechJeb2 KSO model (it's the KSO Avionics) I put up on the nose. Will PM the authors to see if it's ok to have that as an alternate download in the KSO thread for those that wish the part on their KSO that uses MechJeb2.

http://i.imgur.com/NN8XyrA.jpg

Are you able to stage properly with v2.06 plus MechJeb2 doing all the work?

17km (91km - 74km) might be a wee bit too much of a difference. Before you give up on MechJeb, I'd try it with an ascent goal of 85km and see if you get better results. Also, be sure to raise your maneuver planner tolerance from 0.1m/s to 6m/s (it's less precise, but you'll waste less delta V chasing nodes). The general idea is to shoot close to your intended target, but low enough that you're still traveling at a (slightly) faster velocity to make up for the ascent.

And yes, I am able to stage properly with v2.06 and MechJeb2... but with a few (minor) modifications. First, I have a timer bolted onto the TT18-A stability clamps to make them stage after about half a second (mostly for the cosmetic effect of watching the engines fire up before lift off). Also, as mentioned in the KSO thread, I linked the OA-850 boosters to the big orange tank with stock fuel lines. They stage earlier (~10km), but I'm fairly certain without loss to overall delta V. (In fact, I think this is a more efficient arrangement - I net a delta V boost.) Lastly, I've attached one of dtobi's staging devices from his wonderful "Small Parts" pack to the Thrustmax External Fuel Tank. It monitors the big orange fella for when it's spent. When that happens it triggers a control group that stages the tank and switches my engines from the Thrustmax 200s to the Omnimax 40Ts. Not really necessary (the orange tank will stage properly on its own via MechJeb without dtobi's part), but it's a nice convenience. :)

Link to comment
Share on other sites

I have no issues with mechjeb getting the KSO to a 300km orbit it stages correctly, the LRB's jettison at around 16000KM. I also use the smartparts to jettison the ET and shut down the main engines and fire up the oms engines and the main ET jettison on the start of circulation burn. Really happy with the way MJ is handling the KSO

Link to comment
Share on other sites

Yup

I discovered tonight (I let MechJeb2 do everything) that it has issues staging the LRBs in 2.06. In 2.04 it was good, but since engine efficiency values got tweaked something got fudged and now I get 0.47 Oxidizer remaining. I have to manually stage them.

Going to do more tests and have Nazari tweak it so they zero out properly.

Are you guys using the Rendezvous Autopilot or the Rendezvous Planner?

If the former, can you do a quick 5 step how to use the Rendezvous Planner? Do I set my new orbit height and then just click each step one by one and let it complete it?

Link to comment
Share on other sites

Yup

I discovered tonight (I let MechJeb2 do everything) that it has issues staging the LRBs in 2.06. In 2.04 it was good, but since engine efficiency values got tweaked something got fudged and now I get 0.47 Oxidizer remaining. I have to manually stage them.

Going to do more tests and have Nazari tweak it so they zero out properly.

Are you guys using the Rendezvous Autopilot or the Rendezvous Planner?

If the former, can you do a quick 5 step how to use the Rendezvous Planner? Do I set my new orbit height and then just click each step one by one and let it complete it?

The way I do it is, first I align the orbits. I don't always use the phasing orbit, it depends how long it takes to get, then I do the Hohmann transfer. After that match speed at closest encounter. And depending on how far I'm from the target I use the get closer command.

Link to comment
Share on other sites

I just use the launch to rendezvous, and manually stage by the time I circularize im usually 5 to 15 KM away from my target and the rendezvous auto pilot just plots an intercept course.

Link to comment
Share on other sites

I`d like MJ to be able to do this type of landing

Translatron -> Keep Vert with Kill HS. Just get in a flat angle with low vertical speed to your target altitude and turn that stuff on, it will do the hovering thing while decelerating as much as it can.

Atleast it should, I didn't try it yet with 1km/s horizontal speed.

As for the overshooting a node: MJ starts burning half of the burntime ahead of the node because it will need to burn the other half after passing it, the result will still be very close to planned node.

Unless your TWR is so low that you do like 1/2 of an orbit while burning, then it probably won't.

About the rendevous thing: if it doesn't make a good Homann Transfer for my target I just use the fine tune or just plan the node myself. But I really should try to make it aim for a 0.1km fine tune.

Link to comment
Share on other sites

Using dev193.

I tried a landing at KSC with one of my "standard Kerbal ships" (a Mk 1-2 command pod) and got the same jittery needles as soon as the de-orbit burn tailed off. So, the problem is not limited to the Moho SOI, nor is it limited to small, quick-responding craft like my Pathfinders.

Link to comment
Share on other sites

Sarbian,

Installed dev193, testing the Landing Guidance AP with a little Pathfinder on Moho...

Let me try to describe what happened to two landers in a row:

Picked the landing location on the map, engaged the AP. The lander goes into the initial de-orbit burn OK, brings the predictor over the target site. During the decent, the AP rotates the lander -NML, and continually fires the engine at a very low throttle notch. This appears to be bringing the final landing position to match the selected position, but the AP is jerking the thrust vector around erratically and this never stabilizes. Lander is otherwise free-falling and is accelerating from gravity. As the targets line up to within a few meters of each other, MechJeb turns the lander PRO-GRADE and shoves the throttle to full until the altitude is less than 3 Km. At Moho, this means the lander is now screaming toward the surface at over 800 m/s. Near the 1 Km altitude, the lander lowers the gear, and flips into a heads-up attitude, but there is no possibility to slow down and the lander hits the ground at better than 600 m/s.

Not exactly what I expected...

ADDENDUM:

Looking now at the KSP.log file...

I'm not finding anything in the way of an exception being thrown prior to impact, but exceptions-a-plenty afterward. In fact, about 4/5 of the log file is nothing but a list of error exceptions. However, most of the errors deal with "MechJebModuleThrustController" and "MechJebModuleAttitudeController".

Here's a link to the KSP.log file...

2nd ADDENDUM:

Just re-installed dev192, and I'm getting the same weird behavior. Looking at the direction "needles" on the bottom-left, it gives the appearance that the yaw and pitch controls are fighting each other. It's a constant back-and-forth action on both directional axis. Could this be some sort of "infinite loop" in the code?

One change in my observation earlier. The bad burn is very close to being -RAD instead of PRO-GRADE. The outcome, however, remains the same. SPLAT.

As you said all the errors comes from after the crash. Somehow MJ was still trying to run while the ship was not here, or in a strange state.

The landing AP obviously needs more work from all the test you and other have done, but right now I can't spend enough time on code to make any meaningful progress.

You'll have to wait for me to get a bit more free time or find someone to it ...

And for all the other that do feedback : please state if you use a dev version and its number. thx

Link to comment
Share on other sites

Yup

Are you guys using the Rendezvous Autopilot or the Rendezvous Planner?

If the former, can you do a quick 5 step how to use the Rendezvous Planner? Do I set my new orbit height and then just click each step one by one and let it complete it?

Hey helldiver I can help here. I let Mechjeb do all the flying for me. Here's my normal liftoff to rendezvous procedure :

1) I have a station orbiting at 100 km and set my MJ ascent guidance orbit altitude at 100 km.

2) I liftoff and climb under ascent guidance. I engage ascent guidance autopilot before main engine start, select rendezvous target and select launch to rendezvous. MJ will start main engines and LRBs, I release launch clamps manually. I let MJ do the whole ascent. Make sure autowarp is deselected, you won't need it.

3) For a 100 km apoapsis, MJ will throttle off all engines at about 75-80 km for the coast to apoapsis. At this point I turn off ascent guidance autopilot. I do not let ascent guidance autopilot do the circularisation burn. As soon as I turn off ascent guidance autopilot, and while still in the coast to apoapsis I engage rendezvous autopilot with a 100 m separation set. From there I just sit back and watch MJ do its thing. It gets me within 90-100 m every time. It can get me closer, but I like to leave a bit of separation for screw ups.

With your fuel efficiency tweaks in 2.06 I usually arrive on station with approx 430 delta v remaining.

I hope this helps.

Link to comment
Share on other sites

The landing AP obviously needs more work from all the test you and other have done, but right now I can't spend enough time on code to make any meaningful progress.

Understand fully, Sarbian. Life isn't just about Kerbals... :)

Something to look at when you get time -- I just had two perfect landings on Mun with my Pathfinder, using dev189. I dropped back to something I knew I had experienced good results from. I'll check out how it works on Moho tomorrow, so I'm not saying 189 was completely "right". But those jitter bugs I described with 193 seem to have gotten introduced shortly thereafter...

I just thought about something else, concerning the "thrust vector drift" that has plagued me and a few others at the tail-off of a maneuver node burn. It bugged me that I see this drift in every node, but not at the end of the "ascent to apoapsis" burn of the ascent AP. There is no thrust vector on the nav ball during that portion of the ascent, but there is when the AP goes into circularization mode. The ascent AP borrows code from the maneuver nodes routines to do the circularization, doesn't it? The bug is common to every maneuver, and obviously it handles the tail-off differently than the ascent AP does in the apoapsis portion of the flight. How does MJ compute vectors in that part of the code?

The nodes, on the other hand, do not compute the vector, but instead use the value provided by (whatever feeds) the nav ball code. What if the nodes captured that vector internally before beginning the burn, then use that captured value through the entire burn, ignoring any changes made by the nav ball code, especially near the end of the burn? The nodes would consider any later nav ball value changes as "corrupted" once the burn starts, and disregard anything it provides until the start of the next node.

Link to comment
Share on other sites

I'll do a code compare between those 2 later to see what's going on. I'll try to get some time to work a bit on MJ this week because the asteroid pack will come sooner or later, and there is a few things I want to add to MJ before release a new official (related to checking how MJ is installed and displaying a message when it's not done right, and redoing the toolbar integration).

It may be a good idea. I'll have to see if it's a small code change.

Link to comment
Share on other sites

Hey helldiver I can help here. I let Mechjeb do all the flying for me. Here's my normal liftoff to rendezvous procedure :

1) I have a station orbiting at 100 km and set my MJ ascent guidance orbit altitude at 100 km.

2) I liftoff and climb under ascent guidance. I engage ascent guidance autopilot before main engine start, select rendezvous target and select launch to rendezvous. MJ will start main engines and LRBs, I release launch clamps manually. I let MJ do the whole ascent. Make sure autowarp is deselected, you won't need it.

3) For a 100 km apoapsis, MJ will throttle off all engines at about 75-80 km for the coast to apoapsis. At this point I turn off ascent guidance autopilot. I do not let ascent guidance autopilot do the circularisation burn. As soon as I turn off ascent guidance autopilot, and while still in the coast to apoapsis I engage rendezvous autopilot with a 100 m separation set. From there I just sit back and watch MJ do its thing. It gets me within 90-100 m every time. It can get me closer, but I like to leave a bit of separation for screw ups.

With your fuel efficiency tweaks in 2.06 I usually arrive on station with approx 430 delta v remaining.

I hope this helps.

Will test on my next launch this setup, thank you!

Link to comment
Share on other sites

I'll do a code compare between those 2 later to see what's going on. I'll try to get some time to work a bit on MJ this week because the asteroid pack will come sooner or later, and there is a few things I want to add to MJ before release a new official (related to checking how MJ is installed and displaying a message when it's not done right, and redoing the toolbar integration).

It may be a good idea. I'll have to see if it's a small code change.

Any idea when/if Autom8 might be coming back? Could be super useful for us shuttle enthusiasts who stink at landing. :P

Link to comment
Share on other sites

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