Jump to content

[PART, 1.0.2] Anatid Robotics / MuMech - MechJeb - Autopilot - Historical thread


r4m0n

Recommended Posts

Every time for me, stock or stock + DRE.

You keep complaining about this but I haven't seen you say that you've installed the optional FAR mod for MJ (see Sarbian's signature for link). You've changed the rules by changing the aerodynamics so it's no wonder MJ can't land accurately for you, unless you explain the new rules to it by installing the compatability mod as well.

If you have got that optional mod I apologise, but your problem is still with the compatability, not MJ itself. (Still Sarbian's baby though ^^).

I actually was, but thanks for reminding me, I forgot to grab it again after I updated MechJeb the other day though. I may or may not have had it before that, but even with that, it's still inaccurate.

Edit: Actually. I think I'll also grab the KM gimbal one since that's in B9, not sure if the B9 copy that I have has KM_gimbal 2 or 3 so I'll grab both.

Edited by smjjames
Link to comment
Share on other sites

Inclination should update itself when the launch to xxx is pressed. There was a fix in one of the last dev version since I messed it up while cleaning that code.

If that's what is supposed to happen, then something's bugged, because pressing Launch to Rendezvous doesn't update the launch inclination for me (tried this multiple times). It can still manage a decent intercept even with the wrong inclination. Launch into Plane of Target works perfectly, automatically updating the inclination of the launch autopilot to match the target and correctly timing the launch. This is 0.90 KSP with Mechjeb dev#393, no other mods installed. Reproduction steps (at least for me) are basically "have a target craft in an inclined orbit, manually set the launch autopilot to 0° inclination, target the inclined-orbit craft and hit Launch to Rendezvous, observe that the launch inclination is not altered". If you do the launch-and-revert thing it can still manage a decent intercept with the target, but it won't change the launch inclination without you either manually doing so or hitting Launch into Plane of Target and then aborting as a workaround.

I would honestly be okay either way with you fixing this or just declaring it intended behavior, LtR has the previously-mentioned issues with inclined orbits (namely that even if it matches the target's orbital inclination, it probably won't match the target's orbital plane, which makes the inclination matching slightly pointless).

If you can't reproduce this yourself/want more details, just ask.

Link to comment
Share on other sites

Can someone explain how to use the Resonant Orbit function?

#1 get into circular orbit

#2 figure out how many degrees forward / back you need to move (i.e. 30)

#3a if backwards, execute a 390/360 resonant orbit burn

#3b if forwards, execute a 330/360 resonant orbit burn

#4 at the appropriate Pe or Ap, re-circularize at the original orbit altitude

Link to comment
Share on other sites

I just pushed #389 to dev. It adds the new Velocity calculation and the (pretty) debug arrows. You can find a bunch of check box to play with in the Attitude Adjustment windows.

I just ran a couple of tests landing one of my small test vessels at KSC with Landing Guidance and build 393. After fixing the problem with class PWBCoastDescentSpeedPolicy : IDescentSpeedPolicy { public double MaxAllowedSpeed(Vector3d pos, Vector3d vel) }, KSP with only MechJeb installed was successful in landing within 180 meters of the landing pad from a 300 KM orbit. Since the deburn only gets within 150 meters, this means that the landing prediction only drifted by 25 to 30 meters. Before your change to the velocity vector the drift was anywhere from 150 to 300 meters. I need to try a couple of landings with a smaller initial precision. Please note that you cannot get this accuracy as long as the PWBCoastDescentSpeedPolicy returns erroneous values from the MaxAllowedSpeed function. The version that I am using is

        public double MaxAllowedSpeed(Vector3d pos, Vector3d vel)
{
return (vel.magnitude / 0.90) + 1.0;
if (pos.magnitude > endCoastRadius) return double.MaxValue;
else return 1; // It is a bit silly to set this at 0 because then the simulation times out as it never reaches the ground.
}

YMMV

skips

Link to comment
Share on other sites

The degree is the longitude, yes? And will I need to do a Hoffman Transfer?

Resonant orbits are used when you need to space out multiple satellites along the orbital plane. Like having one satellite every 60 degrees, equidistant from each other.

Link to comment
Share on other sites

I have done some analysis on reentry simulation compared to recorded data. The vessel does not follow exactly the prediction, on Kerbin this will make the simulation wrong by about 100m.

Then the PWBCoastDescentSpeedPolicy will simulate a "suicide burn" very high from the ground, which explains the high values for both time to landing and required delta-v. It simulates a 1m/s descent for the last km.

I plan to rewrite the simulation (maybe this weekend, when I have time) to calculate the correct moment to do the suicide burn. Meumeu is working on improving the accuracy of the autopilot.

Link to comment
Share on other sites

You want accuracy? I'll show you accuracy. IIRC these two screenshots are from KSP .21 with some version of MechJeb that was contemporary with it.

10375193484_50a6e4b7ca_n.jpgRover on Rover by g_alan_e, on Flickr

I was able to drive the second one off the first then flip it onto its wheels with RCS. No damage.

10034388205_93d4ece0db_n.jpgTwo-Step-returned by g_alan_e, on Flickr

It set the lander down on the crawlerway but the last booster stage it put down nearly dead center on the pad. I was kinda hoping it would crash the booster into the lander. ;)

Link to comment
Share on other sites

I used to get pad-landings most of the time, but often enough it would be 20m out - just enough to fall off the edge, making the rocket fall over, crash and burn. 30m is fine, then it misses the pad, half-on, half-off is not good ^^. Now I land in the field North of the pad instead (98% recovery is good enough).

ETA: It's just occurred to me - are you using Mk2 'plane parts or similar in your vehicles? They have 'lifting bodies' which can throw-off the ballistic calculations quite a bit.

Link to comment
Share on other sites

The first one looks like it's on the mun, and non atmosphere landings are precise to the nanometer.

how high up did you go for the second one? MJ can barely hit the KSC when coming down from orbit currently.

Yeah, on the Mun. It wasn't always that accurate without atmo. On one Kethane mining site on Mun I was lucky if they came down within a couple kilometers of the Okto 2 probe core I dropped for a target beacon.

I dunno the height for the second but that lander is capable of coming down from at least 200 KM, as are the other two stock landers I've been using since .21. Without deadly reentry and only deployed solar panels taking entry heat damage without a mod to do that, the starting altitude doesn't matter, though at times MechJeb has had issues starting landings below a specific altitude. Dunno if it varies with the body but for Kerbin it had had problems starting below 100 KM that didn't happen at 100 or higher.

When I went to Eve and back (after a huge amount of testing there with Hyperedit) MechJeb had a terrible time with the small orbits required around Gilly. http://imgur.com/a/2C8Iw#0 Lots of quicksaving and reloading.

Link to comment
Share on other sites

I have done some analysis on reentry simulation compared to recorded data. The vessel does not follow exactly the prediction, on Kerbin this will make the simulation wrong by about 100m.

Then the PWBCoastDescentSpeedPolicy will simulate a "suicide burn" very high from the ground, which explains the high values for both time to landing and required delta-v. It simulates a 1m/s descent for the last km.

Yes, the sim does not expect the ship to stop for the last descent phase.

I plan to rewrite the simulation (maybe this weekend, when I have time) to calculate the correct moment to do the suicide burn. Meumeu is working on improving the accuracy of the autopilot.

Great ! It will be a good thing to have someone else look at this. After sometime look at the same code you don't see the obvious problem anymore :)

smjjames & Galane : can you two stop ? smjjames uses FAR and as I said it quite a few time in the last weeks : FAR landing simulation is not implemented in MJ or the MJFARExt.

Link to comment
Share on other sites

I can't get MechJeb 2.4.2 to work in KSP in all game modes. HELP!!!!!

Have you installed it? Properly? There should be a folder called <your KSP installation>\Gamedata\MechJeb2

If that's not the problem then we rather need a clue or two beyond "doesn't work".

Link to comment
Share on other sites

OK, so I'm launching to 200 km using Accent Assistant with the Launch into Matching Plane option. I used the Maneuver Planner to change the Resonant Orbit. Is this correct? When it says "New orbit all period ratio", I left it at 2/3. Is this correct?

Edited by Furious1964
Link to comment
Share on other sites

The resonant orbit change your orbit so the new Orbital period is a ratio of your current one.

Warning : explaining from memory. I may invert some things :D

So say you have Sat A & B next to each other on the same orbit with an orbital period of 60 minutes .

You use the resonant orbit to ask for a 4/3 orbit for A then you have A on a 80 minutes orbital period with a Pe of 200km and an Ap of more (not willing to do the math now).

After 1 orbit you ask for MJ to circularize at Pe (200km).

You end up with A & B on a 200km orbit with A 120° (1/3) behind B.

Same as WuphonsReach explained.

I'll try to do some graph to explain it tonight.

Link to comment
Share on other sites

I have done some analysis on reentry simulation compared to recorded data. The vessel does not follow exactly the prediction, on Kerbin this will make the simulation wrong by about 100m.

Then the PWBCoastDescentSpeedPolicy will simulate a "suicide burn" very high from the ground, which explains the high values for both time to landing and required delta-v. It simulates a 1m/s descent for the last km.

I plan to rewrite the simulation (maybe this weekend, when I have time) to calculate the correct moment to do the suicide burn. Meumeu is working on improving the accuracy of the autopilot.

See my last post. Most of the drift that I see occurs before the ship enters the atmosphere, which suggests that it is not a MechJeb simulation issue. Changing PWBCoastDescentSpeedPolicy in the manner that I listed in the last post makes the delta-v estimate zero and the time estimate good to a few seconds.

skips

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...