Jump to content

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


r4m0n

Recommended Posts

Instructions for running the FlyMeToTheMun demo (while I compile a proper manual for Autom8):


  • [li]
Download this to PluginData/mumechlib/Mun.lua[/li]
[li]Open the Autom8 console and type: [tt]dofile('Mun')[/tt][return]. It should show: 'Usage: FlyMeToTheMun(lat, lon)'[/li]
[li]Type in the consone: [tt]FlyMeToTheMun(0, 0)[/tt][return]. You can use any other coordinates to land wherever you want.[/li]
[li]? ? ?[/li]
[li]Profit![/li]

For anyone having problems with the pods, and stuff like that: Please delete all Parts/mumech_* and get a copy fresh from the zip. Something changed on the game loader, and some old mesh caches are breaking the game.

Link to comment
Share on other sites

I seem to have an odd problem with the ascent autopilot. I engage it normally and it displays the \'Vertical Ascent\' status, as it should. After this, however, it just continues to display the same thing as it gets very high. It also fails to use the ASAS which means my rocket is always very tilted (And in a few cases has just been pointed downwards into a death spiral). Once it gets to a certain point, it will say that it is \'Coasting to Apoapsis\' (Without performing a gravity turn) and then coasts normally, as it should. When it gets to the apoapis, however, it just goes past without circularizing and smashes into Kerbin at high speeds.

So I ask of you: How would one fix this? Or is it just me being a huge idiot?

EDIT: Nevermind, I reinstalled MuMechLib and this and it seems to be working now. As you were.

Link to comment
Share on other sites

I\'m having a problem getting mechjeb working. I got the KSP in a map on the desktop, not in program files and setting the exe into admin mode do nothing.

Anyone got any ideas? Or know when a updated version will release?

I need the precision of mechjeb, i am bad pilot :P

EDIT: Never mind me, it help if i put the files in the right folders -.-

Link to comment
Share on other sites

For anyone looking to get started on the autom8 stuff, here below is the API.

This is not official. Just my own notes after looking through the source code on SVN.

MechJeb API

===========

Ascent AutoPilot

----------------

launchTo(altitude [in meters], inclination [in degrees])

Landing AutoPilot

-----------------

land() returns null

landAt(latitude, longitude) or landAt(latitude, longitude, bool autoWarpOnDescent) returns null

Core

----

controlClaim() returns boolean

controlRelease() returns boolean

attitudeGetReferenceRotation(reference) returns LuaTable(vector3d)

attitudeWorldToReference(vector, reference) returns LuaTable(vector3d)

attitudeReferenceToWorld(vector, reference) returns LuaTable(vector3d)

attitudeTo(vector, reference) returns boolean

attitudeDeactivate() returns boolean

attitudeAngleFromTarget() returns angle in degrees between the vessel\'s current pointing direction and the attitude target, ignoring roll

distanceFromTarget() returns distance

relativeVelocityToTarget() returns LuaTable(vector3d)

targetName() returns target name

landActivate() returns boolean

landDeactivate() returns boolean

warpIncrease() or warpIncrease(bool instant, double maxRate) returns boolean

warpDecrease() or warpDecrease(bool instant) returns null

warpMinimum() or warpMinimum(bool instant) returns null

warpPhysics() or warpPhysics(bool instant) returns null

autoStageActivate() or autoStageActivate(double stagingDelay, int stageLimit) returns null

autoStageDeactivate() returns null

launch() returns null

getAttitudeActive() returns null

getControlClaimed() returns null

busy() returns boolean

free() returns boolean

Orbital Operations

------------------

changePe(periapsis [in meters]) returns null

changeAp(periapsis [in meters]) returns null

changeApAndPe(apoapsis[in meters], periapsis [in meters]) returns null

circularize() returns null

transfer(target body, final periapsis [in meters]) returns null

warpToEvent(event) or warpToEvent(event, lead time) returns null

Link to comment
Share on other sites

A little more on the autom8 stuff. I found a script in a pastebin and modified it a bit.

This will fly you to the Mun and land, fully automatically with no user input. It\'s pretty cool.

Just paste this into the autom8 window and hit execute.

Change the numbers in the last line to where you want to land.

function MunDriver(lat, lon)
print 'Launching...'
mechjeb.launchTo(125000, 0)
wait(mechjeb.free)
print 'TMI...'
mechjeb.transfer('Mun', 200000)
wait(mechjeb.free)
print 'Warping to SoI...'
mechjeb.warpToEvent('soi')
wait(mechjeb.free)
print 'Correcting Pe...'
mechjeb.changePe(200000)
wait(mechjeb.free)
print 'Warping to Pe...'
mechjeb.warpToEvent('pe', 30)
wait(mechjeb.free)
print 'Circularizing...'
mechjeb.circularize(200000)
wait(mechjeb.free)
print 'Landing...'
if (lat == nil or lon == nil) then
mechjeb.land()
else
mechjeb.landAt(lat, lon)
end
end

function Mun(lat, lon)
local co = coroutine.create(MunDriver)
coroutine.resume(co, lat, lon)
end

Mun(12.46,39.21)

Link to comment
Share on other sites

Instructions for running the FlyMeToTheMun demo (while I compile a proper manual for Autom8):


  • [li]
Download this to PluginData/mumechlib/Mun.lua[/li]
[li]Open the Autom8 console and type: [tt]dofile('Mun')[/tt][return]. It should show: 'Usage: FlyMeToTheMun(lat, lon)'[/li]
[li]Type in the consone: [tt]FlyMeToTheMun(0, 0)[/tt][return]. You can use any other coordinates to land wherever you want.[/li]
[li]? ? ?[/li]
[li]Profit![/li]

For anyone having problems with the pods, and stuff like that: Please delete all Parts/mumech_* and get a copy fresh from the zip. Something changed on the game loader, and some old mesh caches are breaking the game.

You just got me to the moon, Congrats! :P

u7xGj.jpg

Link to comment
Share on other sites

I haven\'t been able to get MechJeb v1.9 to work with 0.16. I tried downloading a fresh 0.15 install, updating to 0.16, (running it a few times to be sure) then installing MechJeb 1.9. When I run KSP it starts loading all the parts like normal, than it gets hung up on mumech_mechjebpod. I\'ve let it sit for +45 minutes before with no luck.

I\'ve also tried removing that particular part from the parts folder, but it would get stuck on some other mumech part instead. I\'ve already tried running it in administrator mode as well with no success.

Link to comment
Share on other sites

v1.9 works fine with 0.16. You probably have an old version of mechjeb messing stuff up.


  • [li]Delete all the mumech* stuff from the parts and plugins folder.[/li]
    [li]Open KSP and check it\'s loading ok.[/li]
    [li]Extract v1.9 of mech jeb.[/li]

Link to comment
Share on other sites

I\'ve noticed in the 1.9 Version the Rendezvous system appears to be missing / removed. Was this intentional? I kind of enjoyed that feature.

Can we use the Autom8 to get Rendezvous? I might have time to experiment this weekend, but if anyone has figured it out, please share your script.

Link to comment
Share on other sites

Hello! Bug (?) found.

When I separate a rocket (fuel tank+MechJeb part+parachute+decoupler+fuel tank) from the command pod, for some reason all the parts are activated (parachute is opened, decoupler destroyed). It only happens with MechJeb, everything is fine without it.

b1MfR.jpg

Is it possible to improve MechJeb so that rocket would stay the same after separation? The thing is I want to use it as 2nd command pod (crewtank from Damned Aerospace allows to do that) :)

Link to comment
Share on other sites

It\'s been removed \'cause it didn\'t work properly, it\'s not made by r4m0n and we have to wait for it\'s developer to update it, then it might be re-added.

Not to argue but more than a few people think the features that did work were extremely useful for rendezvouz (ie side-by-side orbit info and relative velocity info).

Here\'s hoping it will be added again even if it\'s a stripped down version without the features that do not work.

Link to comment
Share on other sites

I have been having trouble with Orbiting, I am rather new to KSP altogether, so I have a rocket (TR Mun Rocket II) and it\'s a one man rocket for the Mun, since I am new to KSP I made the rocket rely on mechjeb for orbiting. I get fair way up but the rocket just stops and doesnt thrust any more, I am not in a orbit when this happens... far from it and the Ascent Auto Pilot says Gravity Turn but it just makes me slam in to the middle of Kerbin, I have to rely on my special final stage (nick named: The Mushroom) to get Jebediah safely home.

Link to comment
Share on other sites

Is it just me or does MechJeb not do polar orbits anymore, no matter what i set the inclination to, it\'s always a equitorial object.

MunCake, are you sure you haven\'t run out of fuel, or set the height too low in the ascent autopilot?

Link to comment
Share on other sites

Ive got a weird issue, which sometimes plagued me in 0.15 too but now it comes up more and more.

When I have a rocket with lots of stages, mainly SRB\'s, it screws up staging. It just activates all stages and makes the rocket explode. Ill upload an example craft when I get back home.

The issue is caused by MechJeb, because it\'s a hit and miss if it works and when I launch the rocket manually it always works as intended.

You can identify it going wrong by the fast clicking sound that comes off the rocket at launch.

Link to comment
Share on other sites

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