Jump to content

Xyphos

Members
  • Posts

    1,083
  • Joined

  • Last visited

Everything posted by Xyphos

  1. Well, thank you all for teaching me about Coroutines. here's what I have so far, in a dev branch but it's behaving a bit wonky and I can't figure out why. The attached screenshot is after the scan completes, but it seems to complete too early around 27% (and aborts?) unless my progress indicator math is wrong? https://github.com/Xyphos/KSP_PeakScan/blob/dev/PeakScan.cs
  2. Update: the altitude method works fine, but it really doesn't like to be multithreaded. the index errors cease when it's run normally, but the scanner freezes the game until the scan is completed. I'm going to have to find another way.
  3. I wanna create a new science experiment but not sure where to start for the code. there is a slight catch; the experiment data isn't available immediately, it has to be computed over time and consume EC while it's being computed.
  4. well then, I guess my 'simple' logger mod just got more complex; I'll try to get it to work in the tracking station but if I can't, I'll just re-write it for flight and hyperedit some probes in orbit just to scan from there. thanks for your input, I'll keep you posted on what becomes of it.
  5. I don't understand the difference between world position and regular lon/lat? the mod is supposed to run only from the tracking station, not in flight on a vessel. the PQS is referenced in the celestial body that is passed to the method via parameter, it's not null.
  6. @DoctorDavinci thanks, but it also crashes with index out of range. would being run from an async thread be the culprit?
  7. thank you for your reply, using the above snippet of code from ScanSat that you provided, my code looks like this but still throws the index error. not sure if it's because I run the method via multi-threading? private void ScanBody(CelestialBody body) // Ran via Threadpool { try { double LAT = 0, LON = 0, ALT = 0; // highest var JOBS = 0; DebugLog(m: $"Scanning {body.name}..."); const double step = 0.01d; for (var lon = 0d; lon < 360d; lon += step) { for (var lat = 0d; lat < 180d; lat += step) { var alt = getElevation( body: body, lon: lon, lat: lat ); if (alt <= ALT) continue; LAT = lat; LON = lon; ALT = alt; } } Maybe @DMagic could provide some instruction?
  8. I'm trying to make a mod to find the highest peak on every celestial body and log it to a text file in both lat/lon and DMS formats but pqsController.GetSurfaceHeight keeps throwing an index out of range exception even tho I'm converting degrees to radians. obviously my input of 0 to 360 degrees is wrong, so what's the correct input?
  9. I completed (again) on HARD MODE (again) but this time, I live streamed it to Facebook (~5 hours long) KSP group. despite several unexpected interruptions from my family, dogs and a crash landing on Vall, I succeeded anyway. https://www.facebook.com/100009261702728/videos/2462021554116544/ UPDATE: Hindsight, the KSP facebook group is a private group, so unless you're a member you won't be able to see the video, so I snagged the MP4 url and uploaded it to YouTube instead. -
  10. yes and no; jet-tipped rotors can only go so fast before breaking so use only two jets on low thrust, install Editor Extentions mod and spam 20 radially-attached rotors everywhere to increase the lift. (don't use the built-in attach nodes when placing, leave at double config and place on the adjacent face) while the craft did work, it still wasn't suitable for an auto-gyro.
  11. FYI, I don't mind helping other mods make the necessary changes, but the last time I offered to release an "unofficial update" I got chewed TF out by @linuxgurugamer's fan club claiming that I was disrespecting their lord and savoir. in general, it's not a good idea to do such, but feel free to compile your own non-distributed version if you can. also, it's not generally acceptable to upload a binary without matching source code.
  12. The Orbit class has a bit of a confusing naming convention, I'm looking for the six orbital elements to be used in calculations. the official API docs have nothing documented besides the following: double ApA [get] double ApR [get] double PeA [get] double PeR [get] double semiLatusRectum [get] double semiMinorAxis [get] semiMinorAxis? I thought it was supposed to be semiMajorAxis? I see nothing mentioning Angular Momentum, Ascending Node, etc... update: I figured it out, the docs aren't very helpful at all. Angular Momentum is a Vector3d identified as Orbit.h and the remaining five classical elements are obviously named variables, not properties.
  13. not sure if this is the right forum to ask, but I'm in need of a custom staging icon for a new part, not sure how to get the game to render such a thing.
  14. @linuxgurugamer if you're going the mod route, then you should check the existing configuration upon loading the flight scene by generating a hash token for each of the three revertables, and before the flight scene is unloaded back to editor, generate another set of hash tokens and compare for changes, interrupt the scene change with a UI Dialog that has checkboxes next to the changed items, with OK and Cancel buttons. good luck! I was hoping for Stock support tho. "FlightEditSaver" works for me btw, but I'm not picky about names.
  15. UPDATE: Never mind, I figured it out; I was missing the ContentSizer thingy and stuck in some useless code that messed with everything. :embarrassed:
  16. AFAIK, the old GUI code still works, lots of modern mods still use it.
  17. Thanks, but I'm using the newer PopupDialog system instead of the old OnGui()
  18. I'm not using asset bundle UI creation, just pure code. I've notice that my UI doesn't scale well with different resolutions and/or game settings UI scale. eg, a fixed-width dialog of 200f has lots of unused space when viewed in high resolution but looks just fine in low resolution eg2, my scroll list is appears larger and is displayed OUTSIDE the popup dialog window that is supposed to contain it. are there any tips that would let the UI scale itself or any special code to consider?
  19. https://github.com/Xyphos/KSP_AutomaticFuelCells/blob/master/AutomaticFuelCell.cs#L125-L149
  20. The action/axis group editor while in-flight is a welcomed addition, and very useful for "test stand" scenarios, but I find myself making adjustments and taking notes of said adjustments because currently, there's no way to OPTIONALLY persist any changes made while in-flight. instead I'd have to review the notes and make the changes AGAIN while in editor mode, this is very frustrating. Thank you for your consideration.
  21. Higher thrust and operate at higher altitudes; normal fans usually don't go above 2km but I've seen a ducted fan vessel get up to 6km. still not as impressive as 18km or 23km like the turbojet and rapier engines, but still great performance.
  22. I'd like to ask for Min/Max Axis groups to be added to the robotic components, because I'd like to manually override their limits while a sequence is playing; the sequence would only move up to the new min/max settings, and it's not hard to clamp in the new values. Thank you for your consideration.
  23. Dumb question, but why not just make a Module Manager patch to add some EC and a very small RTG to the deployable science modules?
×
×
  • Create New...