Arrowstar

Members
  • Content Count

    2,038
  • Joined

  • Last visited

Community Reputation

825 Excellent

1 Follower

About Arrowstar

  • Rank
    Astrodynamicist

Contact Methods

  • Website URL Array

Recent Profile Visitors

4,123 profile views
  1. I'm glad to hear it's working. I still need to understand why your parallel processing pool isn't starting normally, though, so if you have Dropbox, Google Drive, or anything like that, and would be willing to share a link to a MAT file, that would be awesome. EDIT: Actually, stand by, I'm going to provide a new build of KSPTOT with some debug output around the MA and LVD parallel start functionality. I think I know what is causing the issue, but I need to be sure. If you could download the new build when I post it, run it, and try to start parallel computing. It should fail but a message should be written to the ksptot.log file. Please share what's in the log with me. Thanks! EDIT 2: Here's the link: https://drive.google.com/open?id=1Uv0mDhLwInq8rhHtXRKgeEd5a1Upo_RG&authuser=hardena%40alumni.msoe.edu&usp=drive_fs Please be aware that there's a bunch of in-work code in LVD, so don't look too closely at any bugs or whatnot you see that aren't related to the parallel pool stuff.
  2. You don't have a parallel pool started, and so the parfevealOnAll functions are throwing an error. Can I see the MAT file that generates this error? I might need to look into a bug fix. The other thing you can do is create a new LVD case, open up the plugins, create a new plugin with the following code, and set it to run before propagation. This should start a parallel pool or hopefully throw the reason it's not starting to the KSPTOT log file. pp = gcp('nocreate'); if(isempty(pp)) parpool('local'); end What would be useful to see is thrust vs atmospheric density. If there's an issue with how thrust is computed as a function of density, that'll do it. I think I'm just doing a linear interpolation of thrust on the two densities that are requested (1 atm and 0 atm), because that's what the game shows, but if it needs to be more complicated than that in order to match KSP under the hood, it can certainly be made to work that way.
  3. I can look into adding JNSQ's time system. Is the only difference between that and Earth time the 12 hours = 1 day thing? First, if you haven't tried running the latest pre-release of KSPTOT (should be v1.6.6 PR 8), download that and give it a try. It might resolve the issue with starting the parallel pool. As far as optimization speed goes: yes, I know about it, and it pains me every day that it is as slow as it is. Getting the parallel pool up and running will help a lot. If you're in LVD, you can also make sure you've disabled thrust forces when the engines are all off and the drag models when not in atmosphere. That will speed up propagation. Eventually I'm going to be moving KSPTOT from MATLAB R2017b to R202xx, and I know from some trialing I've done that there is a non-trivial performance increase from doing that (on the order of 10%-15% decrease in runtime in some cases). The delay in upgrading is mostly because I'm hoping The Mathworks will add some functionality to their new thread-based parallel pools (which should speed up optimization on their own) so that I can use them with KSPTOT. They haven't yet, though. For now, @Drew Kerman is right, you just have to wait it out. Sorry about that, I know it sucks. I have an old Core i5-3330 that only runs at 3.0 GHz, so believe me when I say I experience it regularly lol.
  4. Metric ton. If you're trying to model atmospheric effects, I'd highly recommend using Launch Vehicle Designer instead. It's basically Mission Architect, but far more advanced, and actually has some decent drag and lifting modeling built into it. In MA, that functionality was tacked on second-hand and never really worked out as well as I was hoping it would.
  5. I'm afraid not. I had to work out all of the SoI transfer logic myself because in general, commercial software does not work like KSP does. It's not that hard in principle though: when you get to an SoI edge, you transform your position and velocity to be relative to the new SoI you're moving into, and then you propagate with the new gravity source.
  6. So if I'm understanding you correctly, it's current altitude above the Sun divided by the reference radius? I have to admit that's really a bizarre way of defining it, since the quantities aren't the same. Maybe it's changed since then, any idea who I would ask?
  7. Thanks for the insight! And yes, your caveat is important, I need to keep that in mind.
  8. Honestly at this point, you're not going to be able to use Lambert solvers with any sort of real accuracy I think. You can try your method though, and if you do, please report back the results to share, as I'm interested in seeing how well it does work. I suspect the reality of the situation, though, is that you would have to eliminate the zero-radius SoI assumption and propagate the orbits through the patched conics directly, which is what the high fidelity tools in KSPTOT do. This is not an easy task. Also note that I don't think there's an in-between: you either always make that assumption or you always don't. I can't see how you'd get around it any other way. Using a Lambert solver inherently involves the zero-radius SoI assumption, so if you use it, you're already locked in to the downsides of that approach as far as I can tell. Or so I think. Feel free to prove me wrong.
  9. In KSP, you can see a variety of solar panel parts that sport an "electric charge rate" type of parameter. This presumably shows the amount of electrical power generated by the panel when it's facing the sun. However, for many years now, we have known that KSP models its solar panels' output using an inverse square law w.r.t. the distance to the Sun. What I'm after is how KSP uses this in a config file: chargeRate = 24.4 to get to the actual EC/s output rate that the panel produces in the game. What is that mathematical relationship? Presumably it involves some sort of relationship between distance to the Sun, the angle between the panel's normal vector and vector to the Sun, and a constant which gives the shown charge rate at the reference distance (I think Kerbin's orbit SMA from the Sun). Can anyone help me? @NathanKell, you've had some great insight into KSP math models before, any ideas here? Thanks, all! EDIT: I don't suppose it works something like this? ec_rate = ec_rate_ref * 1/(r/r_ref)^2 * cos(theta) where ec_rate => actual solar panel charge rate ec_rate_ref => the reference charging rate in the part's config file r => the distance from the Sun that the spacecraft is r_ref => the distance from the Sun at which the ec_rate is equal to the ec_rate_ref; probably Kerbin's orbit SMA theta => the angle between the solar panel normal vector and the Sun vector
  10. Got it. I did get it working with the "bleeding edge" Kopernicus. If anyone's interested, I was able to pull in the data from JNSQ (via KSP) and use my KSPTOT tool to find a great little Kerbin -> Eve -> Jool -> Nara flyby. It only uses 2.9 km/s and all of the gravity assists are unpowered. Hyperbolic Departure & Flyby Orbits --------------------------------------------- Hyperbolic Departure Orbit from Kerbin --------------------------------------------- Semi-major Axis = -4021.4399 km Eccentricity = 1.198511108 Inclination = 8.2797 deg Right Ascension of AN = 215.3993 deg Argument of Periapse = 354.9401 deg --------------------- Out. Hyp. Vel. Vect Rt. Asc. = -2.8182 deg Out. Hyp. Vel. Vect Declin. = 5.1443 deg Out. Hyp. Vel. Magnitude = 2.498558536 km/s --------------------------------------------- Inbound Hyperbolic Flyby Orbit to Eve --------------------------------------------- Semi-major Axis = -2087.2051 km Eccentricity = 2.010954481 Inclination = 168.9757 deg Right Ascension of AN = 12.1982 deg Argument of Periapse = 324.5845 deg Periapse Radius = 2110.0694 km --------------------------------------------- Outbound Hyperbolic Flyby Orbit from Eve --------------------------------------------- Semi-major Axis = -987.1344 km Eccentricity = 3.1376 Inclination = 168.9757 deg Right Ascension of AN = 12.1982 deg Argument of Periapse = 324.5846 deg Periapse Radius = 2110.0694 km --------------------- Out. Hyp. Vel. Vect Rt. Asc. = -60.6737 deg Out. Hyp. Vel. Vect Declin. = 10.5466 deg Out. Hyp. Vel. Magnitude = 7.645221576 km/s --------------------------------------------- Inbound Hyperbolic Flyby Orbit to Jool --------------------------------------------- Semi-major Axis = -62839.5722 km Eccentricity = 2.200294697 Inclination = 13.6415 deg Right Ascension of AN = 122.1091 deg Argument of Periapse = 129.6825 deg Periapse Radius = 75426.0053 km --------------------------------------------- Outbound Hyperbolic Flyby Orbit from Jool --------------------------------------------- Semi-major Axis = -62840.4247 km Eccentricity = 2.2003 Inclination = 13.6415 deg Right Ascension of AN = 122.1091 deg Argument of Periapse = 129.6825 deg Periapse Radius = 75426.0053 km --------------------- Out. Hyp. Vel. Vect Rt. Asc. = 8.2224 deg Out. Hyp. Vel. Vect Declin. = -12.5115 deg Out. Hyp. Vel. Magnitude = 5.640082898 km/s --------------------------------------------- Inbound Hyperbolic Orbit to Nara --------------------------------------------- Inb. Hyp. Vel. Vect Rt. Asc. = 59.6511 deg Inb. Hyp. Vel. Vect Declin. = -13.3272 deg Inb. Hyp. Vel. Magnitude = 4.6289 km/s Sun-Centric Transfer Orbits --------------------------------------------- Phase 1 Transfer Orbit (Kerbin -> Eve) --------------------------------------------- Semi-major Axis = 29227173.1798 km Eccentricity = 0.286657863 Inclination = 1.0070 deg Right Ascension of AN = 66.5339 deg Argument of Periapse = 193.1326 deg Period = 10838383.9464 sec Departure True Anomaly = 166.8674 deg Arrival True Anomaly = 267.1952 deg Num. Full Revs Prior to Arrival = 0.0000 --------------------------------------------- Phase 2 Transfer Orbit (Eve -> Jool) --------------------------------------------- Semi-major Axis = 140199741.3939 km Eccentricity = 0.815187301 Inclination = 2.4896 deg Right Ascension of AN = 143.4282 deg Argument of Periapse = 50.0880 deg Period = 113868901.5437 sec Departure True Anomaly = 333.3668 deg Arrival True Anomaly = 157.2567 deg Num. Full Revs Prior to Arrival = 0.0000 --------------------------------------------- Phase 3 Transfer Orbit (Jool -> Nara) --------------------------------------------- Semi-major Axis = -648287756.6610 km Eccentricity = 1.221163277 Inclination = 7.2566 deg Right Ascension of AN = 161.7338 deg Argument of Periapse = 132.9588 deg Departure True Anomaly = 56.1299 deg Arrival True Anomaly = 134.8628 deg Num. Full Revs Prior to Arrival = 0.0000 --------------------------------------------- Kerbin Departure Date = Year 9, Day 216 04:04:18.800 (270878658.8002 sec UT) Eve Arrival Date = Year 9, Day 265 19:10:57.736 (275166657.7356 sec UT) Jool Arrival Date = Year 10, Day 175 12:09:55.288 (298901395.2880 sec UT) Nara Arrival Date = Year 23, Day 239 15:06:59.843 (714409619.8433 sec UT) --------------------------------------------- Total Mission Duration = 14 Years, 23 Days 11:02:41.043 DV Maneuver Information --------------------------------------------- Burn Information to Depart Kerbin --------------------------------------------- Total Delta-V = 2.8973 km/s Prograde Delta-V = 2608.9367 m/s Orbit Normal Delta-V = 1194.8611 m/s Radial Delta-V = 399.7847 m/s --------------------- Burn True Anomaly = 215.3993 deg --------------------------------------------- Burn Information to Depart Eve --------------------------------------------- Total Delta-V = 0.0000 km/s Prograde Delta-V = -0.0205 m/s Orbit Normal Delta-V = -0.0058 m/s Radial Delta-V = -0.0097 m/s --------------------- Burn True Anomaly = 0.0000 deg --------------------------------------------- Burn Information to Depart Jool --------------------------------------------- Total Delta-V = 0.0000 km/s Prograde Delta-V = -0.0234 m/s Orbit Normal Delta-V = -0.0000 m/s Radial Delta-V = 0.0000 m/s --------------------- Burn True Anomaly = 0.0000 deg --------------------------------------------- Total Mission Delta-V = 2.8973 km/s
  11. Thanks, I'll take a look. Is that why Nyan Cat flies around the screen if you use a 1.9.1 built of Kopernicus?
  12. I think I'm missing something, guys. I've got a clean install of KSP 1.10 with nothing but Kopernicus 1.9.1-6 and JNSQ 0.9 installed, but I'm not seeing any new celestial bodies in the solar system. Am I doing something wrong? Is there something I can look for in the KSP log file?