Jump to content

Kerburettor

Members
  • Posts

    63
  • Joined

  • Last visited

Reputation

33 Excellent

Recent Profile Visitors

1,575 profile views
  1. Hi, First of all I want to say that I'm a complete newbie when it comes to the inner workings of KSP and its mods. I've got a rudimentary knowledge of C# but I can decode scripts if geven enough time. Also, I haven't found a similar topic that already addresses this topic but if there's already one, I'll be more than glad to append my request to the existing thread and remove this one. Using kOS, I'd like to read aero data for any part of my aircraft (or at the very least parts identified as wings). The kOS-Ferram addon developed by Giulio Dondi helped me get the overall lift and drag of the aircraft via his wrapper that interfaces kOS and FAR. For example, the following command is used to get the value of the vesselLiftCoeff variable defined in FAR: SET lift_coeff TO ADDONS:FAR:CL. However this variable corresponds to the total lift of the aircraft, which I do not need. Is there a means to extract the aerodynamic data for each individual part of a ship? I would like to avoid having to recompile FAR and the kOS-Ferram addon because I simply don't know how to compile these mods (although I'd be more than glad to be walked through the process). But if that's what I need to resort to, here is how I imagine the way forward: Modify the FARAPI.cs code in FAR to extract the lift and drag for any part of the aircraft. Currently, total lift and drag coefficients are extracted thanks to the following static methods in the FAR API: public static double ActiveVesselLiftCoeff() { return VesselLiftCoeff(FlightGlobals.ActiveVessel); } public static double VesselLiftCoeff(Vessel v) { FlightGUI gui = VesselFlightInfo(v); if(gui == null) return 0; else return gui.InfoParameters.liftCoeff; } public static double ActiveVesselDragCoeff() { return VesselDragCoeff(FlightGlobals.ActiveVessel); } public static double VesselDragCoeff(Vessel v) { FlightGUI gui = VesselFlightInfo(v); if(gui == null) return 0; else return gui.InfoParameters.dragCoeff; } I'm still not sure how this could be done but I guess I could loop over all the parts of the current vessel and provided they are a lifting surface, save the liftForce and dragForce attributes of each part in a dictionary (the keys of which correspond to each part of my aircraft) that would be fed to kOS in a lexicon. In the kOS-Ferram addon, add suffixes in the Addon.cs script to extract the lift and drag of an individual part. In the following example, this is the current implementation of suffixes to extract the vessel's total lift/drag coefficients: private void InitializeSuffixes() { AddSuffix(new string[] { "CL", "LIFTCOEF" }, new Suffix<ScalarValue>(GetLiftCoef, "Current vessel's Lift Coefficient.")); AddSuffix(new string[] { "CD", "DRAGCOEF" }, new Suffix<ScalarValue>(GetDragCoef, "Current vessel's Drag Coefficient.")); } and add new entries corresponding to these suffixes, for example: private ScalarValue GetLiftCoef() { if (shared.Vessel != FlightGlobals.ActiveVessel) throw new KOSException("You may only call addons:FAR:LIFTCOEF from the active vessel."); if (Available()) { double? result = FARWrapper.GetFARLiftCoef(); if (result != null) return result; } throw new KOSUnavailableAddonException("LIFTCOEF", "Ferram"); } Add an entry in the FARWrapper.cs wrapper like this one: FARCD = FARAPIType.GetMethod("ActiveVesselDragCoeff"); if (FARCD == null) { SafeHouse.Logger.Log("FARAPI.ActiveVesselDragCoeff method is null."); wrapped = false; return; } which in this example uses the ActiveVesselDragCoeff method from the FAR API. However I'm completely clueless as to what is the best way to proceed. Any help?
  2. Thanks a lot for this very complete answer @DocNappers I'd like to know what I should put inside dist_dir.txt. My guess for 7za_dir.txt, ksp_dir.txt, mono_exe.txt and the such is that they should contain the path of the 7za executable, KSP game path and mono bin respectively, but I don't know what to put in dist_dir... Also, what are PRs? Btw I'm on Windows
  3. Hi, I've got a bit of an amateur question. Do you know how I can build my own version of BDA? Let's say I modify the code, how can I build it for myself to get the adequate dlls? Is there a tutorial I can use for that? Thank you
  4. Could someone tell me if there's a way to replace smokescreen effects used by the B9 props by overriding them with waterfall effects? I'm specifically thinking about replacing the F119's cool but outdated particle trail https://imgur.com/IhTwjrG
  5. Thanks a lot, your answer may help. I have indeed noticed strange behavior on the behalf of FAR (as in the GUI not displaying any information) but it never dawned on me that it was due to quote characters. I'll test changing the names of these crafts and report back if there's any improvement.
  6. I haven't noticed any notable event that triggers them, but last time it occurred was when I switched to the tracking station from a low münar orbit. Btw I have 32 Gb of RAM and approximately half of it is allocated when I play
  7. Hi, I started encountering frequent crashes since last week after installing and updating a few mods Initially thought this was due to "Kerbal Engineering Redux" so I uninstalled it but the crashes have continued occurring once in a while. Here's the full log of my last session (which ended in a crash at 4:28 PM UTC+1): https://file.io/erBRbCSa9eTq
  8. @Tonas1997 To answer your question on the old thread, I think the best way to proceed is to play with the specular map. As it is, the CRFP mod contains vanilla textures which are quite bright and reflective and as such you do not see the expected shade. What I did is I replaced the specular map by a black image using Gimp to get matte textures.
  9. That's because the issue resolved itself (or at least disappeared) when I uninstalled a few mods and reinstalled some of them. Procedure was faulty, should've tested one mod at a time, but I was in a rush to make this work. Sorry.
  10. Just know that there seems to be a bug. If I use this mod along with Kerbal Foundries 2 (with its dependencies: kerbal wheels & textures unlimited), I cannot customize my CRFP fuel tank anymore.
  11. Hi, I have two rotors on both sides of my aircraft and would like to make them rotate in opposite directions. But they were placed using mirror symmetry, so I can't change the orientation of a rotor independently from its mirror copy. What should I do? The end goal is to achieve hovering flight without creating a net torque about the centroid of my four rotors (there are two at the back in a similar arrangement). It's not a quadcopter since rotors are placed using mirror symmetry, and not central symmetry. I also do not want to remove each blade from symmetry separately. If there is a way to remove one of the rotors (and all the blades attached to it) in one go, I'm all for it. Thanks.
  12. Hi, Whenever I spawn a ship with vessel mover and then go back to my probe (a missile with a missile core, the pilot AI module and a probe core for good measure), I can't control the missile anymore. Is this a documented bug/issue?
  13. I doubt clipping would work in this specific case (except if the only goal is to add mass) because I'm using FAR. Basically FAR approximates the shape of the aircraft using voxels, calculating the resulting lift and drag based on the exposed shape of the geometry, its curvature, etc. Stock geometry assumes that each part has its own performance and as far as I know adds them all up. Sometimes, clipping can be used as an exploit to get more or less drag resulting in some weird contraptions. You don't really get that with FAR. By the way, said voxels seem to be calculated once and for all, regardless of any geometry transformation along the way. This is actually pretty funny because I thought voxels would move with the geometry but it turns out that they stayed where they were, which means that drag should be no different between a retracted vs. a deployed wing setup regarding drag, althought shape shifting moves the CoM forward or backwards, which is rather interesting. I'll show you tomorrow but now is sleeping time.
  14. Okay I think I've got something: It's not perfect but the rear landing gear doesn't bounce off straight off the bat. What worries me is the distance required to stop the aircraft altogether. It takes almost the entire runway for it to come to a still. I have only one option at this point, which is to find a way to decrease stall speed without tinkering too much with the aircraft's design: this is a re-creation so it needs to be esthetically faithful to the original model while keeping sideslip/pitching/yaw stability (which I worked way too much to get).
×
×
  • Create New...