sarbian

[1.2.2] Anatid Robotics / MuMech - MechJeb - Autopilot - [2.6.0] [12 Dec 2016]

473 posts in this topic

No logs => No support. If you can not find the time to provide the info I need to diagnose your problem do not expect I will find the time to reply to your post.

(The thread was lost after an incident on the forum. The really old thread from even before is is here)

Anatid Robotics and Multiversal Mechatronics proudly presents the first flight assistant autopilot: MechJeb

I would like to thank CardBoardBoxProcessor and Keptin for their amazing MechJeb models.

Sarbian is the current maintainer.

mj2.1_release.png

Current version: 2.6.0

2.6.0

  • Compatibility for KSP 1.2.2
  • Scripting module by @SPD13
  • Auto RCS Ullage for RO by Lamont (whose name here I forgot..)
  • Option to move the menu on any side of the screen
  • A bunch of fixes and minor features 
  • stuff I most likely forgot about

2.5.8

  • Compatibility for KSP 1.1.3
  • Add ‘At the highest AN/DN’ and ‘At the nearest AN/DN’ time selectors for inclination and plane maneuvers.
  • Add a setting for the node executor lead time
  • Custom Windows new Overlay mode
  • MJ Pod disabled since it does not work properly with the current leg code
  • FAR compatibility included
  • lots of fix

2.5.7

  • 1.1
  • Stuff
  • More stuff

2.5.6

  • Launch Inclination improvement
  • Improvement of the Landing Sim
  • Predicted Trajectory overlay in the flight view (in Landing AP window)
  • Ascent AP Fairings autodeploy with support for Procedural Fairings
  • RSS Mode swtich in the settings windows. For now it prevents engine shutdown when disabling the ascent AP
  • Greatly lowered memory garbage generated. May improve frame rate on some PC
  • A lot of bug fix

2.5.5

  • Flight Recorder Graph module
  • Education mode option (rename SmartASS to SmartACS)  see MM patch here https://raw.githubusercontent.com/MuMech/MechJeb2/master/MechJebEdu.cfg
  • Improvement to the Attitude control
  • Dynamic Pressure limiter to replace the now useless terminal velocity
  • Attitude control speed limiter to save some RCS
  • Add "periapsis in target SoI" InfoItems 
  • Add "minimum DV required for capture by target" InfoItems 
  • Add "Docking guidance: Angular velocity" infoitem
  • Add electric throttle limiter to avoid empty batteries on ion powered craft

2.5.6

  • 1.1 release. Be aware that the Pod leg are not working and will generate fantom force
  • Other stuff but I don't have time to write the change log atm

Version History

Download 2.6.0 here

Source code available here. LGPL3 license for MechJeb code. MIT for SmoothFoundations & UnityToolbag

You can also get the latest dev builds here.

Usage instructions:

Use the button on the right side of the screen to access MechJeb window selection interface, and click on the buttons to activate the windows. The windows can be dragged anywhere on screen, and their position is saved and reused among all rockets.

Manual

Useful links and companions mods

 

  • Manual
  • Optional MechJeb Modules for FAR & km_Gimbal should be installed if you use FAR or km_gimbal to improve MechJeb handling of the vessels.
  • MechJeb Embedded Universal to add MechJeb to all the probe and command module and use it without the parts. Also allow to unlock all MechJeb features from the start in career mode
  • Small MechJeb touchscreen case an alternative model for the part
  • An other model
  • A video from speedio explaining the basic operations you can do with it (outdated but still useful):
  • Another video, this one by tncm for AR202, but still very useful:
  • Adding "eduMode = true" to the module will rename the SmartASS to SmartACS. You can use this Module Manager patch to do it.

 

How to Install

Manual install : unzip the zip in KSP GameData directory. You should have something that looks like that :

 

  • KSP
    • GameData
      • MechJeb2
        • Icons
        • Parts
        • Plugins

         

 

CKAN has all the release of MechJeb.

If you want the dev version of MechJeb then :

  • open CKAN settings (Settings => CKAN Settings)
  • press the New button
  • select the MechJeb-dev line, click OK and exit the options.
  • refresh
  • select "Mechjeb2 - DEV RELEASE" in the list and then "Go to Change" to install

Common problems

  • The MechJeb menu is not showing. First make sure you have the part on your ship (AR202 case in the Control section). Some windows protection and anti-virus can sometimes block KSP from loading MechJeb. You should install KSP outside the C:\Program Files (x86) directory. Steam has an option to change the install directory of a game or you can just copy the directory somewhere else.
  • Some function are not present in career. Some function require to unlock some specific node in the Research and Development tree. Some other also require to upgrade the tracking station to level 2 (Game code restriction we can't do much about)

Bugs

There is two version of MechJeb available

  • The main version that we release once or twice per KSP version
  • The dev version that gets a a couple or release per month, week or even days. It may also have more bugs than the main version since new features are added

The dev release gets all the new features and bugs fix and the main version gets them when a new KSP version is released (or major bugs requires it). If you experience a bug the first thing I advise is to try the dev release. You can read the change log of the dev release here.

If your bugs don't seems to be fixed then please open a new ticket on the project tracker. Don't forget to include a link to your log (see here to find it and how to share it) and the version of Mechjeb you where using (shown in MechJeb Menu).

Please send Suggestions/Bug reports here: https://github.com/MuMech/MechJeb2/issues

Edited by sarbian
13 people like this

Share this post


Link to post
Share on other sites

Ok i've got a giant "How the *Beep* do i do this with mechjeb question. Had an ongoing science mission go a little fubar. I didn't put enough comms on it :blush:. Now it's a little over a 100 days from Duna and i need to rush a relay there.. Given Kerbin and Duna's positions the only way to beat the probe there will be to send the relay on a reciprocal of Duna's orbit. I've got a craft that assuming nothing goes wrong on the way to orbit will have enough d/v to do the job, (>20kps), but i'm not entirely sure how to tell mechjeb to do that...

Share this post


Link to post
Share on other sites
2 hours ago, Carl said:

Ok i've got a giant "How the *Beep* do i do this with mechjeb question. Had an ongoing science mission go a little fubar. I didn't put enough comms on it :blush:. Now it's a little over a 100 days from Duna and i need to rush a relay there.. Given Kerbin and Duna's positions the only way to beat the probe there will be to send the relay on a reciprocal of Duna's orbit. I've got a craft that assuming nothing goes wrong on the way to orbit will have enough d/v to do the job, (>20kps), but i'm not entirely sure how to tell mechjeb to do that...

I don't have the game up and running, but can't you use Advanced Transfer to Another planet, set Duna as the target and then click the ASAP button?

1 person likes this

Share this post


Link to post
Share on other sites

Sadly not, just checked it, (thanks for the tip though, never investigated that as the manual has nothing on it), but it still tries to plot a prograde trajectory, (which is fair enough, retrograde needs more dv than is remotely sane, your velocity at encounter with duna would be 14kps and you have to shed 9kps of kerbin orbital velocity first to get that).

Share this post


Link to post
Share on other sites

I don't think MJ currently has anything that would plan a retrograde transfer.

1 person likes this

Share this post


Link to post
Share on other sites

Cheers, to be fair the hard part is getting a retrograde sun orbit setup, once you haver that setting up a retrograde intercept isn't too hard. I just don't know how to setup a retrograde sun orbit from kerbin SOI.

Share this post


Link to post
Share on other sites
1 hour ago, Carl said:

Cheers, to be fair the hard part is getting a retrograde sun orbit setup, once you haver that setting up a retrograde intercept isn't too hard. I just don't know how to setup a retrograde sun orbit from kerbin SOI.

Can't think that would be the best way to achieve a retrograde Sun orbit. Kerbin travels at ~ 9196 m/s around Sun (of course, prograde). You can of course setup a retrograde burn relative to Sun while still in Kerbin's SoI (need to burn so to increase Ap in the opposite direction of where Kerbin moves, meaning burn prograde in Kerbin's LKO when Sun rises above the horizon) but why waste 9196 m/s DV that way? (that would only be useful in case you want to dive into Sun, and even in that case would be better to save DV using a slingshot from Eve or other bodies). Going farther away from Sun however reduces orbital speed (Jool speed is on average ~ 4120 m/s) therefore is easier to set retrograde Sun orbit by first raising Ap. And then, intercepting a massive body as Jool at the correct angle (get a Pe in front and higher of Jool) provides a lot of DV to make that retrograde orbit.

Share this post


Link to post
Share on other sites

Well i managed via messing with the node editor and setting a manual node to get it to work, turns out i need even more d/v than i thought, joy.

 

Thats led me to a new issue, built a multi-stage ion for the obscene dv, but can't get MJ to recognise ion stages beyond the first. What do you need from me serbin? Not sure what if any logs you'll need on this one.

 

Image of probe:

VbFX5gA.png

Quote

Can't think that would be the best way to achieve a retrograde Sun orbit. Kerbin travels at ~ 9196 m/s around Sun (of course, prograde). You can of course setup a retrograde burn relative to Sun while still in Kerbin's SoI (need to burn so to increase Ap in the opposite direction of where Kerbin moves, meaning burn prograde in Kerbin's LKO when Sun rises above the horizon) but why waste 9196 m/s DV that way? (that would only be useful in case you want to dive into Sun, and even in that case would be better to save DV using a slingshot from Eve or other bodies). Going farther away from Sun however reduces orbital speed (Jool speed is on average ~ 4120 m/s) therefore is easier to set retrograde Sun orbit by first raising Ap. And then, intercepting a massive body as Jool at the correct angle (get a Pe in front and higher of Jool) provides a lot of DV to make that retrograde orbit.

Don't have the time, image of the geometries, (probe i'm trying to beat there is the one down near eve with the red comms line):

MzP2tRH.png

A direct retrograde shot from kerbin is the only trajectory that will get me there in time, and thats a maybe.

Share this post


Link to post
Share on other sites
53 minutes ago, Carl said:

Well i managed via messing with the node editor and setting a manual node to get it to work,

That's the way I solve most issues :wink:

Share this post


Link to post
Share on other sites

Thing is i'd never touched the controls for that before except my accident, so i had no clue how to work it, i just experimented till stuff happened.

 

Also ethier KSP or MJ dosen;t like retrograde trajectories as anytime i reduced the dv to try and fine tun the encounter it deselected duna as a target. Not sure weather that's KSP or MJ though. Not sue if maneuver nodes even exist in stock, i get them impression they do but i could be way off base, again if serbian needs logs just tell me which logs he wants, i assume MJ has several given all the modules and VAb vs SPH vs flight, plus KSP's own logs that may or may not be applicable.

 

Still managed to do it, but annoying. Currently trying the burn without having proper craft dv info, will se how it goes, have a save to revert to if needed from pre launchpad.

Edited by Carl

Share this post


Link to post
Share on other sites

Minor note, figured out the odd d/v display. Xenon does not appear to respect cross feed settings, so it was all one stage from the PoV of fuel consumption. Joy. Back to the drawing board.

Edited by Carl

Share this post


Link to post
Share on other sites

I've recently had a power outage twice (I haven't got any UPS) while playing KSP and both times my mechjeb configuration got messed up - all the custom windows I've made were gone and I was unable to recover from this using mechjeb's interface. I had to remove MJ completely, install it again and customize again - quite a pain as I like setting up orbit and surface windows in a similar fashion to KER's hud displays. I prefer MJ's font to KER's as during a landing bigger font is easier to quickly read.

It's not a big deal as power outages are extremely rare for me yet all the other plugins maintained their configs (admitedly very few mods are as customizable as mechjeb is). I the end I simply backed up the main config file to avoid this again.

Regardles, MJ is a truly magnificent piece of code and is extremely useful as it allows to automate some of the boring stuff. Great work!

Share this post


Link to post
Share on other sites

I made some change in the dev release to fix a recurrent memory allocation that may also help with those corrupted config on power loss. MJ was saving its config way too often.

1 person likes this

Share this post


Link to post
Share on other sites

Issue with the changes to settings save in #683...

First time opening KSP all the MJ windows are in the top left corner.

Re-arranging them in the right place and then returning to the VAB then launching again and all the windows are back in the top lift corner.

In other words, it looks as though the window positions settings aren't now being saved at all. 

1 person likes this

Share this post


Link to post
Share on other sites
4 hours ago, sarbian said:

I made some change in the dev release to fix a recurrent memory allocation that may also help with those corrupted config on power loss. MJ was saving its config way too often.

So it's intentional that #683 resetted all custom windows i assume?

Share this post


Link to post
Share on other sites

It is not... I ll have a look later today or tomorrow.

3 minutes ago, Mokmo said:

So it's intentional that #683 resetted all custom windows i assume?

Content, position or both ?

Share this post


Link to post
Share on other sites

Sarbian, I have a suggestion, my inclination is to believe that it wouldn't be extremely difficult, but I'm no expert.

Could the Trajectorie's API be used to provide accurate landing predictions in atmosphere (i.e. with FAR?)

Share this post


Link to post
Share on other sites

Ok, this was actually quick. It should work now.

11 minutes ago, dlrk said:

Sarbian, I have a suggestion, my inclination is to believe that it wouldn't be extremely difficult, but I'm no expert.

Could the Trajectorie's API be used to provide accurate landing predictions in atmosphere (i.e. with FAR?)

Sure. Just give me a version of Trajectorie's API than can run in a thread.

1 person likes this

Share this post


Link to post
Share on other sites

I'm not too familiar with the details of the API, is does MJ require an API to run in a separate thread in order to use it?

Share this post


Link to post
Share on other sites

MJ requires the math to be done fast because it need the trajectory updated often for the landing AP to work. To do that the lending sim is done in a thread. 

Trajectories code cannot run in a thread so I would have to run it each frame and the frame rate would plumel. 

 

The problem is not me copying an other mod code. I know perfectly what need to be done for FAR (and stock support for lift) to work. But I don't see how to do it fast enough or without copying half of FAR code.

Share this post


Link to post
Share on other sites

I'd like to understand this a bit better. Trajectorie's calculates the trajectory live without a frame rate issue, and people have written KOS scripts that use the Trajectories API for landings. What keeps MJ from doing the same thing?

Share this post


Link to post
Share on other sites
1 hour ago, sarbian said:

It is not... I ll have a look later today or tomorrow.

Content, position or both ?

Actually it's even worse than i thought, the default VAB windows aren't even on and nothing i customize seems to save. 
Current situation: All i have in the VAB are "Custom Window Editor" and "Settings", so i create a Delta-V window with the preset for it. Exit to space center, back in VAB, the dV window isn't listed. 

1 person likes this

Share this post


Link to post
Share on other sites

In the latest dev version: Has anyone else had any issues with window positions resetting every time you enter a new scene?

Share this post


Link to post
Share on other sites
1 hour ago, Mokmo said:

Actually it's even worse than i thought, the default VAB windows aren't even on and nothing i customize seems to save. 
Current situation: All i have in the VAB are "Custom Window Editor" and "Settings", so i create a Delta-V window with the preset for it. Exit to space center, back in VAB, the dV window isn't listed. 

Same here. Outside VAB/SPH all windows work. (At least those that I tried.) Inside VAB/SPH only 'settings' and 'custom'.

Share this post


Link to post
Share on other sites

I came here to ask about the same thing others have noted: window positions aren't saved at all, so far as I can see. After every scene change, the window positions all default back to the upper left corner. In addition, in the VAB (haven't checked the SPH), the dV and Vessel Info options aren't available at all.

I also have a secondary issue but it is probably something @sarbianis already aware of, but I want to confirm that before I try to duplicate it exhaustively and provide logs. In the Landing Guidance, MJ does what a friend of mine describes as "stutter warping" - after the initial de-orbit burn, when in prior versions, MJ would warp a good ways through the descent, go back to real-time and make a correction, then maybe warp again before final descent and landing, now MJ instead seems to cycle between 1X, 2X, 5X and maybe 10X all within a matter of seconds, constantly adjusting the speed of the warp but never really just settling down, warping, unwarping and landing. The accuracy (on Minmus) is phenomenal, but it take a much longer amount of real-time to perform a routine vacuum body landing. Is this problem already known or is it others have experienced?

1 person likes this

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now