Jump to content

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


r4m0n

Recommended Posts

From my post: "This was with a fresh savegame started after making the MJ edits btw". I deleted everything in the saves folder and started new. I think I tried 3 ways of editing it (changing only the modules, changing only the parts, and changing both) and started fresh each time with no savegame editing at all.

I'm not aware of anything else that would need to be cleaned out, but please advise me if there is because it certainly did look like a glitched save.

Edit: Tried it again to make sure I wasn't hallucinating. Backed up part.cfg, edited all the tech to be flightControl, deleted my save folder and started fresh. Same result. :(

The following is all that's necessary for all MechJeb tech to be unlocked by Flight Control. It is guaranteed to work on a new save. Old saves are probably going to get broken and the save file will have to be edited to repair the ResearchAndDevelopment SCENARIO node as described. The last 4 sections of the config control where the items show up in the R&D section and I think they're cosmetic but put them in there in case they weren't


@PART[mumech_MJ2_AR202]:FINAL
{
!MODULE[MechJebCore]{}
MODULE
{
name = MechJebCore
MechJebLocalSettings
{
MechJebModuleCustomWindowEditor { unlockTechs = flightControl }
MechJebModuleSmartASS { unlockTechs = flightControl }
MechJebModuleManeuverPlanner { unlockTechs = flightControl }
MechJebModuleNodeEditor { unlockTechs = flightControl }
MechJebModuleTranslatron { unlockTechs = flightControl }
MechJebModuleWarpHelper { unlockTechs = flightControl }
MechJebModuleAttitudeAdjustment { unlockTechs = flightControl }
MechJebModuleThrustWindow { unlockTechs = flightControl }
MechJebModuleRCSBalancerWindow { unlockTechs = flightControl }
MechJebModuleRoverWindow { unlockTechs = flightControl }
MechJebModuleAscentGuidance { unlockTechs = flightControl }
MechJebModuleLandingGuidance { unlockTechs = flightControl }
MechJebModuleSpaceplaneGuidance { unlockTechs = flightControl }
MechJebModuleDockingGuidance { unlockTechs = flightControl }
MechJebModuleRendezvousAutopilotWindow { unlockTechs = flightControl }
MechJebModuleRendezvousGuidance { unlockTechs = flightControl }
}
}
}
@PART[mumech_MJ2_Pod]:FINAL
{
!MODULE[MechJebCore]{}
MODULE
{
name = MechJebCore
MechJebLocalSettings
{
MechJebModuleCustomWindowEditor { unlockTechs = flightControl }
MechJebModuleSmartASS { unlockTechs = flightControl }
MechJebModuleManeuverPlanner { unlockTechs = flightControl }
MechJebModuleNodeEditor { unlockTechs = flightControl }
MechJebModuleTranslatron { unlockTechs = flightControl }
MechJebModuleWarpHelper { unlockTechs = flightControl }
MechJebModuleAttitudeAdjustment { unlockTechs = flightControl }
MechJebModuleThrustWindow { unlockTechs = flightControl }
MechJebModuleRCSBalancerWindow { unlockTechs = flightControl }
MechJebModuleRoverWindow { unlockTechs = flightControl }
MechJebModuleAscentGuidance { unlockTechs = flightControl }
MechJebModuleLandingGuidance { unlockTechs = flightControl }
MechJebModuleSpaceplaneGuidance { unlockTechs = flightControl }
MechJebModuleDockingGuidance { unlockTechs = flightControl }
MechJebModuleRendezvousAutopilotWindow { unlockTechs = flightControl }
MechJebModuleRendezvousGuidance { unlockTechs = flightControl }
}
}
}
@PART[mumech_MJ2_AR202_features1]
{
@TechRequired = flightControl
}
@PART[mumech_MJ2_AR202_features2]
{
@TechRequired = flightControl
}
@PART[mumech_MJ2_AR202_features3]
{
@TechRequired = flightControl
}
@PART[mumech_MJ2_AR202_features4]
{
@TechRequired = flightControl
}


@PART
[*]:HAS[@MODULE[ModuleCommand],!MODULE[MechJebCore]]:Final
{
MODULE
{
name = MechJebCore
MechJebLocalSettings {
MechJebModuleCustomWindowEditor { unlockTechs = flightControl }
MechJebModuleSmartASS { unlockTechs = flightControl }
MechJebModuleManeuverPlanner { unlockTechs = flightControl }
MechJebModuleNodeEditor { unlockTechs = flightControl }
MechJebModuleTranslatron { unlockTechs = flightControl }
MechJebModuleWarpHelper { unlockTechs = flightControl }
MechJebModuleAttitudeAdjustment { unlockTechs = flightControl }
MechJebModuleThrustWindow { unlockTechs = flightControl }
MechJebModuleRCSBalancerWindow { unlockTechs = flightControl }
MechJebModuleRoverWindow { unlockTechs = flightControl }
MechJebModuleAscentGuidance { unlockTechs = flightControl }
MechJebModuleLandingGuidance { unlockTechs = flightControl }
MechJebModuleSpaceplaneGuidance { unlockTechs = flightControl }
MechJebModuleDockingGuidance { unlockTechs = flightControl }
MechJebModuleRendezvousAutopilotWindow { unlockTechs = flightControl }
MechJebModuleRendezvousGuidance { unlockTechs = flightControl }
}
}
}

(split the config in half. First half just patches the AR202 and the other MJ pod. The second will then provide MJ to all cores and probes, again also all available at flightControl.

Edited by Starwaster
Split patch into AR202/MJ probe and 'MJ for all pods/cores
Link to comment
Share on other sites

I'm guessing that when you see this your orbit is very close to circular. For circular orbits the position of periapsis is not well defined, and for near-circular orbits the position of periapsis will be very sensitive to small perturbations to the orbit. So probably what you're seeing is physics integration errors + near-circularity.
AgP is also counted from the ascending node, so if your inclination is close enough to zero that the position of the ascending node is not well defined, any drift in that calculation will also show up in the number that gets reported for AgP.

Ok, that makes sense, thanks. Is it actually both inclination and eccentricity?

I know that if very small eccentricites are involved, the periapsis/apoapsis start to flicker. But then they oscillate around a certain point, let's call that the "real periapsis/apoapsis". But the AgP has a constant drift! I think that's really weird, especially since...

but the only way MechJeb would be contributing is if RCS was firing for attitude control and you didn't know it.

... I turned off RCS and shut down the engines so there are definitely no forces involved.

KSP uses a fixed but arbitrary direction as the reference direction. I don't think there's anything special about it. It seems to point roughly opposite the center of the galaxy in the stock skybox. You can determine the reference direction for yourself by setting up an orbit with LAN=0. Then the ray from the center of the planet to the ascending node will point along the reference direction.
Regarding LAN, the equinox reference direction is where Earth's equator crosses Earth's orbital plane. In KSP, where the equator and the orbital plane coincide, there's no clear "physical" reference for the zero direction, but there are coordinates that the game uses internally. Zero celestial longitude is probably "the direction Kerbin's prime meridian points at the epoch". MechJeb gets position information from the game in the coordinates the game uses and reports your LAN relative to the game's zero direction.

Thanks for the clarification guys, that was very helpful!

Link to comment
Share on other sites

Already posted before but maybe lost in the crowed MJ thread: with multiple version of MJ, and the last 2.3.1.0, it would be better to use fixed length, 2 digits numbers for time, especially for AP/PE time as in TW, the text shift 1 or more char from left to right when going from 1 to 2 digits numbers:

t0 AP: 15.2s

t1 AP: 15.1s

t2 AP: 15.0s

t3 AP: 14.59s <- shift

...

AP= 14.10s

AP= 14.9s -> shift

...

with big number (orbital period in days) in high timewarp speed, text "moves" from left to right and right to left, which is painful to watch and it makes the display quite "blurry".

It'd be better to have all time in fixed length: xxx day xx h xx m xx s so 'd', h', 'm' and 's' chars stay aligned all the time even when numbers change fast.

Thanks.

Link to comment
Share on other sites

I get constant crashes the second I start a new game oder load an existing one and this only happens when Mechjeb is installed. Ksp is the latest 0.24.2 64bit version and Mechjeb with the 288 dev release. Can someone tell me which logfiles I could post?

Link to comment
Share on other sites

The following is all that's necessary for all MechJeb tech to be unlocked by Flight Control.

Nope, reinstalled KSP and there's still phantom parts showing up in the research center and etc... Could you post a final part.cfg? I don't use mod manager or any other mod besides Jeb.

Link to comment
Share on other sites

Nope, reinstalled KSP and there's still phantom parts showing up in the research center and etc... Could you post a final part.cfg? I don't use mod manager or any other mod besides Jeb.

You are sure that what you're seeing are not the part that are only visible in the R&D screen to show where My features are unlocked ( 1st one is called "MechJeb Features- Maneuver & Translatron"

Enthalpy: MechJeb report contact with the ground. landing is obviously successful.

Link to comment
Share on other sites

Nope, reinstalled KSP and there's still phantom parts showing up in the research center and etc... Could you post a final part.cfg? I don't use mod manager or any other mod besides Jeb.

I never edit part configs (unless it's for a parts pack that I'm creating) so I have nothing to send you.

It's not a good idea to make changes by editing the actual part configs because it is too easy to lose those changes when a mod/parts pack/KSP itself is updated. Then you have to remember that you made those changes and have to have those altered config files backed up somewhere so you can copy them back over.

For example, I have a folder named MyTweaks that I created shortly after I started using Module Manager as a player. It's the second thing to be copied over when KSP is updated (with the first being Module Manager) unless I explicitly need my install to be stock. That way my desired changes are always available.

Anyway, I think what Sarbian is saying is true, you're just seeing the 'feature' parts that show what part of MechJeb is going to be unlocked. They don't really have any functionality besides that.

Link to comment
Share on other sites

I never edit part configs

Well there must be a config file being modified for KSP to pick up your changes, I was hoping to get a look at that one. The part I'm seeing isn't the feature parts, as I deleted those from the config.

Link to comment
Share on other sites

Well there must be a config file being modified for KSP to pick up your changes, I was hoping to get a look at that one. The part I'm seeing isn't the feature parts, as I deleted those from the config.

I posted it. That code in the spoilers? That's it. That's all that's necessary. Module Manager sees that and patches the parts. It changes their config using only what I posted. If MM is installed and you paste that into a file ending in .cfg then MecJeb is available in its entirety at the first unlock.

With the aforementioned caveat that pre-existing games may break and require editing of save game files.

Link to comment
Share on other sites

@Doctor Lag

The files that Starwaster and I posted are specifications for Module Manager to modify the .cfg files that are being loaded by KSP. The actual files are not modified. The copy in memory that is being used by KSP is modified.

That said, you can modify the .cfg files in the KSP/GameData/Squad/ subdirectories by adding the MODULE { name = MechJebCore MechJebLocalSettings { ... } } sections to parts that are to enable MechJeb. Editing the save files might be a bit more complex. The issue is that KSP gets confused if there is more than one PART { ... } specification with the same name property. When that occurs, KSP allows you to research the part, but does not allow you to construct ships with the part. There is an explanation of why in one of my earlier posts in this thread.

skips

Link to comment
Share on other sites

@sarbian,

I have traced down a likely candidate for the cause of the TimeOuts that occur when using the Landing Guidance. It appears to be an unfortunate interaction between the value of maxSimulatedTime, which is set to 2000 seconds in class ReentrySimulation, and the IDescentSpeedPolicy PWBCoastDescentSpeedPolicy. The PWBCoastDescentSpeedPolicy sets the maximum velocity (MaxAllowedSpeed) when below the coast radius to be 1 m/sec. The coast radius is set to be twice the landingSiteDragLength. When parachutes are enabled, this length is quite short as the typical terminal velocity is 5 - 10 m/sec. Without parachutes the DragLength is significantly larger. As a result the duration of the reentry is extended by a time that is like the DragLength divided by 1 m/sec.

Watching reentries indicates that the times without parachutes often reach 30 minutes (i.e., 1800 seconds). The jitter in the calculation results in the timeouts. My assessment is that there are two "quick fixes": up the time for maxSimulatedTime to something like 4000 seconds _or_ increase the speed in the else clause of PWBCoastDescentSpeedPolicy.MaxAllowedSpeed() to a larger value (e.g., 2 m/sec). The correct solution appears to be to set the velocity in the else case to be slightly larger than the terminal velocity, but this approach might require redoing a bunch of the reentry simulation code.

skips

Link to comment
Share on other sites

I get constant crashes the second I start a new game oder load an existing one and this only happens when Mechjeb is installed. Ksp is the latest 0.24.2 64bit version and Mechjeb with the 288 dev release. Can someone tell me which logfiles I could post?

Any chance to get an answer on my question? It is really anoying because my slow i5 4200u notebook does not crash, only my PC with the new AMD 280x GPU.

Link to comment
Share on other sites

@skips: good find. I remember changing the sim length a bit when I looked into the AP but I did not make the link. I'll think about it.

@Shedao: 64bit IS instable. Exception handling crash 64bit and we can't do much about it

Link to comment
Share on other sites

@Doctor Lag

The files that Starwaster and I posted are specifications for Module Manager to modify the .cfg files that are being loaded by KSP. The actual files are not modified. The copy in memory that is being used by KSP is modified.

Thank you, that's what I didn't understand. Installing MM to manage a single mod seems like overkill to me, so I'll try your other tips to see if I can get it going. Thanks!

Edit: Not sure what I was doing wrong before, but just changing the first module's unlockTechs seems to work, at least so far. In case it's useful for anybody else, here's my part.cfg moving MJ to basic rocketry:


PART {
// --- general parameters ---
name = mumech_MJ2_AR202
module = Part
author = r4m0n/The_Duck (code) || keptin (part)

// --- asset parameters ---
mesh = model.mu
rescaleFactor = 0.75

// --- node definitions ---
node_attach = 0.0, 0.0, 0.0, 1, 0, 0

// --- editor parameters ---
TechRequired = basicRocketry
entryCost = 15000
cost = 750
category = Control
subcategory = 0
title = MechJeb 2 (AR202 case)
manufacturer = Anatid Robotics
description = A ruggedized version of MechJeb's neural circuits in a radial-mount case.

// attachment rules: stack, srfAttach, allowStack, allowSrfAttach, allowCollision
attachRules = 0,1,0,0,0

// --- standard part parameters ---
mass = 0.00001
dragModelType = default
maximum_drag = 0.0
minimum_drag = 0.0
angularDrag = 0
crashTolerance = 6
maxTemp = 2900

CrewCapacity = 0

vesselType = Probe

MODULE
{
name = ModuleCommand
minimumCrew = 0

RESOURCE
{
name = ElectricCharge
rate = 0.005
}
}

MODULE
{
name = MechJebCore
MechJebLocalSettings {
MechJebModuleCustomWindowEditor { unlockTechs = basicRocketry }
MechJebModuleSmartASS { unlockTechs = basicRocketry }
MechJebModuleManeuverPlanner { unlockTechs = basicRocketry }
MechJebModuleNodeEditor { unlockTechs = basicRocketry }
MechJebModuleTranslatron { unlockTechs = basicRocketry }
MechJebModuleWarpHelper { unlockTechs = basicRocketry }
MechJebModuleAttitudeAdjustment { unlockTechs = basicRocketry }
MechJebModuleThrustWindow { unlockTechs = basicRocketry }
MechJebModuleRCSBalancerWindow { unlockTechs = basicRocketry }
MechJebModuleRoverWindow { unlockTechs = basicRocketry }
MechJebModuleAscentGuidance { unlockTechs = basicRocketry }
MechJebModuleLandingGuidance { unlockTechs = basicRocketry }
MechJebModuleSpaceplaneGuidance { unlockTechs = basicRocketry }
MechJebModuleDockingGuidance { unlockTechs = basicRocketry }
MechJebModuleRendezvousAutopilotWindow { unlockTechs = basicRocketry }
MechJebModuleRendezvousGuidance { unlockTechs = basicRocketry }
}
}

MODULE
{
name = MechJebAR202
}

RESOURCE
{
name = ElectricCharge
amount = 5
maxAmount = 5
}
}

PART {
// --- general parameters ---
name = mumech_MJ2_AR202_features1
module = Part
author = r4m0n/The_Duck (code) || keptin (part)

// --- asset parameters ---
mesh = model.mu
rescaleFactor = 0.75

// --- editor parameters ---
TechRequired = advFlightControl
entryCost = 15000
cost = 750
category = none
subcategory = 0
title = MechJeb Features- Maneuver & Translatron
manufacturer = Anatid Robotics
description = Unlocks the following MechJeb windows: Maneuver Planner, Translatron, Warp Helper, Attitude Adjustment, Thrust Window, RCS Balancer. Once unlocked, all existing MechJeb modules will be automatically upgraded to latest firmware.

// --- standard part parameters ---
mass = 0.00001
dragModelType = default
maximum_drag = 0.0
minimum_drag = 0.0
angularDrag = 0
crashTolerance = 6
maxTemp = 2900

CrewCapacity = 0

vesselType = Probe
}

PART {
// --- general parameters ---
name = mumech_MJ2_AR202_features2
module = Part
author = r4m0n/The_Duck (code) || keptin (part)

// --- asset parameters ---
mesh = model.mu
rescaleFactor = 0.75

// --- editor parameters ---
TechRequired = fieldScience
entryCost = 15000
cost = 750
category = none
subcategory = 0
title = MechJeb Features- Rover Autopilot
manufacturer = Anatid Robotics
description = Unlocks the following MechJeb windows: Rover Autopilot. Once unlocked, all existing MechJeb modules will be automatically upgraded to latest firmware.

// --- standard part parameters ---
mass = 0.00001
dragModelType = default
maximum_drag = 0.0
minimum_drag = 0.0
angularDrag = 0
crashTolerance = 6
maxTemp = 2900

CrewCapacity = 0

vesselType = Probe
}

PART {
// --- general parameters ---
name = mumech_MJ2_AR202_features3
module = Part
author = r4m0n/The_Duck (code) || keptin (part)

// --- asset parameters ---
mesh = model.mu
rescaleFactor = 0.75

// --- editor parameters ---
TechRequired = unmannedTech
entryCost = 15000
cost = 750
category = none
subcategory = 0
title = MechJeb Features- Ascent, Landing, Spaceplane
manufacturer = Anatid Robotics
description = Unlocks the following MechJeb windows: Ascent Autopilot, Landing Autopilot, Spaceplane Guidance. Once unlocked, all existing MechJeb modules will be automatically upgraded to latest firmware.

// --- standard part parameters ---
mass = 0.00001
dragModelType = default
maximum_drag = 0.0
minimum_drag = 0.0
angularDrag = 0
crashTolerance = 6
maxTemp = 2900

CrewCapacity = 0

vesselType = Probe
}

PART {
// --- general parameters ---
name = mumech_MJ2_AR202_features4
module = Part
author = r4m0n/The_Duck (code) || keptin (part)

// --- asset parameters ---
mesh = model.mu
rescaleFactor = 0.75

// --- editor parameters ---
TechRequired = advUnmanned
entryCost = 15000
cost = 750
category = none
subcategory = 0
title = MechJeb Features- Rendezvous & Docking
manufacturer = Anatid Robotics
description = Unlocks the following MechJeb windows: Rendezvous Guidance, Rendezvous Autopilot, Docking Autopilot. Once unlocked, all existing MechJeb modules will be automatically upgraded to latest firmware.

// --- standard part parameters ---
mass = 0.00001
dragModelType = default
maximum_drag = 0.0
minimum_drag = 0.0
angularDrag = 0
crashTolerance = 6
maxTemp = 2900

CrewCapacity = 0

vesselType = Probe
}

Edited by Doctor Lag
Link to comment
Share on other sites

@skips: good find. I remember changing the sim length a bit when I looked into the AP but I did not make the link. I'll think about it.

Seems to be an issue with lower orbit starts on landing guidance. I tried to do a land somewhere abort from a 64KM Kerbin orbit (rather than ride out the slow decay to crashing) and LG would just instantly time out.

Starting from just above the top of atmo it'll time out some of the time, sometimes hitting abort then land at target again will set it right, especially when it's making all kinds of completely wrong "corrections". But some times it'll time out several times before the craft gets to the lower atmo.

Starting landings well above atmo top seems to be the best way to avoid LG timeouts as it currently is.

Link to comment
Share on other sites

@Doctor Lag MM was made for that. When you edit the file you take the risk that you will forget to do it after an update and mess up your save because the part tech changed.

Link to comment
Share on other sites

@Doctor Lag MM was made for that. When you edit the file you take the risk that you will forget to do it after an update and mess up your save because the part tech changed.

IMO it's just another thing to update when a new KSP build drops. Anyway, who's to say a MM config file will still be valid after an update? It's the same amount of work either way.

Also I start a new save after each major update anyway.

Link to comment
Share on other sites

Anyway, who's to say a MM config file will still be valid after an update? It's the same amount of work either way.

Ok now you're just inventing excuses. I'm using the same config files now as I was a year and a half ago. The only way they would become 'invalid' as you say is if the syntax were willfully changed. Module Manager config files are akin to an interpreted language or a script. There is nothing at all that could change in KSP that would require the syntax of a config file to change. You do not know what you are talking about if you think otherwise.

Use Module Manager, don't use Module Manager.

Noodles, don't noodles.

But don't spread disinformation.

Link to comment
Share on other sites

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