Jump to content

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


r4m0n

Recommended Posts

Holy Smokes! Too much math ;)

It's easier to just get close enough and then do tiny prograde and retrograde burns until your vessel is at the desired orbital period. You'd have to turn your throttle down to 5% of course.

I've never done the calculations as I just take the period for what it is (and read it off of MechJeb's windows). But if you think that's complex, well, then, don't even venture into tackling Kepler's Equation, which you use to calculate position at a specific time. Can't even formulate it for an exact solution of position at a given time, so you have to use numerical methods to approximate a solution. I have done that (many years ago) but in KSP I just let the program or a mod do that stuff. :)

Link to comment
Share on other sites

I've never done the calculations as I just take the period for what it is (and read it off of MechJeb's windows). But if you think that's complex, well, then, don't even venture into tackling Kepler's Equation, which you use to calculate position at a specific time. Can't even formulate it for an exact solution of position at a given time, so you have to use numerical methods to approximate a solution. I have done that (many years ago) but in KSP I just let the program or a mod do that stuff. :)

I hear ya. I'm so glad we have computers to do all of that for us. It blows my mind what they accomplished with mostly pen and paper back in the 50's and 60's.

Link to comment
Share on other sites

It would seem I am FORCED into reposting my most recent issue with MechJeb in the blind hopes that Sarbian or someone with computer programming skills can find my issue with mechjeb.

http://forum.kerbalspaceprogram.com/...v2-4-2/page853 THIS is where you can locate the initial batch of output logs as well as a copy of my persistent save as of THAT date.

here is where you can get a fresh copy of my output log from last night: http://www.filedropper.com/outputlog_6

here is where you can get a fresh copy of my persistent save from last night: http://www.filedropper.com/persistent_3

With the reposts of my saves/logs out of the way, I begin again with reposting my most recent issue with the Dev Build 380 i think it is. I begin this again, by stating on record, I have used procedures that I know to work and have worked for mechjebs that are or rather were compatible with KSP versions: .21, .22, .23, .23.5, .24, .25. Those procedures as far as the current issues at hand: Launch to Rendezvous and Launch into Plane of Target.

1. IN ALL PRIOR VERSIONS, regardless of orbit, inclination or any other factors, going to the map, selecting a target, and then giving the 2 commands: Launch to Rendezvous and Engage Auto-Pilot, would for the record, fill in orbital inclination and then fly the appropriate launch profile into the proper plane and orbit. Inclined, Elliptical, polar, equatorial, retrograde, prograde did not matter. It would find and fly said path. .90 and mechjeb 2.4.2/dev build 380 it is sketchy at best if it does this.

2. IN ALL PRIOR VERSIONS, regardless of orbit, inclination or any other factors going to the map, selecting a target, and then giving the 2 commands: Launch into PLANE of Target and Engage Auto-Pilot, would for the record, fill in the orbital inclination and then fly the appropriate launch profile into the proper plane and orbit. Inclined, Elliptical, polar, equatorial, retrograde, prograde did not matter. It would find and fly said path. .90 and mechjeb 2.4.2/dev build 380 it is sketchy at best if it does this.

3. I can or rather could, get one to two flights in where things would act as expected. But, multiple reverts into VAB or back to the Pad for fixes or retries would degrade the functionality of MechJeb. When I ran the DEV BUILD 380, regardless of what I targeted, and as of lately, trying to sort this out, I kept choosing my station in POLAR orbit <an album to follow this list, and before you tell me it is doing what I told it to do, because orbital inclination says 0 degrees, please remember your mechjebs and what it does when you select a target for a times launch, it is SUPPOSED to rewrite that box. The dev build does not, at least for me> it would fly an equatorial orbit, or in the case of the pictures, TRIED, had a sketchy staging issue and the thing got wonky and flew wonky.

FOR THE RECORD, I chose my polar orbit station, CHOSE LAUNCH INTO PLANE OF TARGET then engaged the autopilot.

Javascript is disabled. View full album

it saddens me to have to repost this particular issue. I also state, I am sick of being told I am in the wrong with how I am using the mod, that this is somehow MY fault. The issue is real. Just because YOU are not having this happen does NOT mean that I am making this up. I have come to believe that we are all here because we love this game, and that we come together to HELP each other.

Edited by Higgs
Link to comment
Share on other sites

1. IN ALL PRIOR VERSIONS, regardless of orbit, inclination or any other factors, going to the map, selecting a target, and then giving the 2 commands: Launch to Rendezvous and Engage Auto-Pilot, would for the record, fill in orbital inclination and then fly the appropriate launch profile into the proper plane and orbit. Inclined, Elliptical, polar, equatorial, retrograde, prograde did not matter. It would find and fly said path. .90 and mechjeb 2.4.2/dev build 380 it is sketchy at best if it does this.

2. IN ALL PRIOR VERSIONS, regardless of orbit, inclination or any other factors going to the map, selecting a target, and then giving the 2 commands: Launch into PLANE of Target and Engage Auto-Pilot, would for the record, fill in the orbital inclination and then fly the appropriate launch profile into the proper plane and orbit. Inclined, Elliptical, polar, equatorial, retrograde, prograde did not matter. It would find and fly said path. .90 and mechjeb 2.4.2/dev build 380 it is sketchy at best if it does this.

3. I can or rather could, get one to two flights in where things would act as expected. But, multiple reverts into VAB or back to the Pad for fixes or retries would degrade the functionality of MechJeb. When I ran the DEV BUILD 380, regardless of what I targeted, and as of lately, trying to sort this out, I kept choosing my station in POLAR orbit <an album to follow this list, and before you tell me it is doing what I told it to do, because orbital inclination says 0 degrees, please remember your mechjebs and what it does when you select a target for a times launch, it is SUPPOSED to rewrite that box. The dev build does not, at least for me> it would fly an equatorial orbit, or in the case of the pictures, TRIED, had a sketchy staging issue and the thing got wonky and flew wonky.

FOR THE RECORD, I chose my polar orbit station, CHOSE LAUNCH INTO PLANE OF TARGET then engaged the autopilot.

Please demonstrate using KSP 0.25 and the most recent stable official MechJeb release for KSP 0.25 that it can in fact properly set up a rendezvous with a target in a polar orbit using the Launch to Rendezvous and specifying only an Orbit Inclination of 0 as you say that it did.

Because I tested that postulation and was not able to validate it. KSP 0.25 with latest stable official MechJeb release for KSP 0.25 behaved exactly as it does now given the setup designated in your message.

Link to comment
Share on other sites

For the record. I am in Steam Version 0.90.0.705 and have tried MJ 2.4.2 and Dev Build 380 i think it is. For the second record, Mechjeb that is compatible for .25 FUNCTIONED EXACTLY as EXPECTED. Issue lies with MJ 2.4.2 and Dev Build 380. Trying to duplicate this set of issues on a MechJeb and KSP NOT of versions 2.4.2 and KSP 0.90 is a task that is not needed, as, I have stated many times, in the litany of posts where I list the versions in which MechJeb functioned exactly as predicted and expected are not relevant to the issues I am seeing in .90 with the current dev build and MJ 2.4.2. Thanks for trying Star, I really mean that.

side note: i KNOW my issue is exceptionally rare and seems to be effecting only me. I have given multiple copies of my persistent save, multiple output logs. All i want to know is, is this issue because of a corrupted save on my end? I honestly do not know. Is this something because of the new parts in KSP? again, I do not know. Is this something in the code of mechjeb? again, I do not know. I am not beyond unwilling to totally nuke my copy of KSP and start from just opening the box again, IF the issue is ON MY END, but, I cant know that if you folks dont help me. I KNOW you folks are not seeing and are having issues even trying to REPLICATE the issues I am seeing, but, that does NOT mean they are not happening. Why would I be putting myself out on display if they were not happening? I am honestly wanting help. Please help me out.

Edited by Higgs
Link to comment
Share on other sites

All i want to know is, is this issue because of a corrupted save on my end?

Seeing as nobody else can reproduce the issue (myself included), perhaps you could answer your own question with a fresh install & save file?

Steam makes this somewhat more difficult than it should be, but there's nothing to stop you from backing up your current install and testing clean. Nor is there anything stopping you from demonstrating 'correct' behaviour with 0.25, as Starwaster requested.

Link to comment
Share on other sites

Steve, wiping my game is a drastic step. One, for tonight, I am unwilling to take. I would like to state on record: I dont need a .25 copy to demonstrate proper behavior, as proper behavior can be shown by words in this case. Target any object you have in orbit. Tell MechJeb while on the launch pad awaiting launch, that you wish to go to an orbit that is ABOVE your target. Say your target is 300km circular, Polar. Tell it: 500km, then click, dealers choice: Launch To Rendezvous and engage autopilot, OR Launch into Plane of Target <either are acceptable launch criteria> and watch as the following occur: MechJeb <this is assuming you are say 90 degrees off plane from your target> engages auto-warp, bringing the KSC into a favorable position relative to your targets orbit and position with in that orbit. MechJeb keeps slowing auto warp down as the count draws to t-0. Finally at say t-10 seconds it cuts to 1x normal time scale and the clock runs to 0. MechJeb then <the following assumes: auto-stage has been enabled, launch to say rendezvous for this and your climbing to a 500km POLAR orbit> initiates launch. Reaches your gravity turn assigned altitude. MechJeb triggers your staging at the correct times and now, you are coasting to edge of atmosphere as it has finalized your AP to around 500KM give or take a bit for vehicle oddities during flight. You achieve AP and mechjeb has oriented you into the correct position for circularisation burn. With this done, your launch profile has concluded and MechJeb functioned exactly as advertised, anticipated and expected.

The above held true for all versions between .21 KSP and .25 KSP. For me sadly, this after multiple reverts to both launch and vab is not possible. and again, with the 380 dev build, not even THIS was possible. Page 853 post 8526 contains several output logs and a persistent save. a page or so back has new output logs and a more current persistent. to use my persistent: mechjeb 2.4.2, novapunch, lazor docking cam, proc fairings.

Link to comment
Share on other sites

Steve, wiping my game is a drastic step. One, for tonight, I am unwilling to take.

You can copy the game folder to another location and delete all the mods, saves etc from it to have a clean KSP to use for troubleshooting.

Link to comment
Share on other sites

Ahem:

backing up your current install and testing clean

'wiping' your game is not drastic at all, assuming you have proper backups.

I have 3 operational copies of 0.90, with different mods, + 2 stock installs for testing. I also have snapshots of all my installs going back to 0.19.

Back up your current install, try it with a fresh download, no other mods & a new save file. Then you will know if it's something wrong with your save / install / some random mod conflict.

Or do it as Galane described, by making a backup then deleting all non-mechjeb stuff. Make sure you nuke the mechjeb settings in Mechjeb2/Plugins/PluginData though.

If you're not willing to follow standard troubleshooting procedure, I give up.

Edited by steve_v
Link to comment
Share on other sites

As far as I can remember, there isn't a specific tool in MechJeb that allows you to set orbital period. However, it is easy to calculate it, and from a set periapsis / apoapsis to determine the other to get a specific period.

EDIT: You can also edit any MechJeb window to show the orbital period.

All of the information is in the Wikipedia article Standard gravity parameter. It's the value mu (lowercase Greek letter μ) which is equal to the product of the Gravitational Constant and the mass of an object (usually the central body), GM.

μ = G M

This is listed in the KSP Wiki for all bodies (start from the Kerbol System article). (It's a common value to use in real life as it is much more accurately known that either G or M.)

Then you use the gravitional formulation of Kepler's Third Law:

μ = 4 pi^2 a^3 / T^2

where a is the semimajor axis and T is the period. Solve for the semimajor axis:

a = ( (μ / (4 pi^2)) T^2) ^ (1/3)

which is also this:

2 a = 2 R + P + A

where R is the radius of the body and P and A are the periapsis and apoapsis altitudes from the surface, which is what is used in KSP and MJ.

So if you have a given P, to get a specific T, use this A:

A = 2 ( (μ / (4 pi^2)) T^2) ^ (1/3) - 2 R - P

As μ is given in units of metre^3/second^2, be sure you state T in seconds and R and P in metres. Get μ and R from the KSP Wiki articles for the major body you're orbiting.

Note that if the value for A comes out less that P, there's isn't a solution for an orbit of T seconds with a given periapsis altitude P.

Thanks, Jacke. Admittedly, most of this has gone over my head, but thanks to the wonderful MS Excel, I've set up the formula in a spreadsheet and just need to plug in the relevant values to calculate the required A to have an orbit of a specified time.

- - - Updated - - -

I must be going blind as I can't find any μ value on the KSP Wiki. It shows the Standard Gravitational Parameter and Mass though, which, IF I used the formula correctly, equates to an μ value for Kerbin as 186,877,414,558,800,000,000,000,000,000,000,000.00. Considering that the μ for Earth is only 398,600.4418, it doesn't look right.

- - - Updated - - -

Doh - had a blond moment. Standard Gravitational Parameter = μ

So, if my P = 75km and I want to set a 2 hour orbit, I need to increase my A to 2,060.20km. :D

Edited by g0tchas
Link to comment
Share on other sites

Thanks, Jacke. Admittedly, most of this has gone over my head, but thanks to the wonderful MS Excel, I've set up the formula in a spreadsheet and just need to plug in the relevant values to calculate the required A to have an orbit of a specified time.

- - - Updated - - -

I must be going blind as I can't find any μ value on the KSP Wiki. It shows the Standard Gravitational Parameter and Mass though, which, IF I used the formula correctly, equates to an μ value for Kerbin as 186,877,414,558,800,000,000,000,000,000,000,000.00. Considering that the μ for Earth is only 398,600.4418, it doesn't look right.

µ is the standard gravitational parameter, also µ for Earth is 398600 km^3/s^2, be careful when comparing values or you can easily be wrong by a factor one billion...

Link to comment
Share on other sites

I would like to state on record: I dont need a .25 copy to demonstrate proper behavior, as proper behavior can be shown by words in this case. Target any object you have in orbit. Tell MechJeb while on the launch pad awaiting launch, that you wish to go to an orbit that is ABOVE your target. Say your target is 300km circular, Polar. Tell it: 500km, then click, dealers choice: Launch To Rendezvous and engage autopilot, OR Launch into Plane of Target <either are acceptable launch criteria> and watch as the following occur: MechJeb <this is assuming you are say 90 degrees off plane from your target> engages auto-warp, bringing the KSC into a favorable position relative to your targets orbit and position with in that orbit. MechJeb keeps slowing auto warp down as the count draws to t-0. Finally at say t-10 seconds it cuts to 1x normal time scale and the clock runs to 0. MechJeb then <the following assumes: auto-stage has been enabled, launch to say rendezvous for this and your climbing to a 500km POLAR orbit> initiates launch. Reaches your gravity turn assigned altitude. MechJeb triggers your staging at the correct times and now, you are coasting to edge of atmosphere as it has finalized your AP to around 500KM give or take a bit for vehicle oddities during flight. You achieve AP and mechjeb has oriented you into the correct position for circularisation burn. With this done, your launch profile has concluded and MechJeb functioned exactly as advertised, anticipated and expected.

That's not my experience of previous versions of MechJeb. For me, Launch to Rendezvous and Launch into Plane functioned in precisely the same way as they do with the latest dev version, which is how you are currently experiencing them given your previous posts. If you've had a different experience, I can't account for that, but I know I've had no errors either in the past or now.

I've also taken a look through your output logs and there is nothing to suggest that MechJeb isn't functioning as expected. There are absolutely no errors in them at all.

Given that, I'm at a loss as to how to help you, as from what I can see MechJeb is working the same for you as it's always worked for me.

Link to comment
Share on other sites

g0tchas : I may add some more helper function to the planner since I was asked a few to help with the new contract too. But right now (as I said in an other thread) I hurt my back and sitting in front of my keyboard is not really fun...

Link to comment
Share on other sites

Steve, wiping my game is a drastic step. One, for tonight, I am unwilling to take.

I can understand that, Higgs.

But let me tell you about my experience last night, when I finally got to try out KSP 0.90 (was waiting for BTSM to be updated to a KSP 0.90 verison). Had weird errors, some that were repeatable, some that weren't. While digging around for causes, I discovered that I had 2 available strut parts and 2 available fuel lines parts. The old 0.25 version parts were still available right beside the new CompoundPart versions.

I'd already decided with all the changes in 0.90 I needed to rebuild all my spacecraft from scratch to avoid errors. Now I decided I needed a complete rebuild. Wiped all files. Downloaded the stock files from Steam. Reinstalled my mods. Haven't seen any more weird errors yet.

At some point, you have to back up and remove all possible sources of errors. Then you do all the steps very carefully. Take notes of exactly what you do if you have to. And when you're flying the spacecraft, try to figure out what you're telling the rocket to do and what it is actually doing.

Link to comment
Share on other sites

Hi, I'm just letting you guys know that for some reason, with NEAR, MechJeb just completely ignores the terminal velocity when I use ascent guidance and my ships routinely break the sound barrier and get the reentry plasma effects. This especially happens with the S1 SRB since that one tends to just ram your ship through the atmosphere. I'm just wondering when this might get fixed.

I'm using the latest dev build, B9 Aerospace, NEAR, and the hangar mod.

Edited by smjjames
Link to comment
Share on other sites

Today, I had a situation in which MJ's Auto-Docking was awe-inspiring.

I had failed to put an adequate reaction wheel on my next-to-final stage that. Normally, this stage would deliver the payload to within 50 meters of the target orbiting station. After much diddling and lurching, I only got within about 300 meters of the target (I couldn't fully control the vessel attitude and it turned way too slowly when I made correction). I dropped the that stage to activate the final stage which is powered only by RCS to dock. Auto-Dock performed perfectly, without burning through all my monoprop. In fact, it required only about 35 monoprop. I assumed it was a lost cause of that Auto-Dock would fail to dock after using all the monoprop while attempting to traverse the 300 meter distance.

About a month ago, Auto-Docking was severely broken. Whoever fixed it deserves a raise.

Well done, to the MechJeb team.

Link to comment
Share on other sites

Hi, I'm just letting you guys know that for some reason, with NEAR, MechJeb just completely ignores the terminal velocity when I use ascent guidance and my ships routinely break the sound barrier and get the reentry plasma effects. This especially happens with the S1 SRB since that one tends to just ram your ship through the atmosphere. I'm just wondering when this might get fixed.

I'm using the latest dev build, B9 Aerospace, NEAR, and the hangar mod.

  1. MJ isn't really aware of terminal velocity with FAR or NEAR
  2. it only uses the vertical component when restricting velocity to terminal velocity anyway.

Link to comment
Share on other sites

  1. MJ isn't really aware of terminal velocity with FAR or NEAR
  2. it only uses the vertical component when restricting velocity to terminal velocity anyway.

Okay. It's really only an issue with the boosters, B9s heavy lifter engines, and some of the more powerful engines. Mostly the boosters and those heavy lifter engines.

Also, a possible issue I'm noticing, when I tried to use the landing guidance to land at either the VAB roof or the launchpad, each time (two or three times) it tried to do a landing, it was over 3km off target. I checked with a regular 'pick target on map' landing and it got it within a kilometer.

It might be because my 'lander' looks like this:

IIuZ9WY.jpg

Which is just a pod with science stuff on it that I decided to slap an RCS tank and RCS nodes on so that I could get more precise biome landings. Not sure why MechJeb doesn't use RCS in atmosphere to fine tune the landing precision.

Edited by smjjames
fixed image
Link to comment
Share on other sites

Hi, I'm just letting you guys know that for some reason, with NEAR, MechJeb just completely ignores the terminal velocity when I use ascent guidance and my ships routinely break the sound barrier and get the reentry plasma effects. This especially happens with the S1 SRB since that one tends to just ram your ship through the atmosphere. I'm just wondering when this might get fixed.

I'm using the latest dev build, B9 Aerospace, NEAR, and the hangar mod.

Solid rockets run at full thrust. They don't have a throttle, though some non-stock ones can have their burn profiles tweaked during assembly. If you put a big honking SRB on your rocket and it's not heavy enough to keep it from hitting terminal velocity on ascent, there's nothing you can do about that except add more weight.

MechJeb will throttle back throttleable engines (with stock aero) when SRBs ram into terminal velocity, if you have the TV limit engaged. Overpowering with SRBs is a nice way to save fuel in ascent. I've built some rockets with so much SRB power MJ will cut throttle completely from right after liftoff until SRB burnout.

With Stock Drag Fix (only aero mod I've used, it simply removes wet mass from being counted in stock drag calculation) MJ doesn't throttle back so much, often not at all, yet most of the time a lot less fuel gets used ascending from Kerbin and other places with atmosphere.

Link to comment
Share on other sites

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