Jump to content

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


sarbian

Recommended Posts

Question about function of ascent guidance.

 

is there a way for me to have it stage while there still is fuel in the bottom stage? I wanna make a reusable rocket and do propulsive landings.

Link to comment
Share on other sites

Posted (edited)

Firstly, many thanks for working on such a useful piece of kit!

Using Smart RCS, it appears clicking off the "Use RCS for rotation" button means that MJ will still turn on the yaw/pitch/roll actuation on my RCS modules, but when I hit wasdqe it temporarily turns them off.  So *my* rotation actions don't use RCS, but MJ still feels free to use RCS for rotation.  This is my experience with both dev and master.

Q: Am I understanding things correctly, the behavior I'm seeing is expected/intended?  Or is it a bug (presumably an interaction with another mod) which I should try to isolate?  I ask only because everything I find via Google suggests "turn yaw/pitch/roll actuation toggles off" should make MJ use the reaction wheels, but clearly that's not what's happening. 

Q: Assuming this is normal behavior, is there somewhere a setting for "actually leave the RCS rotation actuation toggles off, and only use the reaction wheels"?

Thanks!

Edit: This is for a 4.7-ton lander using the Munar Excursion Module, so the RCS is pretty powerful, and a bit off-center.  When I turn the RCS thrust limiter down to 15%, the problem (mostly) goes away.  Could the Attitude Adjustment module be seeing things get wildly out of envelope, and start using RCS in desperation?

Edit2: This github issue #979 being marked as a bug suggests this is not intended behavior after all?

Perhaps relatedly, I was also separately having exactly this guy's problem with the rockets stuttering and MJ firing RCS to turn off-target.  This problem also went away when I turned the RCS thrust limiter down to 15%.

The moral seems to be that very powerful unbalanced RCS thrusters, such as found on the Munar Exclusion Module, can cause problems for MechJeb.  Luckily the fix is easy - turn down the power, or balance the RCS thrusters.

If any of this is still of interest, I'm happy to supply logs, .craft file, whatever helps.  Cheers!

Edited by Max Headroom
Link to comment
Share on other sites

16 hours ago, Oaterson said:

is there a way for me to have it stage while there still is fuel in the bottom stage? I wanna make a reusable rocket and do propulsive landings.

I use SmartParts for this. Then you can stage or action group on a % of fuel left in the tank, for example. I also use SASAG which lets you control SAS settings from action groups. 

Link to comment
Share on other sites

Posted (edited)

Is there any way to control throttle with the Scripting Module?

Also, I tried launching to rendezvous, but it launched "backwards" in the opposite direction of target orbit. Any idea where I went wrong?

 

Edited by dlrk
Link to comment
Share on other sites

Posted (edited)
On 6/1/2024 at 11:24 AM, dlrk said:

Is there any way to control throttle with the Scripting Module?

Also, I tried launching to rendezvous, but it launched "backwards" in the opposite direction of target orbit. Any idea where I went wrong?

 

A suggestion I have for you is to try this mod which gives you throttle setting action groups, then using the MJ scripting module's action group triggers;
 



-------------------------------------------------------------------------------------------------------------
@sarbian A question I have about the MJ is scripting module is how the target body function is supposed to work? I can't seem to get it to do anything. I am playing with OPM, and see all the extra bodies in the list. I'm also using an MM script to further alter orbital parameters of all the bodies. Perhaps I need to test the target body scripting function in a more stripped down, clean install with just MJ and go from there.

Edited by Errol
Link to comment
Share on other sites

I've tried searching, but I found no explicit answer.

 

In the ascent profile editor, what does "Automatic altitude turn" do exactly? I finally opted to de-select it and I see it allows me to edit my final turn altitude (something I wished for a long time).

Is that all there is to it? It automatically sets altitude for horizontalizing?

Link to comment
Share on other sites

  • 2 weeks later...
2 hours ago, hellothere___ said:

whenever i use it to get to the mun, i see a periapsis until i get into the mun's sphere of influence. then it just sends me onto a trajectory that makes me crash. what do i do?
 

That may have something to do with how your orbits are drawn. In the settings, under Graphics, there's an option to change "Conic Patch Draw mode". The default is Relative, which can be a little weird, I prefer to use Local to Body, as it will draw exactly what my orbits will be around a specific moon or planet, i.e. Mun or Minmus, while transferring.

Link to comment
Share on other sites

 

On 6/15/2024 at 12:43 PM, GuessingEveryDay said:

That may have something to do with how your orbits are drawn. In the settings, under Graphics, there's an option to change "Conic Patch Draw mode". The default is Relative, which can be a little weird, I prefer to use Local to Body, as it will draw exactly what my orbits will be around a specific moon or planet, i.e. Mun or Minmus, while transferring.

i might have fixed it. apparently setting the orbit to 20 km around the mun was making it go 20 km away from the core and thats underground.

Link to comment
Share on other sites

  • 2 weeks later...

Are there any tutorial videos on MJ Landing Guidance specifically for RO/RSS RP-1 Moon landing with MechJeb?

I'm having some issues for which I want to find the cause.

1. Auto-Warp on descent has to stop and start every couple of seconds since it seems MJ isn't accounting for persistent rotation during warp. As the craft drifts X degrees from retrograde, warp stops, RCS attempts to correct, as soon as it's back on retrograde it warps again but the angular momentum just causes it to go off again... And the cycle repeats.  Is MJ expecting no rotation during auto-warp?  Making this function incompatible with  RealismOverhaul?

2.  Anyone know the optimal TWR for MJ Landing Guidance for the RSS Moon? 

3.  For ROEngines that are unthrottleable, the rapid succession of feathering the throttle insures an ignition failure will definitely happen.  For other ROEngines that have throttle but maybe take a second to spool up, MJ will misjudge the suicide burn countdown. 

 

Edited by Ker Ball One
Link to comment
Share on other sites

  • 2 weeks later...
On 6/26/2024 at 1:45 AM, Ker Ball One said:

Are there any tutorial videos on MJ Landing Guidance specifically for RO/RSS RP-1 Moon landing with MechJeb?

I'm having some issues for which I want to find the cause.

1. Auto-Warp on descent has to stop and start every couple of seconds since it seems MJ isn't accounting for persistent rotation during warp. As the craft drifts X degrees from retrograde, warp stops, RCS attempts to correct, as soon as it's back on retrograde it warps again but the angular momentum just causes it to go off again... And the cycle repeats.  Is MJ expecting no rotation during auto-warp?  Making this function incompatible with  RealismOverhaul?

2.  Anyone know the optimal TWR for MJ Landing Guidance for the RSS Moon? 

3.  For ROEngines that are unthrottleable, the rapid succession of feathering the throttle insures an ignition failure will definitely happen.  For other ROEngines that have throttle but maybe take a second to spool up, MJ will misjudge the suicide burn countdown. 

 

  1.  Is Persistent Rotation a required mod now for RO?  And yes, The Descent AP commands an attitude that if deviated from will cause it to want to correct that and it will come out of warp to do so if necessary.  To put it another way, regardless of if autowarp is on or off,  the DAP will maintain a set attitude all the way through descent. That's realistic and to be expected. It's not going to allow the vehicle to pitch, yaw, and roll uncontrollably. How do you control your attitude through autowarp normally? Or is that just not a thing with PR?
  2. According to ULA: "The optimum thrust to weight ratio at the start of the descent burn is in the 0.35 to 0.5 range (using Earth weight). At touchdown, the thrust to weight ratio should be about 0.15 (thrust slightly less than weight in lunar gravity)."
  3. Sadly, this has always been an issue for MJ, especially ignition issues. And especially with limited ignition. I don't use RO anymore but I ended up disabling the limited ignition feature. In fact, that gets patched out of my game by default even without RO. And I think none of the engines I have (added through mods) are unthrottleable. But it should be trivial to add a check that if any engines are unthrotttleable then don't try at all. (if you have a mix of engines though, that probably would be a bad idea). For the second part, yeah, MJ does not handle spooling at all. It needs to add spool time to the suicide countdown. (Did LMDE have a spool time? I think it maintained some level of thrust all the way down, which is also not something MJ does well.)
Link to comment
Share on other sites

On 7/7/2024 at 3:39 PM, Starwaster said:
  1.  Is Persistent Rotation a required mod now for RO?  And yes, The Descent AP commands an attitude that if deviated from will cause it to want to correct that and it will come out of warp to do so if necessary.  To put it another way, regardless of if autowarp is on or off,  the DAP will maintain a set attitude all the way through descent. That's realistic and to be expected. It's not going to allow the vehicle to pitch, yaw, and roll uncontrollably. How do you control your attitude through autowarp normally? Or is that just not a thing with PR?
  2. According to ULA: "The optimum thrust to weight ratio at the start of the descent burn is in the 0.35 to 0.5 range (using Earth weight). At touchdown, the thrust to weight ratio should be about 0.15 (thrust slightly less than weight in lunar gravity)."
  3. Sadly, this has always been an issue for MJ, especially ignition issues. And especially with limited ignition. I don't use RO anymore but I ended up disabling the limited ignition feature. In fact, that gets patched out of my game by default even without RO. And I think none of the engines I have (added through mods) are unthrottleable. But it should be trivial to add a check that if any engines are unthrotttleable then don't try at all. (if you have a mix of engines though, that probably would be a bad idea). For the second part, yeah, MJ does not handle spooling at all. It needs to add spool time to the suicide countdown. (Did LMDE have a spool time? I think it maintained some level of thrust all the way down, which is also not something MJ does well.)

1.  RealismOverhaul has it's own implementation of PersistentRotation without actually needing that additional mod.  It makes sense that attitude control would be needed during the entire descent.  The way attitude is controlled through warp, is to use Physics-Warp (max 4x).  SAS and MJ can keep attitude control through that.  The issue is that MJ auto-warps at high warp because there is nothing that prevents such warp during lunar descent until much closer to the surface.  The solution is that MJ detect the presence of mods like PersistentRotation and RealismOverhaul, and only do physics-warp during descent since it requires constant attitude control.

2.  So with Lunar gravity being 1/6th that of Earth, that is a TWR of the moon between 2 and 3?  Makes sense. 
3.  My issue is probably too much TWR for MJ to calculate a good burn timing.  MJ does account for some spooling, as there are several code snippets related to spool time.  The LMDE does spool but faster, and has a wider range of throttle.  But since the LMDE was designed for Lunar descent, it had a reasonable TWR.  I was having serious problems when using an engine with a longer spool time, narrower throttle range, and TWR of 10.  I tested with 3 engines (TWR > 30) which amplified the problem.  So it seems MJ is designed to handle all these parameters (since 2014), but only within reason.  Too much TWR and spool time, and it cannot hit such a precise timing. 

Edited by Ker Ball One
Link to comment
Share on other sites

  • 3 weeks later...

Hello! I've recently had to reinstall my MechJeb to get the most recent version, but the menu for MechJeb in game doesn't show up even though I have it installed. Has anyone else encountered this issue? Thanks in advance!

(Edit): Solved the issue! I fixed it by installing MechJeb from CKAN

Edited by BorfoandShnogs
Fixed the issue I was asking on
Link to comment
Share on other sites

Hello!!!It appears that all the versions after  #1253 the Delta-V Stats Windows are flickering and the same thing happens if you add in a custom window a DV readout.

The 1253 is the last version that doesn't do it for me.

I don't know if it helps but its what i found after testing in which version the flickering happens and it begins at dev version #1254

https://ksp.sarbian.com/jenkins/job/MechJeb2-Dev/1254/

Link to comment
Share on other sites

  • 2 weeks later...
  • 5 weeks later...

In the recent dev versions, the scripting module is missing - has it been removed?

EDIT: Also, the DeltaV readout doesn't work in the latest dev version - perhaps it has an incompatibility with cryoengines? Has anyone else tried the current Mechjeb dev version with Cryo Engines and can confirm/deny?

 

Log:https://file.io/BNaBk6HVah61

Edited by dlrk
Link to comment
Share on other sites

Took a look at my log file - it appears this is what's happening -
 

[LOG 17:36:17.636] [MechJeb2] Exception in MechJebLib.FuelFlowSimulation.FuelFlowSimulation: System.AggregateException: One or more errors occurred. ---> System.Exception: FuelFlowSimulation hit max steps of 100 steps in rcs calculations
  at MechJebLib.FuelFlowSimulation.FuelFlowSimulation.SimulateRCS (MechJebLib.FuelFlowSimulation.SimVessel vessel, System.Boolean max) [0x0004a] in <1c9d42023c6f451f9730b1cc64104c7f>:0
  at MechJebLib.FuelFlowSimulation.FuelFlowSimulation.ComputeRcsMinValues (MechJebLib.FuelFlowSimulation.SimVessel vessel) [0x00000] in <1c9d42023c6f451f9730b1cc64104c7f>:0
  at MechJebLib.FuelFlowSimulation.FuelFlowSimulation.SimulateStage (MechJebLib.FuelFlowSimulation.SimVessel vessel) [0x0001e] in <1c9d42023c6f451f9730b1cc64104c7f>:0
  at MechJebLib.FuelFlowSimulation.FuelFlowSimulation.Run (System.Object o) [0x00043] in <1c9d42023c6f451f9730b1cc64104c7f>:0
  at System.Threading.Tasks.Task`1[TResult].InnerInvoke () [0x0002b] in <9577ac7a62ef43179789031239ba8798>:0
  at System.Threading.Tasks.Task.Execute () [0x00010] in <9577ac7a62ef43179789031239ba8798>:0
   --- End of inner exception stack trace ---
---> (Inner Exception #0) System.Exception: FuelFlowSimulation hit max steps of 100 steps in rcs calculations
  at MechJebLib.FuelFlowSimulation.FuelFlowSimulation.SimulateRCS (MechJebLib.FuelFlowSimulation.SimVessel vessel, System.Boolean max) [0x0004a] in <1c9d42023c6f451f9730b1cc64104c7f>:0
  at MechJebLib.FuelFlowSimulation.FuelFlowSimulation.ComputeRcsMinValues (MechJebLib.FuelFlowSimulation.SimVessel vessel) [0x00000] in <1c9d42023c6f451f9730b1cc64104c7f>:0
  at MechJebLib.FuelFlowSimulation.FuelFlowSimulation.SimulateStage (MechJebLib.FuelFlowSimulation.SimVessel vessel) [0x0001e] in <1c9d42023c6f451f9730b1cc64104c7f>:0
  at MechJebLib.FuelFlowSimulation.FuelFlowSimulation.Run (System.Object o) [0x00043] in <1c9d42023c6f451f9730b1cc64104c7f>:0
  at System.Threading.Tasks.Task`1[TResult].InnerInvoke () [0x0002b] in <9577ac7a62ef43179789031239ba8798>:0
  at System.Threading.Tasks.Task.Execute () [0x00010] in <9577ac7a62ef43179789031239ba8798>:0 <---

@sarbian

Link to comment
Share on other sites

On 9/16/2024 at 7:27 AM, dlrk said:

In the recent dev versions, the scripting module is missing - has it been removed?

EDIT: Also, the DeltaV readout doesn't work in the latest dev version - perhaps it has an incompatibility with cryoengines? Has anyone else tried the current Mechjeb dev version with Cryo Engines and can confirm/deny?

 

Log:https://file.io/BNaBk6HVah61

16 hours ago, dlrk said:

Took a look at my log file - it appears this is what's happening -
 

[LOG 17:36:17.636] [MechJeb2] Exception in MechJebLib.FuelFlowSimulation.FuelFlowSimulation: System.AggregateException: One or more errors occurred. ---> System.Exception: FuelFlowSimulation hit max steps of 100 steps in rcs calculations
  at MechJebLib.FuelFlowSimulation.FuelFlowSimulation.SimulateRCS (MechJebLib.FuelFlowSimulation.SimVessel vessel, System.Boolean max) [0x0004a] in <1c9d42023c6f451f9730b1cc64104c7f>:0
  at MechJebLib.FuelFlowSimulation.FuelFlowSimulation.ComputeRcsMinValues (MechJebLib.FuelFlowSimulation.SimVessel vessel) [0x00000] in <1c9d42023c6f451f9730b1cc64104c7f>:0
  at MechJebLib.FuelFlowSimulation.FuelFlowSimulation.SimulateStage (MechJebLib.FuelFlowSimulation.SimVessel vessel) [0x0001e] in <1c9d42023c6f451f9730b1cc64104c7f>:0
  at MechJebLib.FuelFlowSimulation.FuelFlowSimulation.Run (System.Object o) [0x00043] in <1c9d42023c6f451f9730b1cc64104c7f>:0
  at System.Threading.Tasks.Task`1[TResult].InnerInvoke () [0x0002b] in <9577ac7a62ef43179789031239ba8798>:0
  at System.Threading.Tasks.Task.Execute () [0x00010] in <9577ac7a62ef43179789031239ba8798>:0
   --- End of inner exception stack trace ---
---> (Inner Exception #0) System.Exception: FuelFlowSimulation hit max steps of 100 steps in rcs calculations
  at MechJebLib.FuelFlowSimulation.FuelFlowSimulation.SimulateRCS (MechJebLib.FuelFlowSimulation.SimVessel vessel, System.Boolean max) [0x0004a] in <1c9d42023c6f451f9730b1cc64104c7f>:0
  at MechJebLib.FuelFlowSimulation.FuelFlowSimulation.ComputeRcsMinValues (MechJebLib.FuelFlowSimulation.SimVessel vessel) [0x00000] in <1c9d42023c6f451f9730b1cc64104c7f>:0
  at MechJebLib.FuelFlowSimulation.FuelFlowSimulation.SimulateStage (MechJebLib.FuelFlowSimulation.SimVessel vessel) [0x0001e] in <1c9d42023c6f451f9730b1cc64104c7f>:0
  at MechJebLib.FuelFlowSimulation.FuelFlowSimulation.Run (System.Object o) [0x00043] in <1c9d42023c6f451f9730b1cc64104c7f>:0
  at System.Threading.Tasks.Task`1[TResult].InnerInvoke () [0x0002b] in <9577ac7a62ef43179789031239ba8798>:0
  at System.Threading.Tasks.Task.Execute () [0x00010] in <9577ac7a62ef43179789031239ba8798>:0 <---

@sarbian

This is happening for me too, apparently with Artemis Construction Kit's auxiliary thrusters specifically (with RSS/RO configs by Skypheonix). The issue occurred with BDB Saturn V/Apollo as well, although I haven't identified the exact part there. I guess I will revert to the previous versions until this is fixed.

Edited by 1something
Link to comment
Share on other sites

On 9/16/2024 at 12:15 PM, dlrk said:

Took a look at my log file - it appears this is what's happening -
 

[LOG 17:36:17.636] [MechJeb2] Exception in MechJebLib.FuelFlowSimulation.FuelFlowSimulation: System.AggregateException: One or more errors occurred. ---> System.Exception: FuelFlowSimulation hit max steps of 100 steps in rcs calculations
  at MechJebLib.FuelFlowSimulation.FuelFlowSimulation.SimulateRCS (MechJebLib.FuelFlowSimulation.SimVessel vessel, System.Boolean max) [0x0004a] in <1c9d42023c6f451f9730b1cc64104c7f>:0
  at MechJebLib.FuelFlowSimulation.FuelFlowSimulation.ComputeRcsMinValues (MechJebLib.FuelFlowSimulation.SimVessel vessel) [0x00000] in <1c9d42023c6f451f9730b1cc64104c7f>:0
  at MechJebLib.FuelFlowSimulation.FuelFlowSimulation.SimulateStage (MechJebLib.FuelFlowSimulation.SimVessel vessel) [0x0001e] in <1c9d42023c6f451f9730b1cc64104c7f>:0
  at MechJebLib.FuelFlowSimulation.FuelFlowSimulation.Run (System.Object o) [0x00043] in <1c9d42023c6f451f9730b1cc64104c7f>:0
  at System.Threading.Tasks.Task`1[TResult].InnerInvoke () [0x0002b] in <9577ac7a62ef43179789031239ba8798>:0
  at System.Threading.Tasks.Task.Execute () [0x00010] in <9577ac7a62ef43179789031239ba8798>:0
   --- End of inner exception stack trace ---
---> (Inner Exception #0) System.Exception: FuelFlowSimulation hit max steps of 100 steps in rcs calculations
  at MechJebLib.FuelFlowSimulation.FuelFlowSimulation.SimulateRCS (MechJebLib.FuelFlowSimulation.SimVessel vessel, System.Boolean max) [0x0004a] in <1c9d42023c6f451f9730b1cc64104c7f>:0
  at MechJebLib.FuelFlowSimulation.FuelFlowSimulation.ComputeRcsMinValues (MechJebLib.FuelFlowSimulation.SimVessel vessel) [0x00000] in <1c9d42023c6f451f9730b1cc64104c7f>:0
  at MechJebLib.FuelFlowSimulation.FuelFlowSimulation.SimulateStage (MechJebLib.FuelFlowSimulation.SimVessel vessel) [0x0001e] in <1c9d42023c6f451f9730b1cc64104c7f>:0
  at MechJebLib.FuelFlowSimulation.FuelFlowSimulation.Run (System.Object o) [0x00043] in <1c9d42023c6f451f9730b1cc64104c7f>:0
  at System.Threading.Tasks.Task`1[TResult].InnerInvoke () [0x0002b] in <9577ac7a62ef43179789031239ba8798>:0
  at System.Threading.Tasks.Task.Execute () [0x00010] in <9577ac7a62ef43179789031239ba8798>:0 <---

@sarbian

also happening to some of my rockets too 

here is the full log https://filebin.net/57lpw0mjokdwoutp

Link to comment
Share on other sites

On 9/15/2024 at 10:27 PM, dlrk said:

In the recent dev versions, the scripting module is missing - has it been removed?

Yes, it's been removed - I read somewhere (GitHub? Discord? here?) that the intention is to add bindings to kOS possibly one day (from memory) which would be much better.

I have used the scripting module in the past: it's useful for basic sequencing (LEO to LLO), and needed some usability and functionality love. It's removal made me actually try kOS for the first time (I know I've been missing out), though there's no MJ/kOS bindings (yet). It was fun to build simple launch scripts up to something more complex. I've seen that there are MJ bindings for KRPC tho, perhaps I'll try that next time.

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