GithubHelp home page GithubHelp logo

neuoy / ksptrajectories Goto Github PK

View Code? Open in Web Editor NEW
145.0 24.0 47.0 12.14 MB

A Kerbal Space Program mod to display trajectory predictions, accounting for atmospheric drag, lift, etc.

License: GNU General Public License v3.0

C# 99.37% Batchfile 0.43% Shell 0.20%

ksptrajectories's Introduction

Trajectories

A Kerbal Space Program mod to display trajectory predictions, accounting for atmospheric drag, lift, etc.

This mod will display a new trajectory on the map and in flight, which should match the KSP regular trajectory, unless your spacecraft encounters an atmosphere. Drag and lift are predicted and the resulting modified trajectory is displayed. It is compatible with the aerodynamic model of the original game, but also with Ferram Aerospace Research (automatic selection at game startup).

This mod is designed to help with aerobraking maneuvers (trajectory after aerobrake is displayed), and to help reach a precise point on the ground (for example to land exactly at the Kerbal Space Center).

It is possible to configure a descent profile for space planes, so that you can tweak how you intend to fly at different altitudes. When you actually follow the trajectory, indicators will be displayed on the nav ball to show how the descent profile is configured for your current altitude, and also how you should correct your descent angle to reach your target ground impact.

The mod can also help reaching a precise location on any celestial body. Even when there is no atmosphere, the original game does not display where you'll arrive according to the body rotation. This mod adds a small cross on the body showing you're estimated impact location.


Features

  • Display atmospheric trajectories
  • Display crash/landing location (accounting for body rotation)
  • Display trajectory after an aerobraking maneuver
  • Display fixed-body trajectory (i.e. trajectory in the closest body rotating frame)

Supported Aerodynamic models

  • Stock Kerbal Space Program aerodynamic model
  • Ferram Aerospace Research

Faq

  • Reportedly works with -
    • Deadly Reentry
    • Real Solar System
    • Rescaled Kerbin
    • Outer Planets Mod
    • kOS
  • Compatible with Blizzy's toolbar.
  • If you see weird spirals or other crazy lines everywhere, double-check you didn't enable "fixed-body" mode by mistake.
  • If the predicted trajectory seems inaccurate, check that you set the correct orientation in the Descent profile (or checked Prograde or Retrograde), and that you keep that orientation all the time.
  • It's not possible to predict a trajectory for a future stage. We know this is a highly requested feature, but unless we duplicate big parts of the KSP-internal code, we are limited to simulating the current state of the vessel.
  • Parachutes are not simulated (that's usually not a problem if you open it near the ground).

Requirements

  • KSP 1.8+

  • ModuleManager 3.0.0+

  • For KSP 1.3.1 to 1.7.2, Trajectories can be built from the backport branch click here for more information.


Installation


Reporting bugs, feature requests and contributing

Before posting feature requests or bug reports, please read the FAQ.

  • Want to report a bug? click here.
  • Do you have a new feature request? Click here.
  • Or do you want to contribute to Trajectories? click here.

License

Trajectories is available under the terms of GPL-3.0-or-later.
See the COPYRIGHTS.md file for details.

ksptrajectories's People

Contributors

baleine82 avatar brusura avatar bssthu avatar calebj2 avatar ebigunso avatar fat-lobyte avatar fat-zer avatar ggpeters avatar kerbas-ad-astra avatar linuxgurugamer avatar mic-e avatar mwerle avatar neuoy avatar nistei avatar pbscoots avatar piezpiedpy avatar sawyerap avatar skalou avatar ts826848 avatar valiusv avatar whale2 avatar xyphos avatar youen1 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

ksptrajectories's Issues

Invalid trajectory meshes

bug reported on the forum, and I've seen it from times to times in the log as well:
"My debug log was getting spammed with orange text messages like “Mesh.vertices is too small. The supplied vertex array has less vertices than are referenced by the triangles array.”"

Draw landing zone ellipse

Or any other method to indicate how reliable the impact position is. For example by performing multiple predictions with slighly varying starting conditions to see if the trajectory is affected by the chaos theory.

Prediction innacurate

Bug reported by marce on the forum and PM

"I created a new tiny vessel which only uses Stock+DR parts (maybe a few other modules, but I think KSP will just ignore them).
I also did a new album showing how much the prediction is wrong (I'd say 1/5th of the planet?). Hope that helps you!"

vessel file available on request if someone wants to test

Descent graph

Display a descent graph, indicating altitude over surface distance, and also ground altitude (would be handy to plan mountain fly-by)

SOI changes are not detected

Among other things, this causes hyperbolic orbits to be rendered incorrectly, and makes it impossible to plan aerocaptures while still outside the target body's SOI.

DRE Support

To formalize (and second) a suggestion made in #18, it would be nice to be able to predict whether a given trajectory is survivable under DRE. Specific things I'd like to see:

  • Peak temperature of the heat shield
    • whether any other parts will overheat would also be useful, especially for spaceplanes, but might be prohibitive for large vessels
  • Amount of ablative used (or, at least, whether or not the shield will run out). Note that running out of ablative is not necessarily fatal, if it happens late enough, so any warning messages should be based on peak temperature predictions instead.
  • Consistent use of custom DRE parameters (i.e., the contents of the REENTRY_EFFECTS configNode) and custom heat shields (like the RSS pack)

Predict trajectory for long acceleration at maneuver nodes

KSP assumes velocity change is instantaneous at maneuver nodes. But we could compute the maximum vessel acceleration, and use that to predict a more accurate trajectories. This would mostly matter for low acceleration vessels, for example when using electric or nuclear propulsion.

Display target location corresponding to cursor position on the trajectory

When pointing somewhere on the vessel trajectory, it would be helpful to see the target location at the same time. This is something stock KSP does with "nearest approach" markers, but sometimes it's not flexible enough (only one marker is displayed, and the player can't choose where on the trajectory)

Staging

Find some way to specify which stage will enter atmosphere, and don't use the parts that will be discarded during predictions. Also need to check if FAR aerodynamics is more complicated when staging than just ignoring the discarded parts.

Trajectories 1.1.2 (fat-lobyte fork) needs update for FAR 0.14.6

I don't know if it's kosher to post a bug report about a fork in the issues of the original project, but I didn't see a way to post it to the fat-lobyte fork. Also I believe this is the same issue mentioned on the forums and acknowledged today by baythan. I'm posting here to document the issue more methodically.

Trajectories prediction does not match FAR's latest model.

Defect reproduction method: Put a rocket in an orbit with a high apoapsis (~3Mm) and periapsis of ~65km. As the rocket passes through the periapsis the predicted next apoapsis will fall. Before I adapted my strategies this resulted in me setting up aerobrake orbits which were predicted to have two orbits after the first aerobrake, but actually ended up descending completely in the first aerobrake.

If this is expected behavior a warning would help, but I can also understand if this kind of surprise is by design and a warning would defeat that, in which case feel free to close this as "no issue" or "won't fix" or whatever. :)

I'm including the useful portion of my 'ckan list' for completeness' sake (why yes, I do have a lot of memory, why do you ask? :).

- AmbientLightAdjustment 1.3.1.1
- AutoAsparagus v0.8
- AviationLights 3.7
- CommunityResourcePack 0.3.2
- DistantObject v1.5.1
- DistantObject-default v1.5.1
- EditorExtensions 2.5.1
- EnhancedNavBall 1.3.4
- EnvironmentalVisualEnhancements-Config-Default 7-4
- EnvironmentalVisualEnhancements-HR 7-4
- FerramAerospaceResearch v0.14.6
- HullcamVDS 0.33
- InFlightWaypoints 1.2.7
- KAS 0.4.10
- KerbalEngineerRedux 1.0.14.1
- KerbalWeatherSystems 0.5.3-alpha
- LandingHeight 1.3
- MechJeb2 2.4.2
- ModuleManager 2.5.9
- PlanetShine 0.2.2.1
- PlanetShine-Config-Default 0.2.2.1
- PortableScienceContainer 1.2.1
- ProceduralFairings v3.11
- RasterPropMonitor-Core v0.18.3
- SafeChute 1.6
- SAVE 0.9.17-387
- SCANsat 8.1
- ScienceAlert 1.8.4
- SmartStage v2.5.0
- StageRecovery 1.5.3
- StationScience 1.4
- TCShipInfo 0.3
- TextureReplacer 2.2
- Toolbar 1.7.8
- Trajectories 1.1.2
- TWR1 1.17c
- USITools 0.3.1
- VNG-Parachute 1.2
- VNG-Parachute-EVALoading 1.0
- VNG-Plugin 0.7.2

A question about descent profile, and a possible bug

Hi there, great mod.

Question: The angle of attack, is that relative to the surface velocity vector, or the orbit velocity vector. I'm guessing the first, since this mod seems targeted at planes.

Possible bug: I think -180 and 180 degrees give the same landing prediction? Currently they don't (Not off by much though)

When not intersecting atmosphere, entire orbit is white

If I'm coming in for an aerobraking, having my orbit part turn white and atmospheric part red is great. However, when I'm not touching atmosphere the entire orbit is white.

I would prefer if this mod didn't come into play at all until part of my orbit touched atmosphere, and at that point showed the white/red.

Or even just drop the white altogether until you've hit atmo, and then instantly go red. That way, the white lines would only show after exiting atmosphere at least once.

Performance issues after a crash

reported by TMS on the forum : "the game begins to chug when the active craft is destroyed (by ploughing it into the ground). Lots of frames dropped until you leave the scene. "

Predict air brakes

Both stock brakes and other mods. Use the current state of brakes (even if the ship is still in space) to know if they will be deployed during entry or not.

The on-rails patch drawing resolution is too low in some cases

This is noticeable mostly around the periapsis of highly eccentric orbits.
As a proposed solution, in addition to the 256 points that are spaced equally, time-wise, along the patch, add 360 points that are spaced equally, true-anomaly-wise. I.e. for each degree of true anomaly change, add one point.

Improve toolbar button

left click to show/hide trajectories, right click to open GUI, and find a way to make it obvious for players so they don't miss the GUI completely

Also add an option to choose between stock or blizzy's toolbar (when it's installed)

Set objects as target

For exemple a flag, or another vessel. KSP already has an interface for that, and other mods improve it (haystack for example), we just need to retrieve the current target position and use that to update the nav ball indicators.

Also would be nice to be able to set GPS coordinates (for example scansat can output these for anomalies, but currently no way to visualize it on the map view)

Blizzy toolbar integration

For players that have a lot of mods, using the Blizzy toolbar makes more sense than the stock KSP toolbar

Also, add a setting to choose one, the other or both (like chatterer)

Debug display

Add debugging indications in the GUI window:

  • performance counter (time spent in computations)
  • error counter (number of exceptions thrown during trajectory computations)

More precise crash location (raycast)

At this time, ground is assumed to be horizontal near the crash location detected at sea level. A better solution would be to ray cast along the trajectory to find the first ground impact. In particular, it's important to detect mountains.

Optimizations

Profile the mod and search possible areas of optimization.

NEAR integration

Make the plugin work with NEAR aerodynamic model (auto-selection at game startup)

Massive lag when on atmospheric trajectory

I get incredible lags and stutter whenever I leave the ground (just after T/O with a plane/rocket).
There's a "Warning: Too many iterations." messsage at the bottom right, telling me prediction is stopped, but it still lags immensely, as in: One frame every 2-3 seconds.
Disabling trajectory prediction on the map screen options GUI doesn't change anything either.
The output_log doesn't give me anything related to Trajectories or any other mod, however, so dunno how to help reproduce this for you.

Test procedural fairings

A forum user reported inaccuracies when using this mod (but did not confirm if it was better without fairing or not)

There is Z-fighting between impact markers and the surface

Z-fighting between a impact marker and the surface was noticed in the hilly terrain of Minmus.
Z-fighting between the two markers was noticed upon setting the current marker as the target (on Minmus).

I'm on Linux, with nvidia, if that matters.

GUI rework

  • put everything in the same window (for now)
  • button to show/hide the window
  • possibility to move the window + save position in file
  • tooltips and more explicit presentation
  • hide the window in tracking station

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.