Jump to content

Rosuav

Members
  • Posts

    6
  • Joined

  • Last visited

Reputation

2 Neutral

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. Oof. Apparently I was looking at buggy docs this whole time. When I search for docs via the Almighty Google, I came across https://anatid.github.io/XML-Documentation-for-the-KSP-API/ which looks identical to the official site as linked above, so I didn't notice that the information was wrong. In fact, it almost never *is* wrong; and I've no idea why it's wrong on just this one tiny example. Thank you for pointing that out, and I'll try to keep a better eye on my URL in the future! (BTW, apologies if I've messed something up in this post; the forums CSS is all borked at present so I'm not entirely sure what I'm posting.)
  2. Trying to do some orbital position calculations in a mod, and run into a problem. According to the docs and the wiki, there should be a method double Orbit.getTrueAnomaly(double E) which looks like it would be what I want, but trying to use it gives this result: double targ_true_anom = targorb.getTrueAnomaly(targ_anomaly); VelocimeterModule.cs(118,38): error CS1061: Type `Orbit' does not contain a definition for `getTrueAnomaly' and no extension method `getTrueAnomaly' of type `Orbit' could be found. Are you missing an assembly reference? /home/rosuav/.steam/steam/steamapps/common/Kerbal Space Program/KSP_Data/Managed/Assembly-CSharp.dll (Location of the symbol related to previous error) Any ideas what I'm doing wrong here?
  3. Ah ha, I knew it had to be something simple! Thanks. In skimming the list of classes for anything with global information, I skipped over Planetarium, thinking it was a special-purpose feature.
  4. I'm trying to do some calculations based on orbital positions and future timestamps, and am stuck looking for something that is probably really obvious somewhere: how do I find out the current time as a UT double? For example, a ManeuverNode has a .UT attribute; how do I figure out how soon it will be?
  5. Thanks! I'll look into that. I have a few other modding ideas too, and will see where that takes me. HUD text would definitely be helpful to those too.
  6. https://github.com/Rosuav/KerbalSpaceModding This is barely more than a "Hello World" or "My First Mod", but hey, maybe there's something in here that could be of use. If you're attempting surface navigation to a waypoint, the navball can tell you how to point your craft, but it won't tell you how far you still have to go. This mod looks at your lat/long and the lat/long of the navigation mark, calculates the angle between them, and the great circle distance (approximately equal to the shortest distance across the surface, ignoring your altitude). Question: How can this best be brought in-game? Currently, its output is made to a log file, so the way to read it is to tail|grep that log (as mentioned in the README, which assumes Linux). Question: Would it be (a) possible, and (b) useful, to show mission-elapsed-time at arrival time? Currently it says "1900 seconds" but it's not really counting down, since your velocity will change slightly. Code is all MIT licensed.
×
×
  • Create New...