Jump to content

[Part] [1.9] Graphotron [v1.5.1, March 9, 2020] - Track & Plot Sensor & Flight Data


Ezriilc

Recommended Posts

10 hours ago, delta wee said:

Thanks, the changes for the new data sources work fine.

Some other things I think would make using the Graphotron better:

  • A scrollable plot window, so data isn't lost once it reaches the left side.
  • Not requiring the Graphotron part to be attached to the vehicle for graphs to work. Right now it is awkward to use if you have fairings on the payload because if you want to use the graphs on the last stage you need to put the part inside the fairing, which makes it so you can't activate it at the start of the launch.
  • An "Advanced Data Sources" section that contains all meaningful data sources.
  • The ability to minimize all Graphotron windows, maybe by having a button on the top-right for Graphotron similar to what Kerbal Engineer has.
  • Have the time data be based off the actual time in the game. Right now if you do a time warp while plotting data it will get compressed and make the graphs look bad.

My pleasure, and thanks for the report.

As for making Graphotron partless, it's been discussed and we decided to leave it as is.  You can make it partless by using Module Manager, I believe.  But I will add a hot-key or App Button to activate it, so one doesn't need to click on the part to see the interface.

As for the Advanced Data Sources, I've already added all the sources I could find related to the vessel object, but there may be others - if someone knows of some, please let me know.

@delta wee, thanks for all the input!  :D

EDIT:  I've added issues to our repo here:  https://github.com/Ezriilc/KSP-Graphotron/issues

Edited by Ezriilc
Link to comment
Share on other sites

11 hours ago, Ezriilc said:

A scrollable plot window, so data isn't lost once it reaches the left side.

I think a simple solution to this would just be to have the graphotron export the image when the graph reaches the end, and then do it again as necessary

Link to comment
Share on other sites

12 hours ago, Drew Kerman said:

I think a simple solution to this would just be to have the graphotron export the image when the graph reaches the end, and then do it again as necessary

That's a great idea.  I've added your comment to the issue on it.  Thanks!

Link to comment
Share on other sites

  • 5 months later...
  • 3 months later...

I'd like to put forward a few suggestions
One is for an additional data series to the Graphatron to allow for an interesting realtime graph. 
Could there be a calculated series (area or bar if possible / otherwise the standard dot is fine) for "Terrain Height" (Altitude [Sea  Level] - Altitude [Surface])

When you plot this along with "Sea Level Altitude" on the same chart, you get something like the below.

lLxOuqF.jpg

Image borrow from this thread (great idea BTW)

 

The second suggestion is to allow resource percentage amounts be added as a Graphatron data source? ie showing the values that are in the Narrow band scanner? eg: 1.1%

 

Edited by wile1411
Link to comment
Share on other sites

58 minutes ago, wile1411 said:

I'd like to put forward a few suggestions
One is for an additional data series to the Graphatron to allow for an interesting realtime graph. 
Could there be a calculated series (area or bar if possible / otherwise the standard dot is fine) for "Terrain Height" (Altitude [Sea  Level] - Altitude [Surface])

When you plot this along with "Sea Level Altitude" on the same chart, you get something like the below.

...snip...

The second suggestion is to allow resource percentage amounts be added as a Graphatron data source? ie showing the values that are in the Narrow band scanner? eg: 1.1%

 

Thanks for the suggestions!  I'm not sure if I know how to implement them, particularly because I'm not good with C# - I'm mostly a custodian.  I have added these to our issues in the GitHub repo, where everyone can keep track.

https://github.com/Ezriilc/KSP-Graphotron/issues/7

https://github.com/Ezriilc/KSP-Graphotron/issues/8

Link to comment
Share on other sites

11 minutes ago, Ezriilc said:

Thanks for the suggestions!  I'm not sure if I know how to implement them, particularly because I'm not good with C# - I'm mostly a custodian.  I have added these to our issues in the GitHub repo, where everyone can keep track.

https://github.com/Ezriilc/KSP-Graphotron/issues/7

https://github.com/Ezriilc/KSP-Graphotron/issues/8

Thanks for that. I've got a basic idea of C#, but I'm too chicken to submit something for fear it'll break the mod for everyone else. If someone OKs it, I can try to add the pull request

Here's my 'guess' to add the Terrain Altitude to the ModuleEnviroSensorPlotter.cs file:

Insert @ Line 247
sources.Add (new VesselInfoSource ("Flight data", "Altitude (terrain)", 		() => (float)(vessel.altitude - vessel.heightFromTerrain)));

 

Edited by wile1411
Link to comment
Share on other sites

3 hours ago, wile1411 said:

Thanks for that. I've got a basic idea of C#, but I'm too chicken to submit something for fear it'll break the mod for everyone else. If someone OKs it, I can try to add the pull request

Here's my 'guess' to add the Terrain Altitude to the ModuleEnviroSensorPlotter.cs file:


Insert @ Line 247
sources.Add (new VesselInfoSource ("Flight data", "Altitude (terrain)", 		() => (float)(vessel.altitude - vessel.heightFromTerrain)));

 

Another example of some fun with the data. This time I'm using the data provided by Graphotron, threw it into a spreadsheet tool and graphed the results.

I'm pretty sure I didn't fly over water, so I have no idea why the Surface and Sea Level Altitudes became the same once I past 12K Altitude. Maybe a thing Stock does when you're too high.

Anywho, this is me just flying over the "Oops, too short" mountains near KSC and was trying to get as close as I could while skimming the ground. I set the plane of a climb while looking in the folders to find where the CSV file was saved. Once found, I then went back over the mountains and repeated the ground skimming.

duEWzMlh.png

 

Link to comment
Share on other sites

@wile1411, at first glance, I think you are correct about your code snippet, and thanks for your input. :D  It helps me immensely.

As for doing more, I did take what I've added in the past from the API documentation and simply duplicated existing code for sources.  EDIT:  I haven't looked at this in a very long time, so there may be more we can add by now.

Thanks also to @danielboro for your enthusiasm!  It warms my heart that others still find Graphotron useful.

I'm afraid that I'm going to use hurricanes as my excuse for not jumping on this right away.  Irma, Maria, and Lee have me very distracted.

Edited by Ezriilc
Link to comment
Share on other sites

5 hours ago, Ezriilc said:

@wile1411, at first glance, I think you are correct about your code snippet, and thanks for your input. :D  It helps me immensely.

As for doing more, I did take what I've added in the past from the API documentation and simply duplicated existing code for sources.  EDIT:  I haven't looked at this in a very long time, so there may be more we can add by now.

Thanks also to @danielboro for your enthusiasm!  It warms my heart that others still find Graphotron useful.

I'm afraid that I'm going to use hurricanes as my excuse for not jumping on this right away.  Irma, Maria, and Lee have me very distracted.

No prob & stay safe from those tropical triplets.

Link to comment
Share on other sites

Well, it looks like we have dodged 3 bullets (so far) this hurricane season - I dread when our luck runs out.

So, I'm preparing to incorporate @wile1411's code snippet, but when I look at it I'm not sure how the results will be more useful than what we already have.  I suspect this is because I'm misunderstanding the function of each thingy we're looking at regarding altitude.
Specifically, I need someone to explain the differences between these tidbits as they relate to game play, and why players would want to graph them.  I guess I should know all this, but I'm feeling particularly slow and thick today, so thanks in advance. :)

  • vessel.altitude  [What I've called: "sea level"]
  • vessel.heightFromTerrain ["surface"]
  • vessel.altitude - vessel.heightFromTerrain ["terrain"]

Just as soon as my VS installation is done, I will do a build and some testing.

Link to comment
Share on other sites

These are my guesses base on my undrstanding:

  • vessel.altitude  [What I've called: "sea level"]

This is the altitude that you see at the top of the screen GUI in flight. It only shows the altitude from the radius of the body (ie sea level - 0m on GUI) Good to know as a reflection of what on the screen.

  • vessel.heightFromTerrain ["surface"]

This altitude is only seen (in unmodded games) in the IVA view on the above altitde dials. I think the dail has a max of 3000, but the game still output a figure in the API. This is what people mainly rely upon for landing. Eg: Knowing you are at 5000m above sea level and doing 400m/s straight down isn't helpful when the mountain below you is 4990m high. Good for charting 'actual' altitude.

  • vessel.altitude - vessel.heightFromTerrain ["terrain"]

This is the height of the terrain that the craft is flying of over. This will fluctuate depending on when the terrain is loaded. In my testing I saw the heightfromterrain sometime flicks to the same value as altitude when you are up fairly high.. When this happens the terrain height became 0 unexpectedly. I would guess that it has something to do with when terrain detail game setting you might have and when the game does/doesn't load apprriopriate terrain details due to the various scales of terrain he game uses. Graphing this essentually gives you a cross section of the terrain you are flying over. It also gives context to the heightfromterrain value on the same scale.

Hope that help?

Link to comment
Share on other sites

Yes, that does help, I think - thanks!

It might be nice to get some knowledgeable authority to confirm whatever we're thinking, but I see no harm in adding this calculation to the list of available sources.

Now, do I publish right away, or is there more we might like to do first?

On 9/18/2017 at 9:56 AM, wile1411 said:

I think Lift and Drag are on a per part value and not single number for a vessel to track in a graph.

I'd bet there is a way to calculate an average or something, but I'm just speculating.  Perhaps there is already something in the API that we could tap into.

Link to comment
Share on other sites

54 minutes ago, Ezriilc said:

Yes, that does help, I think - thanks!

It might be nice to get some knowledgeable authority to confirm whatever we're thinking, but I see no harm in adding this calculation to the list of available sources.

Now, do I publish right away, or is there more we might like to do first?

I'd bet there is a way to calculate an average or something, but I'm just speculating.  Perhaps there is already something in the API that we could tap into.

maybe the FAR modders could point you in the right direction on that one?

Link to comment
Share on other sites

  • 1 month later...

I gave the terrain altitude idea a go in a recompiled version and it work as I thought it would and the charts look nice.

Another suggestion - is it possible to allow you to select ingame sources to be plotted against a single axis? Rather than each source having it's own min/max axis on the graphotron chart? Obviously that wouldn't look any good for say a temperature source & altitude source, but some mix well.

Having said all that, if the goal of the mod is mainly to see stuff in post processing, then please ignore these suggestions :) 

Edited by wile1411
Link to comment
Share on other sites

7 hours ago, wile1411 said:

...allow you to select ingame sources to be plotted against a single axis? Rather than each source having it's own min/max axis on the graphotron chart[.]

I'm not sure if I understand what you mean.  Also, I don't know how to do much, really, so I'd likely need help and/or a pull request.

I will add an issue to our repo for this.  https://github.com/Ezriilc/KSP-Graphotron

Link to comment
Share on other sites

8 hours ago, Ezriilc said:

I'm not sure if I understand what you mean.  Also, I don't know how to do much, really, so I'd likely need help and/or a pull request.

I will add an issue to our repo for this.  https://github.com/Ezriilc/KSP-Graphotron

No prob - I''m also still learning the code myself. I'll keep working to see if I can work out how to do what I'm thinking. In the meantime, I generated the PR #9 for the new Terrain Altitude data source.

Link to comment
Share on other sites

21 minutes ago, wile1411 said:

No prob - I''m also still learning the code myself. I'll keep working to see if I can work out how to do what I'm thinking. In the meantime, I generated the PR #9 for the new Terrain Altitude data source.

I had forgotten to commit your changes and resync the repo, but I've done so now.  Thanks for your help!  :D

Link to comment
Share on other sites

  • 1 month later...

Hey there. What a great mod! I'm using it to reverse engineer the constants in the spring equation for the lander legs. I'm curious -- is the measurement for surface altitude the measure from surface to the lowest point, to the center of mass, or to the graphotron center?

Link to comment
Share on other sites

12 hours ago, Wcmille said:

Hey there. What a great mod! I'm using it to reverse engineer the constants in the spring equation for the lander legs. I'm curious -- is the measurement for surface altitude the measure from surface to the lowest point, to the center of mass, or to the graphotron center?

I don't actually know.  :blush:  I didn't create Graphotron and I don't completely understand the code, but we added a third altitude calculation recently, and I still don't know exactly what any of them represent.

I'm sorry I can't be more help.  Feel free to eyeball our code:  https://github.com/Ezriilc/KSP-Graphotron

Link to comment
Share on other sites

This thread is quite old. Please consider starting a new thread rather than reviving this one.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...