Jump to content

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


sarbian

Recommended Posts

Ok, so I built a simple VTOL craft with 4 liquid engines and I would like to be able to control it like a quadcopter drone... more specifically, control it like a DJI Phantom drone.

When I let off the controls I want the VTOL craft to automatically kill it's horizontal and vertical velocities. 

I have Throttle Controlled Avionics installed, so the balance of the engine output is good. Can Mechjeb do what I want it to do or is there another mod I need to install?

Jb3R72J.png

Edited by Voodoo8648
Link to comment
Share on other sites

On 5/12/2017 at 1:33 AM, maculator said:

Okay I got a bug. It's the thing about setting target while mj is doing its thing.

It's not just while using ascent guidance it's everytime he's burning and you set a target. He then just throttles to 100% and refuses to stop until you shut him down.

It's in the latest dev build on the latest KSP and quite easy to reproduce:

-let him execute a maneucer and then set a target while hes burning.

 

If you need a log I can provide one.

I had a "bug" like this, IIRC I had done something silly, and not realized it had kept settings across quicksave loads/ship changes. Something like turn on assent and descent guidance at the same time?

Unrelated, but a general question, is there anything I can do to improve landing guidance with aerodynamic parts? I might try the "trajectory" mod instead, or KOS (oh dear, there is a LOT of programming needed for that), but basically I'm using Mechjeb to automate SpaceX style landings.

In the past to avoid Mechjeb getting confused, I've just not put aerodynamic parts on the craft, but the new simulation of vehicle aero and wanting the rocket to look nicer/control better, I've got a few on it, and it REALLY messes up the landing prediction, as it assumes I'm going to glide and float all the way down, across and loop the loops... so I can be an entire continent off on prediction. :(

Link to comment
Share on other sites

2 hours ago, Bit Fiddler said:

on the landing guidance window I see some text "Mode SafeDecentSpeedPolicy (False)"  what is this telling me?  is this the reason I keep "landing" at 100km/s?

 

 

It's telling you (not very clearly) that the landing mode is 'SafeDescentSpeedPolicy' and 'false' means that it is not going to use the atmosphere to brake. (either there was no atmosphere or it was too thin for sufficient braking)

what is your TWR ratio? It has to at least be > 1 at some point 

Link to comment
Share on other sites

mun landing, TWR 2+.    select point on map in a circular orbit at 100K.  turn on auto pilot, all seems to be going well up until impact at over 100m/s  I said 100km/s before but that was a typo.   oh well I have deleted that craft now any way and have gone back to the drawing board in my design.  so I will see what happens with the next one.

Link to comment
Share on other sites

5 minutes ago, Bit Fiddler said:

mun landing, TWR 2+.    select point on map in a circular orbit at 100K.  turn on auto pilot, all seems to be going well up until impact at over 100m/s  I said 100km/s before but that was a typo.   oh well I have deleted that craft now any way and have gone back to the drawing board in my design.  so I will see what happens with the next one.

Check EC, comm signal, fuel levels on the descent (uncommon, but I've been caught out by it in the past).

For Mun/Minmus, I generally start descents at 30-40km altitude.  A TWR of at least 1.5 (as measured against the surface gravity) is good, 2.0-3.0 is better.  Lower TWRs just take longer to decelerate, so the landing burn starts far sooner.  At 500m above the target, MJ likes to stop burning sideways and then come down on the target vertically.

Link to comment
Share on other sites

i had 1500 delta-v and it was manned so no com signal to worry about.  at impact the throttle was only at half and the fuel tank still half full.   i was assuming it was going to go full power for the last few hundred feet to slow down but it just coasted in on half power until impact.   like i said however that craft is scrapped and designing a new lander so i will just look at this again later after the new one is built.  

 

my assumption is it was the engines i used.  MJ probably did not know how to compute their thrust correctly or something along these lines.  they are monopropellant engines if this makes any difference.  does MJ assume they are RCS and will not use them as a main?    any way no worried i will test again with the new lander some other day.

Link to comment
Share on other sites

25 minutes ago, Bit Fiddler said:

feet

There you go, thats the problem!

But serious: mj sometimes screws up landing I always assumed its because he has probleems with the terrain. I just quicksave before I hand over and I usually do the deorbit and approach myself.

If you just let him do the final ~1000m he mostly gets it together.

Link to comment
Share on other sites

49 minutes ago, Bit Fiddler said:

my assumption is it was the engines i used.  MJ probably did not know how to compute their thrust correctly or something along these lines.  they are monopropellant engines if this makes any difference.  does MJ assume they are RCS and will not use them as a main?    any way no worried i will test again with the new lander some other day.

No,  it can't get confused that way. Things we call engines are defined on the part as ModuleEngines or ModuleEnginesFX (which is a child of ModuleEngines). That's what determines if it is an 'engine', not the propellant used or how many propellants is uses. I could make a new resource called VespeneGas and make an engine that can use it and MJ2 will handle it just fine. (WE REQUIRE MORE!)

Here's a thing to try, as a workaround: Cancel the landing while there is still time for the suicide burn (if you don't have that displayed on one of MJs windows then you should add it)

Then click 'land anywhere'.

Just a suspicion but I'm thinking maybe if it's not on course and doesn't have time for a course correction that it might not go to the final landing phase. Probably an issue in its logic somewhere. Land Anywhere on the other hand doesn't care if it's 'off course' because it doesn't have a course to adhere to... 

Link to comment
Share on other sites

all good things to try... However the whole idea for this was to test how accurate MJ could land my colony bits on the mun.  I was hoping it would be accurate enough to get them to land within 10m or so from each other to avoid long overland treks to get them all to the wanted destination.   may just have to go overboard on the Delta-v and for the final landing use TCA to hover them the last few Km or what ever is needed to get them all in the correct spot.   but as it stands now i am looking at making a rover to move all the colony bits around any way for the assembly process...  maybe just have to move them further than planned.

 

on a side note...  i did switch out the monopropellant engines for LFO and it landed fine.   the lander had to be modified quite a bit to accommodate this change so not sure if the engine choice was to blame or not.  however this brought up a new problem.   not tied to MJ i do not think, as i have seen it while not using time warp from the landing process...  but when time warp is engaged the system glitches, and i do not just compress time but the lander actually warps about 20 km, thus i am now far beyond my planned landing spot.   but this happened even when i manually hit the time warp buttons, not just when MJ did the auto warp.  so ya, new round of head scratching.

Edited by Bit Fiddler
Link to comment
Share on other sites

Terrain is the usual culprit. I currently do not have a way to get the actual altitude of the terrain from orbit. I get an approximation that can be quite false in places where the terrain is complex. 

Crashing on the side of a mountain while decelerating is the other one.

Link to comment
Share on other sites

1 hour ago, sarbian said:

Terrain is the usual culprit. I currently do not have a way to get the actual altitude of the terrain from orbit. I get an approximation that can be quite false in places where the terrain is complex. 

Crashing on the side of a mountain while decelerating is the other one.

There are places messed up enough that the stop at 500m up isn't enough to compensate for the terrain??

I have seen it fly my rocket into the terrain with land here but never with land at target.  Looking at the code gives me the definite impression that land here doesn't do the stop at 500m up, that it just does the final stage that normally is initiated from a zero velocity 500m above the target.

Link to comment
Share on other sites

14 hours ago, Bit Fiddler said:

all good things to try... However the whole idea for this was to test how accurate MJ could land my colony bits on the mun.  I was hoping it would be accurate enough to get them to land within 10m or so from each other to avoid long overland treks to get them all to the wanted destination.   may just have to go overboard on the Delta-v and for the final landing use TCA to hover them the last few Km or what ever is needed to get them all in the correct spot.   but as it stands now i am looking at making a rover to move all the colony bits around any way for the assembly process...  maybe just have to move them further than planned.

 

on a side note...  i did switch out the monopropellant engines for LFO and it landed fine.   the lander had to be modified quite a bit to accommodate this change so not sure if the engine choice was to blame or not.  however this brought up a new problem.   not tied to MJ i do not think, as i have seen it while not using time warp from the landing process...  but when time warp is engaged the system glitches, and i do not just compress time but the lander actually warps about 20 km, thus i am now far beyond my planned landing spot.   but this happened even when i manually hit the time warp buttons, not just when MJ did the auto warp.  so ya, new round of head scratching.

MechJeb can do less than 10m accuracy for lunar missions. It cannot quite land on top of a docking port though (and I cannot do it manually, even after 100 tries XD ).

Link to comment
Share on other sites

56 minutes ago, Technical Ben said:

MechJeb can do less than 10m accuracy for lunar missions. It cannot quite land on top of a docking port though (and I cannot do it manually, even after 100 tries XD ).

In the old days with the old unrealistic aerodynamic system, MJ was unrealistically accurate to the point that it once landed me about 5 km from my Duna base. In fact it probably would have got closer except I overrode it at one point because it was too close to clipping the rim of the canyon the base was in.

(then I used the Translatron to hover the ship and tilt in the direction of the base until  I arrived at its doorstep

Link to comment
Share on other sites

20 minutes ago, Virtualgenius said:

I loved it when MJ would park the lander 0.5m away from stuff  you could get a nice close base going, again it was the older versions like starwasters I guess progress is making Sarbians job harder to code

Well, as I've also said before,MJ's accuracy is comparable to real life landers. If you look at the accuracy of past Mars landers, we've gotten more accurate over the years, but the most accurate lander so far was Curiosity and that required active guidance

Link to comment
Share on other sites

48 minutes ago, Virtualgenius said:

I loved it when MJ would park the lander 0.5m away from stuff  you could get a nice close base going, again it was the older versions like starwasters I guess progress is making Sarbians job harder to code

I think, that 10 meters is close enough. Landing precision depends also on TWR change during descent as far as I can tell. I had pinpoint landings and landings 100m away, when I staged during landing and there was abrupt change in engine TWR.

Link to comment
Share on other sites

Hi, i found the differential throttle checkbox, is any documentation available for that functionality? Does it only work for rear facing engines? Is it configurable?

I am asking this because I'd like to get rid of TCA and use this bit Instead.

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...