Aero Trajectory

#1
Aero Trajectory
Download - Source

A mod that adds accurately simulated trajectories for atmospheric flight!

Changelog
  • v1.1
    • Compatibility with Altaïr's Gliding Heatshields mod.
    • Settings window implementation through UI Tools.
  • v1.2
    • Fixed the "Gliding Heatshields Forces" setting.
  • v1.3
    • Fixed a NaN value error when attempting to calculate the trajectory of a hyperbolic orbit.
  • v1.4
    • Added heating simulation.
Settings
  • Simulation
    • "Step Size" - Determines the 'resolution' (timestep) of the simulation. Lower number = more precise, but also more resource-intensive.
    • "Iterations" - The number of steps done be the simulation. If your trajectory abruptly ends, increase this setting.
    • "Simulation Type" - Changes the 'drag profile' of trajectory shown:
      • Prograde - The drag profile of your rocket if it was moving prograde.
      • Retrograde - The drag profile of your rocket if it was moving retrograde (e.g. a re-entering capsule).
      • Current Angle (default) - The drag profile of your rocket at its current angle relative to prograde.
      • Min-Max Range - Shows the trajectories of both the minimum and maximum drag profiles of your rocket.
  • Trajectory
    • "Main Color" - The color of the trajectory (& escape orbit) line.
    • "Dashed Line" - Switches between a dashed or solid line for the trajectory.
    • "Show Escape Orbit" - If set to true, shows your rocket's actual orbit if it leaves the atmosphere.
  • Heating
    • "Low Color" - The color of the trajectory segment where 'Low Heat Tolerance' (>400°C) parts will break (most parts).
    • "Mid Color" - The color of the trajectory segment where 'Mid Heat Tolerance' (>1000°C) parts will break.
    • "High Color" - The color of the trajectory segment where 'High Heat Tolerance' (>6000°C) parts will break (heat shields).
    • "Real Max Temperature" - If set to true, heating trajectory segments will use the real max temperature values at which parts actually break (1.03 * maxTemperature).
  • Misc.
    • "Gliding Heatshields Forces" - If Altaïr's Gliding Heatshields mod is installed and this setting is enabled, the trajectory will also take the added lift force of heatshields into account.
Perfect for precise crashing (or landing)...
Screen Shot 2024-05-07 at 22.52.48.png


Or perfect aero-braking.
Screen Shot 2024-05-07 at 22.53.05.png
 
Last edited:

Axiom

The Didact
Recruit
Hot Stuff
Swingin' on a Star
Atlas
#2
-Cries in mobile
Anyways, how did you calculate the trajectory of the object? And does it calculate if you're going to burn up on reentry?
 

Dahzito

Amateur Astronomer | Future Astrophysicist
Staff member
Sentinelle
Ace
Modder
Deja Vu
Hot Stuff
Space Glider
Swingin' on a Star
Moon Maker
Atlas
#5
I was also wondering how it will fair with that one
does this compatible with Gliding heat shields mod?
I think it's, was testing this mod now with a reusable rocket and when landing the first stage of my rocket and using the aerodynamics to change the trajectory, the AeroTrajectory mod was showing then where I was going to land.
Also, it's a great mod, love it!
 

Lemniscate Biscuit

RL10C-5-1
Staff member
Sentinelle
Ace
Modder
Hot Stuff
Moon Maker
Atlas
MOTY 2023
#6
Aero Trajectory
Download- Source

A mod that adds accurately simulated trajectories for atmospheric flight!

Settings (changed through settings.txt in the mod's folder)
  • "simulationStepSize" (number) - Determines the 'resolution' (timestep) of the simulation. Higher number = less precise, but also less resource-intensive.
  • "simulationIterations" (integer) - The number of steps done be the simulation. If your trajectory abruptly ends, increase this setting.
  • "simulationType" (enum) - Changes the 'drag profile' of trajectory shown:
    • 0 - The drag profile of your rocket if it was moving prograde.
    • 1 - The drag profile of your rocket if it was moving retrograde (e.g. a re-entering capsule).
    • 2 (default) - The drag profile of your rocket at its current angle.
    • 3 - Shows the trajectories of both the minimum and maximum drag profiles of your rocket.
  • "trajectoryColor" (color) - The color of the trajectory line.
  • "trajectoryDashedLine" (bool) - Switches between a dashed or solid line for the trajectory.
  • "showEscapeOrbit" (bool) - If set to true, shows your rocket's actual orbit if it leaves the atmosphere.
Perfect for precise crashing (or landing)...
View attachment 118562

Or perfect aero-braking.
View attachment 118563
Sweet Jesus...
 
#7
does this compatible with Gliding heat shields mod?
It would work, but the trajectory would constantly change whilst the rocket is in the atmosphere since the mod doesn't know that that force is ever being applied (although I may see if I can check if Gliding Heatshields is installed and add it as a force in the simulation for a possible update).

EDIT: The mod is now compatible with Gliding Heatshields.
 
Last edited:

Darthan

Modder
Deja Vu
Hot Stuff
Space Glider
Swingin' on a Star
Voyager Quest
ET phone home
Atlas
Floater
#9
I've tried it out, works well. Here is an example of a Mars landing:

DescentOrbit1.PNG
DescentOrbit2.PNG


With the the gliding hear shields mod and the SAS mod, by changing the orientatation a few degrees off retrograde you can fine tune the landing point as you get closer. For my first try (this one) I got the lander down about 7km away from the target (in Realistic). I drove a rover to the target to get a measure of the distance:
DropRover.PNG

RoverInPosition.PNG


Two tries later I managed to get within 3.3km of the target:
Rover4InPosition.PNG


Note for the reusablity challange for Team Hawk you need to be within about 800m-200m to land on the flat area next to the launchpad. I managed this atfer a few attempts before this mod came out. The mod should make that easier.
 

Cresign

Spiller of the Milky Way • Rocket Gluer
Recruit
Deja Vu
Hot Stuff
Space Glider
Swingin' on a Star
Moon Maker
Atlas
Christmas Event Category Winner
#19
I remember Altair telling me this wouldnt be feasible, great mod, hope Stef gets inspired...
 

Altaïr

Space Stig, Master of gravity
Staff member
Head Moderator
Moderator
Veteran
Modder
Deja Vu
Hot Stuff
Swingin' on a Star
Atlas
Forum Legend
#20
I remember Altair telling me this wouldnt be feasible, great mod, hope Stef gets inspired...
I'm a bit surprised about that, but if I did I'm glad I've been proven wrong :p
I probably told that it was not possible to make an exact prediction since it would depend on the player input and how the craft moves during reentry though (rotating it modifies its cross-sectional area, which modifies drag). For his mod pixelgaming assumed that the craft orientation was fixed, which simplifies the problem, and seems reasonable in practice.

Wether it's possible or not depends on the hypothesis you make and the level of accuracy you want. For example, a ΔV mod was considered to be impossible in practice, because it needed to figure out how the player would use their rocket (especially the staging steps, which are facultative to define)... until I made a ΔV mod myself: but it only calculates the ΔV of the current stage, and assumes you use it "as expected", by burning all the fuel: you can easily make the mod lie by discarding a stage before it's empty for example.
 

Axiom

The Didact
Recruit
Hot Stuff
Swingin' on a Star
Atlas
#21
it needed to figure out how the player would use their rocket
Maybe have the mod ask how the rocket was going to be used? Like you could ask when each staging step was going to be used or at what fuel percentage and then use that to calculate the stages. It would probably be quite cumbersome but probably would still work
 

Darthan

Modder
Deja Vu
Hot Stuff
Space Glider
Swingin' on a Star
Voyager Quest
ET phone home
Atlas
Floater
#22
[...] it only calculates the ΔV of the current stage, and assumes you use it "as expected", by burning all the fuel: you can easily make the mod lie by discarding a stage before it's empty for example.
Even stranger things can happen with 'breadcrumb' staging (transferring fuel to the tank attached to the running engine from a separate tank ). The delta-V goes UP as you burn fuel since the total mass goes down but the tank with the engine stays at 100%.
=====================================
On the actual topic for the thread I've noticed that aero-trajectory becomes somewhat laggy in realistic mode. It is quite fast in normal.
 
#23
I've been making use of this mod for quite a while, and I really love it! I do have a suggestion that I and other players could make use of. I have a rocket that re-enters 280 degrees clockwise from prograde and I'd like to suggest an extra option to be added to the prograde and/or retrograde simulation settings to account for it, as the current options can't properly predict my rocket's entry due to its changing angle. I hope this is possible and easy to make, and if not, it's ok! Have a good Pi day :D
 
#24
I've been making use of this mod for quite a while, and I really love it! I do have a suggestion that I and other players could make use of. I have a rocket that re-enters 280 degrees clockwise from prograde and I'd like to suggest an extra option to be added to the prograde and/or retrograde simulation settings to account for it, as the current options can't properly predict my rocket's entry due to its changing angle. I hope this is possible and easy to make, and if not, it's ok! Have a good Pi day :D
If your rocket is able to maintain that 280° angle (relative to prograde) throughout the re-entry (either manually or using my Smart SAS mod), then you can use the "current angle" option for the "simulation type" setting to predict the trajectory based on that angle, instead of strictly prograde or retrograde. The next best option - in the case of a changing angle relative to prograde - would be the "min-max range" option, which predicts the trajectories for the angles of minimum and maximum drag forces (approximately). Being able to predict a changing angle would be both impossible (as I can't predict future player inputs ofc), and computationally expensive (since afaik calculating the surface data required for the drag force is quite expensive). The final option would be using the gliding heatshields mod to make corrections to your trajectory throughout the re-entry (gliding heatshields' forces are also included in Aero Trajectory's simulation when the mod it's installed).
 
Last edited:
#25
On the actual topic for the thread I've noticed that aero-trajectory becomes somewhat laggy in realistic mode. It is quite fast in normal.
Yea, that's mostly an issue with the mod requiring more steps to finish the simulation (by reaching the ground or escaping the atmosphere) in realistic difficulty compared to normal difficulty. If the lag becomes too unbearable, you can increase the "Step Size" setting (which will lower the accuracy of the simulation, but it should be fine for most use-cases) and/or reduce the "Iterations" setting (lower values will mean that the simulated trajectory may stop before it reaches those aforementioned finish-cases).

I was considering moving the simulation to a seperate thread (like what the ANAIS mod does) to minimise the trajectory's impact on the game's frame-rate, however the mod ran good enough at normal difficulty on my relatively under-powered laptop that the effort to implement the threading didn't seem worth it (at least for me). If someone wants to implement ANAIS-like threading for the mod, than I'm more than willing to accept a pull request on the GitHub repo!