Jump to content

ecat

Members
  • Posts

    301
  • Joined

  • Last visited

Everything posted by ecat

  1. Just a FYI. That's the Beta release of my Centre of Mass tracking code for the Adjustable Rails up... http://forum.kerbalspaceprogram.com/showthread.php/47780-PLUGIN-0-21-x-Automatic-Centre-of-Mass-Tracking-0-01
  2. Starting with a design for an asymmetrical craft I knew there would be problems placing the engines. Realising the craft would go from a mass of 50t empty through 87t fully fueled all the way to 190t with a full load of kethane it was obvious that no simple 'three engines fixed in place' solution existed. I had to find some way to move those engines. With almost perfect timing Sirkut and Devo released an extension to the Infernal Robotics (IR) mod, adding the possibility of linear movement via an adjustable rail. Add the rail to the rear of the craft, affix the engines to the rail and... Perfect... ... almost... Finding the correct position for the engines was not as tricky as I expected it to be, well, after a couple of guesses at least. The problem came when under power as the Centre of Mass slowly shifted, reaching the impossible when under x4 physics acceleration during those long NERVA burns. If only I could get the rails to adjust automatically. I came up with an ever so simple solution that worked well for a limited set of rail orientations. Good enough for my requirements. During some tests I made a video which I posted to the main IR thread http://forum.kerbalspaceprogram.com/showthread.php/37707-0-21-Magic-Smoke-Industries-Parts-Infernal-Robotics-0-8 ... and it turns out I'm not the only one interested in forcing the asymmetrical to behave in a civilised fashion. After a few requests and a craft designed to take advantage my magic rail tracking, should I ever release it, I got down to the serious business of turning a one-off solution into something which should, hopefully, work in a good number of configurations... So, here we have it. The beta release of my... what should we call it?... ecCoMAdj for IR Adjustable Rail. The zip includes the plugin and two parts: 'ec Cube of Rail Balance' which is a tracking enabled Cubic Strut that can be found under Structural. To use this part, place the IR Adjustable Rail (full size, 1/2 or 1/4) then place the part on the rail. Part on rail, it will not work any other way. Once the part is placed you a free to reposition the rail any way you wish. You are also free to add any other parts, an engine for example, to the ec Cube. 'ec LV-T45 Liquid Fuel Engine' which is a tracking enabled LV-T45 which I've hidden under Propulsion. This is used in much the same way as the above BUT the 'Editor Extensions' mod is needed as the modified engine can only be placed directly on the rail if 'Surface Attachment' is enabled. To install just copy the ecMods directory to your GameData directory. Requires Infernal Robotics http://forum.kerbalspaceprogram.com/showthread.php/37707-0-21-Magic-Smoke-Industries-Parts-Infernal-Robotics-0-8 The zip also includes four demo craft for your VAB. ecCoMAdj Test 1 ec T45 NoMJ ecCoMAdj Test 1 ec Cube T45 NoMJ ecCoMAdj Test 1 ec T45 ecCoMAdj Test 1 ec Cube T45 All should reach orbit but none have return capability so be ready to 'Revert Flight' before you strand your pilot. The Cube versions use a standard engine mounted on an ec Cube, the non-Cube versions mount the engine directly to the rail. By default CoM tracking is disabled. To enable either set an action key or right click the part in flight. The code still includes a little debugging output that may swell your log file a little but hopefully no by too much. -------------------------------------------- Zip... http://www.i2net.me.uk/files/Games/KerbalSP/MyMods/ReleasedMods/ecCoMAdjModule/ecCoMAdjModule-00.21.00.01-Mod.zip -------------------------------------------- Source... License: Released under CC BY-NC-SA 3.0 Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported License. http://www.i2net.me.uk/files/Games/KerbalSP/MyMods/ReleasedMods/ecCoMAdjModule/ecCoMAdjModule-00.21.00.01-Source.zip If anyone knows of a better way to do the 'which way is the rail pointing' code I'd be more than happy to hear from you. As it is, it's light weight and works. In fact if anyone knows of a better way to do any of this, as it's my first KSP mod I'd love to hear form you
  3. Sorry for the delay, my 3d voodoo is weak. I'm fairly certain the dll included in the .zip, while still highly experimental, should work under many more configurations than the one I started with. Certainly my Mosquito test flight went without a hitch. The .zip contains ReadMe file. Modified Mosquito craft. The part which does the balancing... Only works with the Infernal Robotics Adjustable Rail, must be placed on the Adjustable Rail. Balancing plugin. http://www.i2net.me.uk/files/Games/KerbalSP/MyMods/Mosquito.zip I have now released the official Beta version of the balancing mod used in the above http://forum.kerbalspaceprogram.com/showthread.php/47780-PLUGIN-0-21-x-Automatic-Centre-of-Mass-Tracking-0-01
  4. <chuckle> No problem. As for 'like it', it's beautiful and you created the perfect craft for me to move to the next stage of development. If you can wait a day we can see if my cry for help http://forum.kerbalspaceprogram.com/showthread.php/37707-0-21-Magic-Smoke-Industries-Parts-Infernal-Robotics-0-7?p=611176&viewfull=1#post611176 turns up anything positive. Then you can have a mod that will deal with any and almost all strange angles you choose instead of my current 'it's ok if it's flat and straight and in the Y plane but I got it working a bit in Z too' solution
  5. Thanks for the reply, though it may be a while before my 2d brain can understand it... Yes, I too have to assume that the thrust vector points outwards from the rail's surface, if only for the sake of my sanity. I think the Vessel, CoM, CoT and the rail all share a common coordinate system, at least that is the premise I've been working on and it appears to be working. So, I guess everything is already local. This also means that working out the distance is simple once I know 'which way the rail is pointing' and this is where I come unstuck. At the moment I use an ever growing collection of 'if' statements to determine the direction eg. ... railYRot = railYRot - railZRot; // correct for Z rotation ??? if (railYRot >= 360) railYRot = railYRot - 360; if ((railYRot >= (90 - 45)) && (railYRot <= (90 + 45))) posError = (partCoM.x - vesselCoM.x); //. for rail ( 90, 90, 0 ) else if ((railYRot >= (180 - 45)) && (railYRot <= (180 + 45))) posError = -(partCoM.z - vesselCoM.z); //. for rail ( 90, 180, 0 ) else... which is fine for trivial cases. The more complex case I was playing with is from this thread http://forum.kerbalspaceprogram.com/showthread.php/47232-Mosquito-Kethane-Drone where I have co-opted BahamutoD's excellent ship to experiment with (see post #9). I can get it working but using ever more complex 'if' statements is not the way forward. The rotation information I have on the rails in the above example is Lower Horizontal (ish) Rails: E rotation (83.66853, 270, 296.323) E rotation (83.66856, 89.99957, 63.67655) Vertical (ish) Rails: E rotation (5.033035, 359.2179, 356.956) E rotation (5.033036, 0.7820649, 3.044015) All I really want is one out of the six +/-X, +/-Y, +/-Z. So the above horizontals would be -Y and the verticals would be +Z for example - assuming I have my + and - the right way around in my head.
  6. Returning to my CoT/CoM alignment mod, http://forum.kerbalspaceprogram.com/showthread.php/37707-0-21-Magic-Smoke-Industries-Parts-Infernal-Robotics-0-7?p=581931&viewfull=1#post581931 I've reached the point where I need some 3d transformation help. How much help? I don't even posses the language required to express the problem so, probably quite a lot of help. I have an IR rail, the rail has two positional components, an origin vector and a rotation vector which are expressed in Vessel coordinates. It is a rail so it can only move along a single axis, in a positive direction or a negative direction. When the rail is created in the SPH it is aligned along the Y axis (I think) with a rotation of (0,0,0) (X would be left to right and Z floor to ceiling). When extended a point on the rail will move in the negative direction (I think) and when retracted the point will move in the positive direction along the Y axis. The tricky part: Given the rotation vector of the rail how do I in C#... 1) Work out which axis the rail is parallel to, or the axis which the rail is 'most parallel' to when not at an exact 0,90,180,270 degree alignment? 2) Work out if extending the rail will move a point on it in a negative or positive direction? I'm sure there is a neat 3d matrix solution. At the moment my 2 dimensional brain is working in 2 dimensional planes which is fine for my current, simple requirements, but just this morning I extended the code to work in a second plane - which is becoming messy, and also had to deal with an additional combination of Y an Z rotations - which is going to become very messy very quickly. Any pointers gratefully accepted.
  7. I love this, we need more insects in the game. It also gave me the ideal platform to play with a mod I've been working on http://forum.kerbalspaceprogram.com/showthread.php/37707-0-21-Magic-Smoke-Industries-Parts-Infernal-Robotics-0-7?p=581931&viewfull=1#post581931 So, without further ado, The Mosquito, auto balanced on the fly <chuckle> For those curious, MechJeb is only there to show the Vessel info. BahamutoD, if you wish I can send you the mod and modified Mosquito, everyone else will have to wait until I either 1) Work out how to do 3d transforms correctly or 2) find someone who can.
  8. Whoosh! That's the sound of the information from the link flying over my head The first time I heard a bang I thought 'that must be the joint' but no, it wasn't the joint, it was the solar panels attached to the tank which was attached to the joint. I don't know when the game applies breaking physics, I don't know when the game applies movement physics, I don't when or where the plugin code fits with the sequence and I don't know how to detect warp. I do think it's worth remembering there are situations where strange things can happen, maybe that's enough for now.
  9. With the option to 'Lock' removed this may no longer be an issue worth investigating. I was interested for two reasons: 1) If the 'lock' option does nothing then what is going on? 2) With lock enabled the time warp to orbit ends in one of two possible scenarios. Either the free to rotate parts adjust position - in this case they they often appear to jump/snap into position, or the free to rotate parts do not rotate which results in instant boom. Why is this interesting? It looks like a timing problem. If there is time to reposition before the boom physics kicks in then all is well, but if the boom physics kicks in before the parts are where they should be then, boom. I don't know enough about the game internals to make a definitive comment but watching extreme terminal conditions is one way to learn.
  10. Offended? No, no worries there. The mod needs feedback, heck, the game needs feedback. It's probably better all round to encourage a higher quality of reporting than risk sounding dismissive or offensive or offended
  11. The peep in question could certainly be wrong which is why they provided the .craft file and MechJeb ascent profile used during testing so anyone and everyone with an interest can take an hour or so of their time to try and recreate the problem. Capturing the video did take an hour or so with another couple of hours prior time spent making the correlation between lock and boom, and another couple of hours yesterday spent looking at the times when it doesn't go boom. The conclusion could still be wrong. The correlation is circumstantial, but after several hundred launch events involving Stock+MechJeb craft which do not explode, when the boom begins after the addition of one single additional part... The correlation is circumstantial but strong but it could still be wrong. Finally, the peep in question could just keep quiet about the problem and move on. The peep likes this mod and sees how much joy and creativity it has already inspired, the peep admirers and thanks the devs for all their time and hard work in bringing this mod up to date, the peep does not want to see this mod acquire a reputation for bugs random or otherwise.
  12. This guy has a ready made roller coaster g force conditioning unit for the amusement park astronaut training complex
  13. heh! The reason I couldn't find any glaring errors when compared to the code used in B9 etc is that there are no glaring errors... Apart from one... UnityEngine.Vector3 debugCoM = FlightGlobals.ActiveVessel.localCoM; ActiveVessel is not valid first time through the editor so the code failed to complete which for some reason broke the default engine initialisation. After the first flight all appeared well.
  14. Thanks for the reply. I don't think I modify anything to do with the stock part, I just use its position for reference and access its parent node. Also I do have a test for Editor mode, so I think I have that covered. Here's the meat of the code. It's messy and full of debug and reveals the fact that I only know how to work in two dimensions but it will save time. This work is licensed under a Creative Commons Attribution-NonCommercial 3.0 Unported License // // Start States // None = 0, Editor = 1, PreLaunch = 2, Landed = 4, Docked = 8, // Flying = 16, Splashed = 32, SubOrbital = 64, Orbital = 128 // public override void OnStart(StartState state) { base.OnStart(state); actionActivate = new KSPActionParam(0, KSPActionType.Activate); actionDeactivate = new KSPActionParam(0, KSPActionType.Deactivate); UnityEngine.Vector3 debugCoM = FlightGlobals.ActiveVessel.localCoM; Vector3 coMOffset = this.part.CoMOffset; // orgPos; // maxPosError = 0.005f; Debug.Log("ecCoMAdj maxPosError " + maxPosError); // trackCoM = false; currentMovement = 0; // GUICoMTrkOff(); SetGUICoMTrkEvents(); Debug.Log("ecCoMAdj StartState " + (int)state ); if (state != StartState.None && state != StartState.Editor) { Debug.Log("ecCoMAdj Starting Part data1 P() R() (" + this.part.orgPos.x + ", " + this.part.orgPos.y + ", " + this.part.orgPos.z + ") (" + this.part.orgRot.x + ", " + this.part.orgRot.y + ", " + this.part.orgRot.z + ")"); Debug.Log("ecCoMAdj Starting CoM data1 V() P() (" + debugCoM.x + ", " + debugCoM.y + ", " + debugCoM.z + ") (" + coMOffset.x + ", " + coMOffset.y + ", " + coMOffset.z + ")"); debugCoM = FlightGlobals.ActiveVessel.localCoM; Vector3 coMOffset2 = this.part.orgPos; Debug.Log("ecCoMAdj Starting CoM data2 V() P() (" + debugCoM.x + ", " + debugCoM.y + ", " + debugCoM.z + ") (" + coMOffset2.x + ", " + coMOffset2.y + ", " + coMOffset2.z + ")"); Debug.Log("ecCoMAdj Starting Parent partName, ClassName " + this.part.parent.partName + ", " + this.part.parent.ClassName); Debug.Log("ecCoMAdj Starting Parent Q rotation (" + this.part.parent.orgRot.x + ", " + this.part.parent.orgRot.y + ", " + this.part.parent.orgRot.z + ")"); Debug.Log("ecCoMAdj Starting Parent E rotation (" + this.part.parent.orgRot.eulerAngles.x + ", " + this.part.parent.orgRot.eulerAngles.y + ", " + this.part.parent.orgRot.eulerAngles.z + ")"); } Edit: I've just noticed that when the engine is first added as mentioned above, it does have the thrust animation but it does not have an engine staging icon! The icon appears correctly in Flight and after a Revert.
  15. The only mods used in that craft are IR and MechJeb, not a single strut of any kind. No, it has not happened without using lock. But if lock on a free washer doesn't do anything then... Well, it is confusing and may indicate a more fundamental problem. In two months playing KSP I've only had one unexplainable disassembly, that craft also used IR parts but it also used Kethane, B9, UBI Welding(?) and several other mods so no blame attributed, but I would very much like to minimise the chances of it ever happening again ----------------------- The things you folk are making are amazing! Loving it all.
  16. I have a little plugin that can be applied to engines via part.cfg MODULE { name = ecCoMAdjPart maxPosError = 0.005 } The plugin overrides OnStart public override void OnStart(StartState state) { base.OnStart(state); ... and implements public void FixedUpdate() { ... It's really quite simple code and appears to work fine with one cosmetic exception: when I add a modified engine in SPH or VAB or load a craft file containing one or more modified engines they appear with fully animated exhaust/thrust tails. Once I switch to 'Flight' everything is fine and on reverting from Flight to the editor building the engines 'go out'. It looks very much like an initialisation problem. I've looked around for examples and poked and prodded my code to no avail. What do I need to do to ensure that when an engine is added in the editor it appears without the eyeball burning animation?
  17. I accept this, but something is going on. Continuing from http://forum.kerbalspaceprogram.com/showthread.php/37707-0-21-Magic-Smoke-Industries-Parts-Infernal-Robotics-0-7?p=601202&viewfull=1#post601202 I cannot attain 100% repeatability of this spontaneous unplanned disassembly event but I can recreate it with worrying frequency and so far it appears to only happen when at least the upper free washer is locked. Possibly most if KSP has just been started and this is the first launch... even then it's a bit random <grrrrrr> So, is this a 'lock of a part that shouldn't be locked problem' or a free washer problem or something more generic to the IR pack or simply something wrong with the craft/game? It's appears always related to the Pack/Unpack sequence, I'm fairly certain if I remove the washers the problem will vanish altogether. I apologise for banging on about this issue but any unplanned disassembly event can ruin your day, I try to identify and avoid any possible causes whenever possible.
  18. Sometimes this appears to be the case, other times the rotation does appear to be locked. On the odd occasion strange and unexpected things happen. http://www.i2net.me.uk/files/Games/KerbalSP/Ships/RotationTests/RotationMechJebMkI.craft The above uses IR and MechJeb. It has two free washers, one at the front of the command pod, the other at the rear of the command pod. Launch it in the default configuration, free washers unlocked, and you may see some rotation. Launch it with the washers locked (action key 3 to toggle) and you probably will not see any rotation on the way to orbit. Once in orbit you may see the front, the rear or both start to rotate and on the odd occasion, usually at the start of the circularisation burn, the solar panels will spontaneously explode! Anyway, that was a test using command pod rotation to rotate the centre section but this experiment proved to be much more interesting so I may as well share it... http://www.i2net.me.uk/files/Games/KerbalSP/Ships/RotationTests/RotationKASMkII.craft Using IR, MechJeb and KAS. When energised the KAS electromagnets appear to be attracted to Kerbin's magnetic field (certainly the south pole). Put this ship into orbit, assume a normal attitude, press 2 to activate the KAS magnets and watch as this 'electric motor' spins the centre section Key 1 opens the solar panels, you may need these.
  19. @saik0, This thread is full of wonders but your little biplane my be the greatest wonder yet.
  20. It been a while since I tried a stock heavy lifter... This was one of my early attempts at a jet powered 36km stage From http://forum.kerbalspaceprogram.com/showthread.php/35743-200-kerbal-tons-to-LKO-worth-it?p=451799&viewfull=1#post451799 Development continued until I could no longer live with the lag. This updated version carried 11 jumbos resulting in over 300t of the payload reaching 100km orbit iirc. From http://forum.kerbalspaceprogram.com/showthread.php/35743-200-kerbal-tons-to-LKO-worth-it?p=463563&viewfull=1#post463563
  21. Disclaimer: What I am about to say will not help at all, not just because I don't know what I'm talking about. The speed of light is not relative to anything, the speed of light is a constant. Two particles each travelling at the same near light speed. One is approaching from the east the other from the west. If you are equidistant between them then both will reach you at exactly the same time. This is allowed. The closing velocity of the two particles is greater than the speed of light, this is allowed as neither is travailing faster than the speed of light. Particle one does not 'see' particle two closing at faster than the speed of light because for that to happen 'something' would need to be travelling faster than the speed of light which is not allowed - kind of. Pick one of the following two statements: 1) The universe has no centre. 2) You are the centre of the universe. It doesn't matter which one you chose as both are true. Two galaxies or clusters or super clusters, you can pick your own scale. Neither travelling at anywhere near the speed of light yet they may be diverging from each other at a speed greater than the speed of light. This is allowed. Since galaxy one cannot 'see' galaxy two there is no violation of relativity and since the divergence is caused by the compounded effect of the expansion of space, with no single volume of space expanding at a rate greater than light speed, no laws are broken. Tehe. Science! It makes everything so clear
  22. Phew. ty for the info Edit: Actually... It will pop at a speed of 0.3 too... Certainly when under 4x physics warp
  23. Right now you may be flushed with success but just wait until you see the captain's log.
  24. So long as there is a 'Rail at limit' variable or some way of reading the position? The reason I was testing the end limit was to check that my engines wouldn't spontaneously enter a different orbit.
  25. Cool. Good News: You don't need all the other parts, just the rail. Even Better News: Arrange 19 rails pointing downwards around a Cupola module and you can reach an altitude of over 7km! I think you should keep it in the pack for all the weapon mongers... just give it a different name and restore sanity to the old rail too
×
×
  • Create New...