Jump to content

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


sarbian

Recommended Posts

17 minutes ago, Michel Bartolone said:

I've got a suggestion. I'm not sure if this is the right place or not. I'd like a 'crew' tab or crew info window, available in flight. Something that lists info on each kerbonaut, possibly just on the currently active vessel. It can list some simple info, like name, class (pilot, engineer, scientist), current mission time in space/on orbit, total number of missions, and total time in space. It would help with knowing which to rotate out of a station etc.

Check Ship Manifest. I think it will do.

Link to comment
Share on other sites

On 2/2/2019 at 11:16 PM, Chimichanga said:

Yay!  Looks like dev#859 updated the ToDo file, including

  • Fix "launch to plane" to update the inclination field

 

bump. using latest dev builds post new year.  If you enter a negative number into the box it will be rejected.  try a positive one.  like for minmus instead of -6 try 354

Link to comment
Share on other sites

I am trying to add navigational waypoints for the airplane autopilot and autolanding.

currently the ability to add landing sites and runways are available and working.  

Has anyone been able to add a single location that can be brought up and used in flight?

idea is to use these to get close enough to runway and on correct side to initiate a landing.

Thanks for any ideas and or help.

Cheers.

Link to comment
Share on other sites

I've noticed that waypoints for rover navigation don't end up where you click. After a lot of trial and mostly error, I've found you have to click about twice as far away from the waypoint that you want. I wouldn't be surprised if airplane autopilot works the same way.

 

22 hours ago, drtedastro said:

I am trying to add navigational waypoints for the airplane autopilot and autolanding.

currently the ability to add landing sites and runways are available and working.  

Has anyone been able to add a single location that can be brought up and used in flight?

idea is to use these to get close enough to runway and on correct side to initiate a landing.

Thanks for any ideas and or help.

Cheers.

 

Link to comment
Share on other sites

Is there a way to set up a loop that says "while *My inclination* < 89° do such and such?  I can only do my target inclination, but I want to test off my own orbit parameters.  Also variables or relative changes would be nice)

 

What I want to write is this:

while self.inclination < 85
  {
    PlanManeuver(inclination, self.inclination = self.inclination + 5, optimal)
    Execute Maneuver(false)
    If self.periapsis.altitude < 150km
      {
        If self.periapsis.timeto < self.apoapsis.timeto
          {
            PlanManeuver(periapsis, 150km, now)
          }
        else
          {
            PlanManuver(periapsis, 150km, apoapsis)
          }
        ExecuteManeuver(true)
        }
    }
 PlanManeuver(circulize, 150km, altitude)
 ExecuteManeuver(true)
 SmartAss(sun, left, 0)

Well shoot...after all of that...maybe I do want to learn Kos...

Edited by traisjames
Link to comment
Share on other sites

On 2/8/2019 at 11:50 AM, Sokol_323 said:

In the latest version, the issue of bringing the plane into the plane has not been solved. This question was repeatedly raised on the forum. For example, I have a station in orbit Kerbin, which is launched from the launch site of Woomerang with an inclination of about  45 degrees. This means that the station passes approximately six times in six turns over the KSC. I launch visiting expeditions from the KSC launch site into the target plane using the MechJeb automatic script. MJ calculates the launch time itself and the spacecraft is displayed with a minimum deviation in the plane. Further, as in real flight: the adjustment of the difference of the angles of inclination of the orbits and the transition from one orbit to another using two maneuvers. The whole procedure from the moment of launch to the end of the docking takes no more than 2.5 turns. Such a scenario allows launching rockets with a minimum delta to enter a circular orbit with an altitude of about 100 km, and maneuvers in close proximity with the help of spacecraft engines and the fuel available in it. This is a very economical scheme that allows you to display objects in a plane with a minimum deviation of up to 1 km before docking. In the latest version of MJ, this script does not work. The spacecraft will be displayed in the plane with the inclination of the launch pad, which in the case of the KSC is 0 degrees. Accordingly, only about 2000 deltaV will be required for correcting the difference in the angles of inclination of the orbits. The previously proposed version using the rendezvous script in my case is not optimal due to the large difference in the orbital inclination angles and the need to accurately bring the spacecraft to the rendezvous height (this is difficult, because the orbit is not perfectly circular and the exact height of the orbit at the proposed meeting point is difficult to calculate ). Therefore, again, an additional delta is required to correct for the divergence and actual alignment of the spacecraft in the plane of the station orbit. Apparently the same 2,000 deltaV or so. The proposed scenario works fine on Mun or Minmus due to the low altitudes and the difference in orbital inclinations between the landing module and the main spacecraft or station in orbit, as well as the small cost of maneuvers in general. But it is completely unacceptable in the example I described.

Will the issue in this part of the work of automatic scripts MJ? In the meantime, I have to use the previous version of the mod, since there was no such problem and everything worked correctly.

Known issue:

https://github.com/MuMech/MechJeb2/issues/1105

I fixed a pile of issues with the scripting autopilot's ascent guidance but I broke that feature.

On 2/8/2019 at 9:50 AM, Gilph said:

Update:

Using less modded version and 862, I landed on Mun. ASL shows 4284m.

Using Ascent, the value for turn start is 4.3km, which is historically what I would expect, as previous versions have that value as just above surface ASL. This means the gravity turn starts after a few seconds. I leave all the values unchanged and set a high orbit alt of 500km. The gravity turn starts at roughly 8700, which is twice the starting surface ASL. So, it does appear to be ignoring the surface ASL.

If I turn off Automatic Altitude Turn in the Ascent Path Editor and set Turn start altitude to 0.5km, as @El Sancho suggested, the gravity turn started at 4800 km, which was correct.

The issue seems to be that the Automatic Altitude Turn part of the Classic Ascent profile is using sea level as a reference, not the ASL, during the ascent. The workaround seems to be to use the manual config, which uses relative to ASL settings which are correct.

Please let me know if there is anything else needed.

 

I think it always used to be relative to ASL which I changed for the manual setting here:

https://github.com/MuMech/MechJeb2/pull/1101

Probably another case of using altitudeASL or its equivalent somewhere in the path editor.

Link to comment
Share on other sites

10 hours ago, Jim DiGriz said:

Known issue:

https://github.com/MuMech/MechJeb2/issues/1105

I fixed a pile of issues with the scripting autopilot's ascent guidance but I broke that feature.

 

We are all grateful for your work. And I'm certainly not the сreator of mods and maybe poorly understand some things. But it is not clear why the changes of some functions of the mod break other equally important and useful functions. I'm using the dev version of the 831 that there are no reports of incompatibility with 1.6.1. Manually added a configuration file from a later version to avoid using an additional mod that adds MJ to all command pods. And everything works for me, all necessary functions work as it is necessary for me. Thank you again for your work. I hope that in the future update all current issues and problems will be fixed.

Link to comment
Share on other sites

11 hours ago, Sokol_323 said:

But it is not clear why the changes of some functions of the mod break other equally important and useful functions. 

Poor initial design.  To be fair the initial design only targeted how mechjeb was when it was written.  Now that the ascent functions have changed it is painfully obvious how brittle the initial scripting code was.

That got fixed to make it more extensible and more stable later, but it isn't completed yet.  And fixing it all, correctly, is difficult.

The whole scripting system should really be marked "experimental" since it needs some work.

Link to comment
Share on other sites

45 minutes ago, sarbian said:

The way it saves scripts is a pain that make adding new stuff hard without breaking saves...

Yeah, if you check out the approach I used to fix scripted ascents that should actually be more stable -- it should be as stable as the existing saving of .cfg file information to disk.  I think I might need some more defensive coding if options go away though since I think it might throw.

That approach should also probably be extended to every single other scripting module, but that'll likely entail breaking everything again.

It also wasn't made any better by the fact that I was hacking stuff up and kind of feeling my way around the MJ codebase when I was refactoring the ascent autopilot and I made some very questionable choices about which classes to hang state off of...  Now I sort of understand how it was supposed to be a Model/View/Controller kind of split up of tasks.

Anyway, I've got a pile of launch-to-plane work in the pipeline right now that I've been working on for the past week or two, I'll probably add fixing the scripting autopilot to the list...

Link to comment
Share on other sites

2 hours ago, KSPNoob said:

How do you set lead times?  Is there a way to have it so it starts at 50% of total burn time?

Lead time is often not 50%. Your vessel gets lighter as you burn fuel so you accelerate faster at the end of the burn. MJ accounts for that and this is why it does not burn at 50%.

Link to comment
Share on other sites

1 hour ago, Louis93 said:

I've just started using MechJeb2 for the first time and on the ascent guidance it's doing the gravity turn way too early and staying at around 20k altitude until it blows up/runs out of fuel, am I doing something wrong?

wJaF9q5.png

 

As shown by red arrow above, you can select three different styles of gravity turn. Since you are new, I suggest you use the one shown, the CLASSIC Ascent Profile

If you still have problems, tick the box below that, and a window will pop up where you can move a slider to the right to increase altitude at which gravity turn begins. Note that Orbit Altitude of 75km shown in this pic is not recommended; you should set it to 100km if it doesn't default to that. Note also some other options selected in picture are also non-standard. Auto-stage should be selected, for most purposes, but is not in picture. Limit Q should usually be left at default of 20,000 rather than lowered to 18,500 as shown in picture. Force Roll may or may not be desirable. In my case it keeps rocket steady; you should use only if rocket is rolling without it.

Also, since you are new, I will mention that Sarbian and Jim DiGriz are both coders of this mod. Advice or information received from them should be heeded above all others.

Link to comment
Share on other sites

2 hours ago, El Sancho said:

wJaF9q5.png

 

As shown by red arrow above, you can select three different styles of gravity turn. Since you are new, I suggest you use the one shown, the CLASSIC Ascent Profile

If you still have problems, tick the box below that, and a window will pop up where you can move a slider to the right to increase altitude at which gravity turn begins. Note that Orbit Altitude of 75km shown in this pic is not recommended; you should set it to 100km if it doesn't default to that. Note also some other options selected in picture are also non-standard. Auto-stage should be selected, for most purposes, but is not in picture. Limit Q should usually be left at default of 20,000 rather than lowered to 18,500 as shown in picture. Force Roll may or may not be desirable. In my case it keeps rocket steady; you should use only if rocket is rolling without it.

Also, since you are new, I will mention that Sarbian and Jim DiGriz are both coders of this mod. Advice or information received from them should be heeded above all others.

Thank you so much, it actually gets me to orbit now!

Link to comment
Share on other sites

36 minutes ago, Louis93 said:

Thank you so much, it actually gets me to orbit now!

I am very glad I could help.

As Robert Heinlein said long ago, "if you can get your ship into orbit, you are halfway to anywhere". Of course, that is only true in an allegorical sense, but it's still a useful thought. If I might offer another suggestion, Minmus is easier to land on than Mun. Minmus has a shallower gravity well, and also has the Flats, which offer large level areas in which to land.

Link to comment
Share on other sites

For some reason, mechjeb doesn't want to steer or recognize targets in ascent guidance anymore... Mechjeb suddenly stopped working, I reverted 3 times and then it worked, but the rocket was very wobbly, so I reverted thinking the other launches were just flukes. Since then Mechjeb has not been steering or recognizing targets... :(

KSP 1.3.1

Mechjeb2 2.7.0.0

Log: https://www.dropbox.com/s/jz058ae62dx0167/KSP.log?dl=0

 

Edited by Anders Kerman
added details
Link to comment
Share on other sites

23 hours ago, Anders Kerman said:

KSP 1.3.1

If you're stuck on 1.3.1 due to RSS/RO/RP-1 you should also be using the MJ-dev backports:

https://github.com/lamont-granquist/PrimerVectorMechJeb/releases

Otherwise I doubt anyone is going to be able to help you debug the 2.7.0.0 version -- I can't even recall what that code looked like any more.

Link to comment
Share on other sites

On 2/22/2019 at 6:20 PM, sarbian said:

Lead time is often not 50%. Your vessel gets lighter as you burn fuel so you accelerate faster at the end of the burn. MJ accounts for that and this is why it does not burn at 50%.

Just a comment that the lead time doesn't always appear to be calculated correctly, however: I've got an ion-drive ship that's been fired with a lead time of 0s.  (No lead - burn starts at the burn time.)  I'll try to get a reasonably-sized log for you with it when I can.  (My current log which would have it is of a very long KSP session.)

In case it matters: The ship is using dual-mode ion-drives from the Tanteras pack, powered by a USI reactor using NFE mechanics.

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