Jump to content

[old thread] Trajectories : atmospheric predictions


Youen

Recommended Posts

I just had the bad ymax issue recur myself (mine is currently: <ymax>-633</ymax>).  I don't know if it happened immediately after the last time I updated or not, but it might have done.  Got this one time before as well.

Link to comment
Share on other sites

@Youen

I have to say, this is far and a way one of the coolest mods out there. It has fast become an essential tool for me, since I'm horrible at landing and aerobraking. I just did a double orbit aerobraking descent (I don't know the proper vocab to describe it, but it took me two orbits of kerbin before my orbit decayed enough and it was business as usual). It was a lot of fun, and I would never have been able to do something like that without this mod.

I also really like how you can watch the trajectories of debris and such. Overall, this is a very well thought out mod.:)

Two things:

  • Is it possible to get it enabled in the tracking station or would that be a lot of work? I suppose it's mainly useful in flight, but if it's as simple as enabling the button on the toolbars, I wouldn't say no.^_^
  • (Edit: I think this is PreciseNode actually) Does the below mean anything to you? After that first NaN, it's a non-stop wall of it. Doesn't seem to affect gameplay or performance; not even sure it's related to Trajectories, except it first occurs right after loading the Cache. Log here if curious. I only ask because I'm in the middle of a debug battle and I'm trying to naildown loose ends for larger problems, and it's cluttering up the log.
    • In game I'm just lazily in orbit around Kerbin 5Mm out or so, adjusting a satellite. Nothing special.
[LOG 22:40:07.941] Trajectories: Initializing cache
[LOG 22:40:07.941] E is NaN! tA: 3.14159265358979, e = NaN
Edited by Deimos Rast
PreciseNode
Link to comment
Share on other sites

This is a fantastic mod and I get a lot of use out of it. However I have a persistent want. Most times I'm approaching Kerbin I'm not in the aerodynamic configuration that I will be entering the atmosphere in currently. Or rather I will shed parts down to some sort of capsule subset of parts. The annoyance is that the aerodynamic properties of the two configurations aren't the same so a perfectly planned reentry in one configuration can be hugely different than the other. However if I could apply some sort of manual aerodynamic file from my back pocket (perhaps recorded on a totally different flight) then I could specify an aerodynamic body that much more closely resembles what will be flying.

If I could "save a cache" say as "Capsule 1" and then "specify aerodynamic cache" later on a totally different mission to override the aero body for predictions that would be both helpful to  me for precision purposes but could add extra gameplay value as well. It might become routine to do "test body" mission to capture aero data in support of future missions.

Link to comment
Share on other sites

7 hours ago, Frederf said:

...if I could apply some sort of manual aerodynamic file from my back pocket (perhaps recorded on a totally different flight) then I could specify an aerodynamic body that much more closely resembles what will be flying.

Yep, this is a fairly common request. IIRC, in the past the answer has been, "this is very hard to do" and "it's not happening any time soon."

Edited by Gryphon
Link to comment
Share on other sites

Actually; saving/restoring the cache is not that complicated. Simulating a vessel that doesn't exist yet (a future stage for example) in order to generate the cache is difficult (or seems to be difficult, i.e. I didn't find a straightforward way to do it, especially since the work has to be done twice because FAR and the stock model are so different), but if the cache already exists, saving/loading is quite easy. There would be a little work for the GUI as well.

As @Frederf said, it could bring in a bit of gameplay, like having to start recording aero data, and then the mod would record the range of velocities and altitudes traveled by the vessel, and would be able to make predictions within this range later (and be able to extrapolate different velocity/altitude/AoA combinations of course), thus forcing players to actually make a reentry to gather useful data, not just spawning the capsule on the launchpad. Not sure if that would actually be fun gameplay or not.

I can see the value of such a feature, maybe not the easiest thing to understand for every players but certainly useful in some cases. I'll think about that next time I have time to spare to the mod. As always, anyone with programming skills could contribute :)

Link to comment
Share on other sites

2 minutes ago, Youen said:

@FrederfActually; saving/restoring the cache is not that complicated. Simulating a vessel that doesn't exist yet (a future stage for example) in order to generate the cache is difficult (or seems to be difficult, i.e. I didn't find a straightforward way to do it, especially since the work has to be done twice because FAR and the stock model are so different), but if the cache already exists, saving/loading is quite easy. There would be a little work for the GUI as well.

It might be clunky and kludgey (and may not even work depending on how a ship must "exist" in the game) but maybe allow the user to specify a .craft file, or a subassembly, that represents the ship as it'll be when in atmo? You could build your entire "Eve lander" ship ready to launch from Kerbin, strip off everything that isn't going to land on Eve, open the heat shield, save the ship as "Eve Lander - Trajectories" and then do some UI tomfoolery to tell Trajectories to use THAT ship, not the current ship, when drawing the prediction line.

Link to comment
Share on other sites

This wouldn't directly work for FAR, the ship has to be actively simulated for the voxel stuff to exist at all (among other things). That's the whole difficulty with the prediction of future stages : currently I just make KSP think an existing vessel is in a different situation (air density and velocity) and measure the resulting forces. That's also why at some point I had rapid unplanned disassembly issues of the actual player vessel, even before entering atmosphere, because it was put in a lot of air stresses for the sole purpose of prediction (bug fixed now with the help of Ferram). But without a vessel in the simulation, I'd have to resort to another, probably more complicated, method. Once I've made all the measurements however, I don't need the vessel anymore. There is only the mass that can vary depending on fuel amount (but that's easy to adjust with a slider or something).

Link to comment
Share on other sites

Curiously enough it is not possible to preview a trajectory before lift-off.

That is to say: for as long as the vehicle rests on the launch pad, whether or not its engines are on or even firing at the moment, I cannot see trajectories or manouevre nodes.

Needless to say this makes planning my flight ahead of time slightly complicated.

Link to comment
Share on other sites

16 hours ago, Angstinator said:

Curiously enough it is not possible to preview a trajectory before lift-off.

That is to say: for as long as the vehicle rests on the launch pad, whether or not its engines are on or even firing at the moment, I cannot see trajectories or manouevre nodes.

Needless to say this makes planning my flight ahead of time slightly complicated.

This should not be possible because the trajectory is calculated from your actual state.
When you stand still on the launchpad (stand-still is euphemism, beside game issues) than the only possible pre-calculated and projected trajectory is a nearly straight line down to the planet center I guess...

Link to comment
Share on other sites

19 minutes ago, Gordon Dry said:

This should not be possible because the trajectory is calculated from your actual state.
When you stand still on the launchpad (stand-still is euphemism, beside game issues) than the only possible pre-calculated and projected trajectory is a nearly straight line down to the planet center I guess...

Yes, but the mod is capable of displaying post-manoeuvre trajectory in-flight.

If I plan my launch with a manoeuvre node, however, neither the manoeuvre nor actual trajectory appear.

Link to comment
Share on other sites

13 minutes ago, Angstinator said:

Yes, but the mod is capable of displaying post-manoeuvre trajectory in-flight.

If I plan my launch with a manoeuvre node, however, neither the manoeuvre nor actual trajectory appear.

@Gordon Dry is right, when on the pad, the rocket is in a special place, being supported by the ground, and without the ground, it would fall straight down.  Maneuver nodes show the post-maneuver orbit as if the maneuver was instantaneous, which isn't quite true, but is reasonable in space.  And then Trajectories will show that path changed once it encounters an atmosphere.

An ascent path is about as far from an instantaneous course change as possible.  It's like the path Trajectories shows for landing (a power track, the course followed under acceleration) but here the aerodynamic forces play second fiddle to the rocket thrust.  I'd say it's beyond the current scope of Trajectories.

The closest I've seen to it is the adjustment tool in MechJeb's Ascent Guidance.  And leaving that up while you fly the ascent shows how much the actual path deviates from the planned and predicted one.  I've also seen professional level ones (in Von Braun's The Mars Project) and assumptions have to be made to determine a path.  If those assumptions don't match how the rocket flies the path, prediction and reality widely separate.

Link to comment
Share on other sites

@Angstinator You may also notive that when you add a manoeuvre node after an aerobrake, it won't be used by Trajectories. To be fair, I don't remember if this is on purpose (to avoid a buggy state) or a bug. But the point is, manoeuvre nodes after the ship goes through the atmosphere are ignored by Trajectories. And of course the launchpad is inside the atmosphere. I don't know if it would be easy to make it work or not (for example, I don't know if FAR is ready for aerodynamic forces prediction when the vessel is in "landed" state).

As stated by @Jacke, another problem is to predict thrust over a duration, instead of an instantaneous delta-v. This is something I wanted to do from the beginning (the name "Trajectories" was chosen to be generic enough to include this kind of feature), but never got the time and motivation to do it yet. It could also be used to predict long orbital manoeuvre, with ion engines etc.

In the case of take-off, you need to predict thrust and aerodynamic forces at the same time, and also a varying orientation if you want to make a gravity turn. This would definitely be useful (for example to plan an interception with another vessel already in orbit, or just to find the optimal ascent parameters), but requires some more work on the mod.

Edited by Youen
Link to comment
Share on other sites

@YouenJust a quick note, is it possible to change the colour of the non-atmospheric portion of the trajectory prediction?

I find that in busy regions (LKO!) the prediction line tend to be hard to make out against the mass of other lines that are there.

I'll have a quick look at the mod files and see if its obvious.

Edit: No it.s not. This might be a nice feature to add into the .cfg file?

Edited by Bishop149
Link to comment
Share on other sites

Having some trouble with the Toolbars and this mod. Clicking to enable Trajectories in the Toolbar does not produce a button. But it does make the toolbar go away entirely, which is a problem.

Anyone else getting this?

 

Link to comment
Share on other sites

I was having the y-max issue. I deleted my config file and restarted KSP. Trajectories still don't work. the GUI window is just a little smudge and I get this in the log (over and over):

 

NullReferenceException: Object reference not set to an instance of an object
  at Trajectories.Trajectory.get_AerodynamicModelName () [0x00000] in <filename unknown>:0 
  at Trajectories.MapGUI.MainWindow (Int32 id) [0x00000] in <filename unknown>:0 
  at UnityEngine.GUILayout+LayoutedWindow.DoWindow (Int32 windowID) [0x00000] in <filename unknown>:0 
  at UnityEngine.GUI.CallWindowDelegate (UnityEngine.WindowFunction func, Int32 id, UnityEngine.GUISkin _skin, Int32 forceRect, Single width, Single height, UnityEngine.GUIStyle style) [0x00000] in <filename unknown>:0 
 
(Filename:  Line: -1)

Trajectories.cfg

@PART[*]:HAS[@MODULE[ModuleCommand]]:FOR[Trajectories]
{
	MODULE
	{
		name = TrajectoriesVesselSettings
	}
}

Windows 7 Ultimate

Traj: 1.6.2

 [KSP Version]: 1.1.2.1260 x64 and x86

 

Hmm, deleted the xml file and restarted in x86 and now it works.

Edited by SaintD
Moar testing.
Link to comment
Share on other sites

Ummmm i think im crashing due to Trajectoies my crash output log is filled with tthis

NullReferenceException: Object reference not set to an instance of an object
  at Trajectories.NavBallOverlay.SetDisplayEnabled (Boolean enabled) [0x00000] in <filename unknown>:0
  at Trajectories.NavBallOverlay.Update () [0x00000] in <filename unknown>:0 

Litterally its repeated a million times near the end of the log 

Link to comment
Share on other sites

17 hours ago, NemesisBosseret said:

Ummmm i think im crashing due to Trajectoies my crash output log is filled with tthis

NullReferenceException: Object reference not set to an instance of an object
  at Trajectories.NavBallOverlay.SetDisplayEnabled (Boolean enabled) [0x00000] in <filename unknown>:0
  at Trajectories.NavBallOverlay.Update () [0x00000] in <filename unknown>:0 

Litterally its repeated a million times near the end of the log 

Make sure you have the latest version of Trajectories, and make sure you have it installed correctly.
If that's not it, you might try taking a look at

Folks need more details to be able to diagnose your issue, and that post explains how to get them (as well as some other things to try to fix the issue).

Link to comment
Share on other sites

  • 2 weeks later...
On 2016. 06. 01. at 10:09 PM, Youen said:

This wouldn't directly work for FAR, the ship has to be actively simulated for the voxel stuff to exist at all (among other things).

When you say "This wouldn't directly work for FAR", are you referring to predictions based on a cache generated in a different flight, or 5thHorseman's suggestion about the user specifying another .craft file?

On 2016. 05. 31. at 9:23 PM, Youen said:

As @Frederf said, it could bring in a bit of gameplay, like having to start recording aero data, and then the mod would record the range of velocities and altitudes traveled by the vessel, and would be able to make predictions within this range later (and be able to extrapolate different velocity/altitude/AoA combinations of course), thus forcing players to actually make a reentry to gather useful data, not just spawning the capsule on the launchpad. Not sure if that would actually be fun gameplay or not.

Absolutely, for a certain kind of player (like me) it would be really cool :)
I don't like to kill Kerbals, so I usually test craft in robotic mode anyway, before putting Kerbals in them.
(It could be argued that not everyone wants to do this, so maybe it needs to be an optional feature or an offshoot of this mod?)


Btw I've made several reentries with an inflatable heatshield, and Trajectories worked pretty well if I inflated the heatshield before I made the maneuver node, then deflated to be able to use the engines, then inflated again for the actual reentry. But the predicted landing site moved a little bit during reentry, and since I didn't have much aerodynamic control, I ended up splashing down instead of touching down.

Link to comment
Share on other sites

Is Trajectories 1.1.3 compatible? It's one of the few mods in my install that (on CKAN) lists 1.1.2 as the supported version, preventing me from upgrading... and I wouldn't want to live without it! :)

Link to comment
Share on other sites

On 7/3/2016 at 11:08 PM, karstux said:

Is Trajectories 1.1.3 compatible? It's one of the few mods in my install that (on CKAN) lists 1.1.2 as the supported version, preventing me from upgrading... and I wouldn't want to live without it! :)

Works fine for me

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...