• Content Count

  • Joined

  • Last visited

Community Reputation

42 Excellent

About Syntax

  • Rank
    Rocketry Enthusiast

Recent Profile Visitors

1,325 profile views
  1. @K^2 Whelp, I'm out of ideas at this point. I've learned enough about rotation matrices in the last few days to understand how to reproduce your transformX and transformY functions. I was hoping to find some minor discrepancy that, when resolved, would close the gap between the results. And the rotation matrices I came up with did differ slightly from yours, by a negative sign in the variable z for each. Changing it didn't make any difference at all. I checked the rotation matrix against the orbits' orientations in my model, and they are visually identical. As for bignumbers, I don't see how I could apply it in a way that would make any difference at all. I haven't tried it, because honestly I'm not sure where I would. I've played around with the degree of accuracy in your code, pushing it to the limit of crashing the browser page. No luck there, either. Would a more powerful machine even help, or will the browser always be the bottleneck? I don't understand why my model and your code agree on the max separation, but disagree on true anomaly. I'll keep thinking on it, but I'm definitely open to more ideas if you've got 'em. Maybe I'm missing something in the max2d or golden function... Again, I'll keep exploring.
  2. @K^2Really, just enough to work out what's causing that 0.05 rad discrepancy. I'm happy to research and learn, but it can be hard to know where to look, and my formal mathematics training ended with high school calculus. These are definitely well out of my league. Thank you for the resource, though. Who knows, I may end up to coming back to them. This helped a lot, and I'm going to try to find more stuff like this. Just about the only thing left in your JS that I don't understand is the transformX and transformY functions, and I'm hoping that with that last puzzle piece I can close the book on this.
  3. @K^2 Thank you SO MUCH for what you've done here. You've single-handedly brought me to within a hair's breadth of the solution to this problem that has been bugging me for months! I say "within a hair's breadth" because, oddly, when I put the true anomalies output by your algorithm into my model, I get a distance of 113191.131383 Mm, a difference of 169.675468 Mm from your algorithm's output (113360.806852). But, when I play around with fine adjustments to those body positions in my model, I can maximize the distance calculated in the model to within <10m of the algorithm output! So I just need to figure out why the true anomalies I'm finding are around 0.05 rad off from yours. I really believe my model is accurate... but perhaps more checks on that are in order. Whether the issue lies with my model or your code, I will continue looking into this and keep you updated. I'm sorry I needed so much hand holding on this... it's that I don't have a good grasp on the math used to transform the ellipses from 2D into 3D. Any resources you could recommend for me to read/watch to deepen that skill set?
  4. @K^2 This gives a max separation a few Gm less than what I've been able to find just through trial and error.
  5. @K^2That does look more believable. Seems likely I'm having issues on my end. Not sure why, though. I will also continue looking. One thing I do notice (and this could help explain our discrepancies), is that on the graph you provided, it looks like Dres' periapsis lies on the positive y-axis, and Jool's orbit swings away from it to the upper left. When I look at my model (and indeed at the map screen in KSP) in that orientation, Jool's orbit swings away from Dres' to the upper right when looking straight down at it.
  6. Sure can! Jool SMA: 68773.56032 e: 0.05 Inc: 0.022759093795546 LAN: 0.907571211037052 APe: 0 Dres SMA: 40839.348203 e: 0.145 Inc: 0.0872664625997166 LAN: 4.88692190558413 APe: 1.57079632679490 Thanks so much for all your help! This is amazing.
  7. @K^2 That's fantastic. Thanks for clarifying. I see it now. Thing is... something's not adding up. I've made this model (linked in my signature) against which I'm checking the angles and distances this script is spitting out. I've been using Dres and Jool... and I'm getting a max distance that I can't seem to replicate no matter how hard I try (off by 3Gm!). Plus, the angles are just plain nonsensical. I don't know what is leading to the inconsistencies. I'm trying to get it to add up, but no luck yet. If you get a chance to look at what I'm talking about, I'd be interested to hear your thoughts on a diagnosis. Here's what I've done with the code you provided. I'll warn you: it's not pretty; I'm not good enough at this to make it streamlined.
  8. My cup overflows! Thank you! I will try this out tonight. Am I correct in my understanding that the centre of the ellipse (and not one of the foci) is at the origin?
  9. This. Is. Incredible! You're my hero! Thank you! Purely for curiosity's sake, do you think there would be a relatively simple way to determine the points the two bodies would have to be at in their orbits to achieve their max separation? Looking at your code, I see a position function devoted to "3D Position at true anomaly T." That looks like the ticket! I'm having a hard time getting that value onto the browser page, though. I think it's because I haven't looked at JS in some time and am not at all familiar with the arrow function... what do I need to do here?
  10. That would be incredible! I'm very much a beginner with code, but do have some limited experience with javascript, ruby, and (to an even lesser extent) python. If any of those work for you, I'd be "over the moon" just to have something to work from. I will say, though, that I'd need some clear commenting. All the internets to you for such a favor!
  11. I'm looking for some help/guidance on what is turning out to be a surprisingly challenging math problem: I'm trying to find the maximum possible separation between any two given planets. I think it would be useful, or at least interesting, to know this kind of thing when constructing comms relay networks, etc. I've got some idea how to proceed, but my efforts keep coming up dry (not least because of my merely intermediate math knowledge). Seems my problem needs new eyes and new ideas. I'm all ears!
  12. I got one showing here: But I thought you had already seen that... I don't mind playing around a bit more with the math, but I can't promise results or give you much of an idea of when I'll get to do that, so I'd definitely encourage you to dig into it yourself. I'd like to help here, though. I'll do what I can!
  13. Hi Drew, I take it you mean ecc>1? The problem is not how to constrain the conic. It's how to represent the asteroid's position on that conic. For the closed ellipses of all the planets and moons, the orbiting body is represented by a point that is mathematically tied to that path. Not so easy with the open hyperbola. KSP must have a way of doing it, though...
  14. I've been futzing around a bit with your idea this week and I think I've got the beginnings of something you might be able to work with here. All I've added is some numbers and formulas in column S of the spreadsheet. One tricky thing with representing a hyperbolic orbit on a 3d plot is that we only want to see one of the branches (here, the one swinging by Kerbin). So right away the more obvious choices for commands to use in geogebra are ruled out: Hyperbola command, Conic command. So that leaves me with the Curve command, which uses parametric equations to plot a curve in a given range. I have not yet been able to figure out how to parameterise a hyperbola in 3 dimensions, so I tried plotting one in 2D that had your example's SMA and Ecc, and then tried to rotate that curve to the proper 3D orientation. I doubt I've managed to get it right on my first go. Take a look and tell me how it compares to your example. I can't test in KSP just now. It would be more computationally efficient if we could represent the hyperbola in 3D right out of the gate, so that's another challenge. It will be up to you to define a range for the curve (given in cell S23) that you think is appropriate. But once you've done that, how do you define the asteroid's actual position on that arbitrarily sized curve? Perhaps it would be better, in the case of hyperbolic trajectories, to represent the trajectory shape and the asteroid position independently, as opposed to interwining them as I did for elliptical orbits. But we have the beginning of something here.