Jump to content

[1.12.x] Anatid Robotics / MuMech - MechJeb - Autopilot - [2.14.3] [4th March 2023]


sarbian

Recommended Posts

Question on landing guidance, or more accurately where is the user screwing it up?

This is what I have, not exactly simple but if I wanted simple I'd be playing a game on my phone. Everything you see here is landing; the big black triangles on the bottom stage are big landing legs and it has its own HECS2 and MJ. Then we drop off 6 K&K units, each with a HAL, MJ, Meerkats and extra fuel in radial tanks so each has like 700Dv.

kbEfNLel.png

Last up top we have the K&K base hub which is so festooned with stuff for the trip it's hard to see (goal is one trip, metal mining, fuel mining, workshop, launchpad, lab, rover and mostly use K&K), on top of it is a big storage contained tweaked to 5m and a 5m fuel dome on top of that. It has MJ and 8 x Meerkats, it took off vertical from Kerbin fully loaded so definitely enough oomph, and plenty of fuel with the 5m dome on top.

So, I went through the whole complex separation sequence, as each is released I switch over to it, turn on MJ landing guidance, pick the spot on the map, tell it to land there with autowarp disabled but the various show trajectory options enabled. And it all seemed to go well, not a hitch and all of them are supposedly released and programmed with the correct landing point, leaving me to have some fun landing the weird-looking K&K hub. 

nliussZl.png

"The Denovans appear to be in attack formation, sir."

PIhIDqMl.png

I'm in the lowest orbit so I warp around until MJ stops it to do the plane-change warp. Then I wait for the rest of the formation to do their burns, but... nada. I switch to them and they're doing their best impression of a dead flounder that has miraculously escaped the freezing and sublimation desiccation of space and are still flopping around like dead fish. They've totally forgotten that whole landing idea, although they still remember they have a target. If I hit the Land at Target button again, they do their best impression of very stupid just waking up flounder, and try to go in a straight line from wherever they are to the target. In my case that means trying to go straight through Minmus.

So, what am I doing wrong? Obviously before that warp they all seemed to be working, so it seems it should work. Is it my warp that breaks them, time starts going by fast and they didn't ask it to? If that's the case I'll have to go back in time a bit so they can do their plane change burn and land without having to do an extra orbit.

Edited by vossiewulf
Link to comment
Share on other sites

5 hours ago, vossiewulf said:

So, what am I doing wrong?

The most common problem with the landing AP is using engine that MJ does not properly detect. If you open MJ delta V window what does it shows ? 

And as usual : Logs, logs, logs.

Link to comment
Share on other sites

Thanks for the suggestion. I grab logs and post them once we confirm we have an issue where logs are needed, usually it's user error or user lack of understanding so I just ask first.

In this case, your first guess is right - MJ doesn't recognize Meerkats as engines and thinks they all have 0 Dv.

However that doesn't explain why the bottom stage, which is Constellation tweaked up to 5m. It says it has 2200Dv but it also seems to be forgetting about landing once I switch away. I'll look into that some more and see if I can figure out what is happening.

Link to comment
Share on other sites

I am using dev build 740. It seems that the post-staging timer that starts the new engine has stopped working. The pre-staging timer still works fine. Made sure I was using stock parts. Did a fresh install of KSP unmodded and Mechjeb to test it.

Link to comment
Share on other sites

2 hours ago, vossiewulf said:

In this case, your first guess is right - MJ doesn't recognize Meerkats as engines and thinks they all have 0 Dv.

It might not be the Meerkats (haven't tested) but instead your control point. MJ calculates ΔV with respect to your thrust vector and forward vector. If your thrust is not aligned with your forward vector (e.g. by not controlling from the correct part) then it will report less or even zero ΔV. You can quickly test this by opening the delta-V window and toggling off the "ΔV include cosine losses" option - with this option off MJ will include engines even if they are pointing at right angles to the vessel's forward vector.

Link to comment
Share on other sites

1 minute ago, Aelfhe1m said:

It might not be the Meerkats (haven't tested) but instead your control point. MJ calculates ΔV with respect to your thrust vector and forward vector. If your thrust is not aligned with your forward vector (e.g. by not controlling from the correct part) then it will report less or even zero ΔV. You can quickly test this by opening the delta-V window and toggling off the "ΔV include cosine losses" option - with this option off MJ will include engines even if they are pointing at right angles to the vessel's forward vector.

Thanks, was just about to go over to the Planetary Bases thread as indeed we are confused as to which direction is forward. Since the HAL, built specifically for this, is the underlying autopilot I figured it would be able to orient itself correctly, but even with me driving, when I tell it to hold (e.g.) retrograde, it's 90 degrees off. I still don't really understand control from here, only place I really know to use it is docking. I assume when you switch to a new location it reorients the control axes to align with the local axes of the part, all fine and good, but how do you know the local axes of the part? That is, I don't know how to tell which part to switch for establishing the correct axes.

Anyway thanks, will go poke at it some more.

Link to comment
Share on other sites

Progress I guess.... after switching to HAL control point and unchecking the cosine losses, he has Dv and conducted a perfect plane-change burn 90 degrees from landing. And then immediately put his gear down, and burned in a straight line for the target, right smack into Minmus mountains. Sigh.

Also is there any way to override his plane change step? He is still insisting on going all the way around and doing another plane change burn for about 1 degree inclination change, and since they're in a very low orbit of 8k or so the distance difference there in terms of starting descent points is maybe a few hundred yards.

 

Link to comment
Share on other sites

11 minutes ago, eklipsa said:

The landing is not working true? i test it more time on KERBIN and all the time was fail. He was not burn for reduce speed so the ship was going with full speed in the planet.

Trying to figure out if it's working or broken, if it's concluded it's not in face working I will post some logs. What I saw was a good plane-change burn followed by dropping gear and actively burning in a straight line toward the landing target, he had just stopped burning when he impacted with Minmus. I'm going to try it a few more times.

Link to comment
Share on other sites

Just now, vossiewulf said:

Trying to figure out if it's working or broken, if it's concluded it's not in face working I will post some logs. What I saw was a good plane-change burn followed by dropping gear and actively burning in a straight line toward the landing target, he had just stopped burning when he impacted with Minmus. I'm going to try it a few more times.

if i select land somewhere he start the burn but he stop when is hitting the 20k altitude...  and ofc the ship is destroy it.

Link to comment
Share on other sites

6 minutes ago, eklipsa said:

if i select land somewhere he start the burn but he stop when is hitting the 20k altitude...  and ofc the ship is destroy it.

All I've been able to accomplish is having them kamikaze into the terrain, it does look like something is broken in the logic there. @sarbian if you think is an issue now I'll gather logs and post them for you.

If anyone has more ideas how to make it work I'm listening :)

 

Link to comment
Share on other sites

24 minutes ago, eklipsa said:

if i select land somewhere he start the burn but he stop when is hitting the 20k altitude...  and ofc the ship is destroy it.

A while back I looked through the land anywhere code and it feels like there is a serious bug in it:  it appears to immediately shift you to the final descent logic that normally should be activated only after you have completed a braking burn to bring you to a stop some distance above the surface.  If your horizontal velocity is low enough  this works but if you're in orbit it does not--it's trying to do something close to a suicide burn that is mostly horizontal and yet be vertical at the end of it.  Furthermore, I can't follow the altitude logic, it appears to be calculating the burn based on the current terrain height, not the terrain height where you will actually touch down.  For landing a rocket that's pretty much stationary above the surface that is fine but I've watched it do a burn that looks like it was aimed about half a kilometer underground (and the terrain was rising steeply, that half kilometer could easily be the difference between where I started it and where it came down.)

I have not dug into it deeply enough to have any idea of how to fix it, let alone actually write a fix.

Link to comment
Share on other sites

4 hours ago, Loren Pechtel said:

I have not dug into it deeply enough to have any idea of how to fix it, let alone actually write a fix.

More time I spend with it the more it feels only partially implemented. Two things to put on the list:

1. Doesn't show the burns it intends to do like say the rendezvous autopilot

2. It must.do.a.plane-change.burn. To confirm the lack of logic I had it do its plane-change burn, then turned it off and back on again, and its status was plane change and it wanted to do another orbit to do a .0002m/s burn... well actually with this location by the time it orbited again it would have to make a significant burn to have the orbital plane oriented as accurately as it was right at that moment. So it needs some judgment, <Xm/s plane differential let's skip that. It would also be handy to have an override so you can tell it to get on with landing already.

It is still quite handy in its current form, I just landed all my base pieces pure manual by just using its landing point prediction. Detach unit, minor normal/anti-normal burn to align plane, then two-part burn near the target to first get downrange and then crossrange on target. Doing it that way was relatively easy to get them dropping pretty much straight down on the target, all of them have landed within 200m of target.

j7UluUv.jpg

Edited by vossiewulf
Link to comment
Share on other sites

8 hours ago, Loren Pechtel said:

Furthermore, I can't follow the altitude logic, it appears to be calculating the burn based on the current terrain height, not the terrain height where you will actually touch down.

I suggest you re-read the code because it is using the landing site altitude (the obscurely named properties LandingAltitude). The actual problem is that PQS are not loaded from afar and that altitude may be wrong when half an orbit away.

The landing AP is far from perfect but I use it often and it works fine here...

Link to comment
Share on other sites

Landing AP is a little twitchy at times, but I must have landed at least 30 large bases in MKS, clustering 6-7 within a 150m center point just fine. I rely on it extensively.

As already mentioned, you need to have a good control point that is oriented correctly. My only serious problems came from not doing that.

Minmus has mountains.  The best way to avoid them is to start from a higher orbit. Landing AP takes a much steeper angle when starting from a higher orbit. Easy to do on Minmus

If you need pinpoint accuracy, try to have a TWR between 1.5 and 2. Landing AP can usually get you to <1m difference if you keep TWR in that range

Link to comment
Share on other sites

2 hours ago, sarbian said:

I suggest you re-read the code because it is using the landing site altitude (the obscurely named properties LandingAltitude). The actual problem is that PQS are not loaded from afar and that altitude may be wrong when half an orbit away.

The landing AP is far from perfect but I use it often and it works fine here...

I'm talking only about the Land anywhere function.  It appears to jump directly to final descent mode which can be catastrophic if you are carrying a lot of horizontal velocity.  I have no problem with land at target other than the general problem KSP has with craft that aren't maneuverable enough.

9 hours ago, vossiewulf said:

More time I spend with it the more it feels only partially implemented. Two things to put on the list:


2. It must.do.a.plane-change.burn. To confirm the lack of logic I had it do its plane-change burn, then turned it off and back on again, and its status was plane change and it wanted to do another orbit to do a .0002m/s burn... well actually with this location by the time it orbited again it would have to make a significant burn to have the orbital plane oriented as accurately as it was right at that moment. So it needs some judgment, <Xm/s plane differential let's skip that. It would also be handy to have an override so you can tell it to get on with landing already.

I wouldn't really call this partially implemented, although I do agree about the behavior.  I've never actually tried it but my read of the code is that it goes through every phase no matter what.  I do agree it should skip sufficiently small burns--it knows to do that in orbital maneuvering.  I strongly doubt you could reproduce this other than by turning it off and on after the plane change burn--getting a landing spot exactly under the orbital track would be hard indeed.  I won't ding him for this.

Link to comment
Share on other sites

2 hours ago, Loren Pechtel said:

I'm talking only about the Land anywhere function.  It appears to jump directly to final descent mode which can be catastrophic if you are carrying a lot of horizontal velocity.  I have no problem with land at target other than the general problem KSP has with craft that aren't maneuverable enough.

This is very true. I find I have to kill the horizontal velocity manually to the point where I can drop at a fairly steep angle. It's better to start higher if you want to use land anywhere.

Link to comment
Share on other sites

35 minutes ago, Gilph said:

This is very true. I find I have to kill the horizontal velocity manually to the point where I can drop at a fairly steep angle. It's better to start higher if you want to use land anywhere.

i try it from 200k on Kerbin, how more high ?!?!?!... is just dont work,if i do target select he dont burn, if i select land somewhere  he burn but stop when he still have 20k.

Link to comment
Share on other sites

32 minutes ago, eklipsa said:

i try it from 200k on Kerbin, how more high ?!?!?!... is just dont work,if i do target select he dont burn, if i select land somewhere  he burn but stop when he still have 20k.

Sorry, but I don't know that.  I never do a powered land on Kerbin.  I always do an unpowered landing with heat shields and chutes.  I would think 200K is a bit high to start, there is a lot of acceleration that happens before you hit the atmosphere. I have done it on Duna, and land anywhere works well there..

Link to comment
Share on other sites

10 hours ago, Gilph said:

If you need pinpoint accuracy, try to have a TWR between 1.5 and 2. Landing AP can usually get you to <1m difference if you keep TWR in that range

I understand that no lower a TWR  would be a constraint, but could I have a higher TWR and still have reasonable expectation of landing accuracy?

Link to comment
Share on other sites

10 minutes ago, Brigadier said:

I understand that no lower a TWR  would be a constraint, but could I have a higher TWR and still have reasonable expectation of landing accuracy?

Yes.  I find that when you hit the 500m height with a higher TWR engine, there is a sudden stop that can throw off the accuracy a little, maybe up to 20-30m.  Not bad for everyday use, but I needed to position my bases just so, and that would be a big miss for me.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...