Jump to content

[0.25] RasterPropMonitor - putting the A in your IVA (v0.18.3) [8 Oct]


Mihara

Recommended Posts

So I went ahead and did some quick tests, and here's what I came up with. These are four identical tanks, and I drained the second one halfway. Now, like I said, I know your mod isn't causing this but I wanted to show you what I was talking about. This is a bit extreme of an example, but should perfectly illustrate the behavior (since these are the same returns RasterProp gets). I have no idea why it is returning the value of the second tank in the stack, but that's exactly what its doing. I'd have to do more tests, and I'll post a bug report for squad later, but I figured you should know about it.

2014-01-02_00001_zps06d833da.jpg~original

Link to comment
Share on other sites

I have no idea why it is returning the value of the second tank in the stack, but that's exactly what its doing. I'd have to do more tests, and I'll post a bug report for squad later, but I figured you should know about it.

Thanks.

That is precisely why calculating dV actually does take 30 kilobytes worth of code and a separate thread, and precisely why I am reluctant to incorporate it directly -- even stock components don't always get it right, which necessitates an iterative simulation of propellants burning. :)

Link to comment
Share on other sites

Well that was much ado about nothing. Updated firespitter and went to orbit IVA only for the first time :)

Using your map doesn't count, and you have to use F2. Anything less is blasphemy. BLASPHEMY.

@Mihara, first off, since needsElectricCharge doesn't draw any power, just disabling the batteries on a craft doesn't deactivate it though there technically isn't any power available. It turns off when ElectricCharge is 0, but not when there is no charge available. I know you have no plans to actually drain power, but perhaps you could check if you are able to.

And second, headingAboveOverlay ... doesn't seem to work. I'm using an opaque layer for my PFD and the heading is, then, supposed to be drawn over the top of it, but it simply doesn't appear. However, the bar DID show up before that so I probably just assumed it would work. But, once again it may be that headingAboveOverlay is expecting something else, here is the page file:


PAGE
{
name = flightdisplay
text = Hyomoto/MFD/menus/overlayPFD.txt
textureURL = Hyomoto/MFD/images/genericBg
textureOverlayURL = Hyomoto/MFD/images/scanlines
disableSwitchingTo = btn1, btn4, btn5, btn6, btn7, btn8, btn9, btn10, up, down, enter
BACKGROUNDHANDLER
{
name = JSIPrimaryFlightDisplay
method = RenderPFD
buttonClickMethod = ButtonProcessor
speedModeButton = 4
navBallModel = JSI/RasterPropMonitor/Example/ExampleMFD/PFD/NavBall
horizonTexture = JSI/RasterPropMonitor/Example/ExampleMFD/PFD/NavBall000
staticOverlay = Hyomoto/MFD/images/pfdStatic
headingBar = Hyomoto/MFD/images/pfdHeading
headingBarPosition = 0.0, 0.65, 0.4, 0.05
headingAboveOverlay = 1
cameraSpan = 0.75
cameraShift = 0, -0.05
}
CONTEXTREDIRECT
{
redirect = btn2, orbitinfo
redirect = btn3, takeoffassist
redirect = btn4, landingassist
redirect = escape, FlightInfoMenu
redirect = home, default
}
}

Edited by Hyomoto
Link to comment
Share on other sites

And second, headingAboveOverlay ... doesn't seem to work. I'm using an opaque layer for my PFD and the heading is, then, supposed to be drawn over the top of it, but it simply doesn't appear. However, the bar DID show up before that so I probably just assumed it would work. But, once again it may be that headingAboveOverlay is expecting something else, here is the page file:

headingAboveOverlay is defined as type bool. It needs either "true" or "false", not "1". Try changing it to "true".

Link to comment
Share on other sites

@Mihara, first off, since needsElectricCharge doesn't draw any power, just disabling the batteries on a craft doesn't deactivate it though there technically isn't any power available. It turns off when ElectricCharge is 0, but not when there is no charge available. I know you have no plans to actually drain power, but perhaps you could check if you are able to.

How exactly do you disable batteries, though?

Link to comment
Share on other sites

I'm new to string.format, and a quick review of this thread, the developer's documentation and another resource or two have left me with a major question: how do I perform mathematical operations within a page? I'd love to do some simple things like "mnodedv/maxaccel" for accurate node completion times.

Link to comment
Share on other sites

I'm new to string.format, and a quick review of this thread, the developer's documentation and another resource or two have left me with a major question: how do I perform mathematical operations within a page? I'd love to do some simple things like "mnodedv/maxaccel" for accurate node completion times.

You can't. String.Format is a (rather basic by itself) string layout language, but it is not a mathematical expression processor. Tags are a screen layout language, but they are not a mathematical expression processor either.

While there have been calls for implementing one, that's one of the things I'm very wary of doing at all -- it's not particularly hard to do, but it's also all too easy to produce a Turing Tarpit, unwieldy to use and slowing the whole thing down, I've spent much of my life fighting these things and I don't want to create another one. If it's to be a programming language, I can at least make sure it will be a real one and make it suck in modules that will get locally compiled from a domain-specific Boo variant or something to that effect. It will take a while for me to write that, though, but I'm pretty sure eventually I will.

In the meantime, if you want a variable that is derived from existing variables, there's no problem at all just adding one -- gimme a list of what you actually want. I'll readily add anything provided it doesn't require writing more than a page of code to do it, and I will seriously consider things that will so require.

P.S. Oh, and node burn times are already calculated more accurately than stock does, I'm not just taking the value stock gives you, someone actually contributed a better formula. :)

Edited by Mihara
Link to comment
Share on other sites

How exactly do you disable batteries, though?

The same way you can disable fuels, next to all resources is a nice little green arrow that looks like a 'play' button. When you click it, it becomes a circle-slash, and now it's not available. It doesn't affect the amount of total resources available but it prevents it from being used. That is why I suggest if you can test whether or not you can actually draw power rather than just relying on the total number. You can certainly consider this low-priority though. On an unrelated note, I put together a video showing off an all IVA mission using RasterPropMonitor and hopefully it does it justice.

Edited by Hyomoto
Link to comment
Share on other sites

The same way you can disable fuels, next to all resources is a nice little green arrow that looks like a 'play' button. When you click it, it becomes a circle-slash, and now it's not available. It doesn't affect the amount of total resources available but it prevents it from being used. That is why I suggest if you can test whether or not you can actually draw power rather than just relying on the total number. You can certainly consider this low-priority though.

I'm not sure how to deal with that correctly, actually. I think I'll put it off until I decide to rewrite resource handling to use a proper resource data structure, which should be right after 0.13 is out the door. Then it can contain (and return) separate values for present resources, total storage volume, per-stage quantity and storage volume, and most importantly, the amount actually accessible accounting for resource toggles. As well as whether any of those resources is a propellant for currently enabled engines.

On an unrelated note, I put together a video showing off an all IVA mission using RasterPropMonitor and hopefully it does it justice.

Ooh, neat! :) I'll put that in the OP...

P.S. Mind posting it up on Reddit?

Edited by Mihara
Link to comment
Share on other sites

Hi. I found this mod not long ago and it is one of my favorites. Doing things IVA is now possible and is lots of fun. Brilliant!

But i wonder if you could support some flight parameters from the FAR plugin. The mach number and IAS would be the most important i think. I have no idea how hard this would be. So just something to consider.

Link to comment
Share on other sites

But i wonder if you could support some flight parameters from the FAR plugin. The mach number and IAS would be the most important i think. I have no idea how hard this would be. So just something to consider.

Eventually. There is a variable for equivalent airspeed already, but of course I plan to do the rest of them. How soon is the 'eventually' depends on whether I can do this without actually hooking directly into the FAR plugin, i.e. whether I can infer the values from what FAR does to the rest of the game rather than by directly reaching into the guts of FAR. If I can, it will be sooner.

If I can't, it will require implementing the general dig-for-variables-through-interface-modules interface first, which is in the plans soon, but not this week. :)

EDIT: Upon cursory investigation, the mach number calculation in FAR does not actually rely on things FAR does to lift or drag. I could import the entire function from FAR and it would work. I'm not sure if I'm permitted to take code from CC BY-SA licensed plugin and just import it into a GPL project, though, I'll have to ask Ferram.

Edited by Mihara
Link to comment
Share on other sites

Nice. But nah ... don't copy paste code. It will be a maintenance nightmare.

In this particular case, it won't be. It's a fairly standard function of computing speed of sound in an atmosphere based on pressure and temperature. :) It does have workarounds for silly bugs in Jool atmosphere which result in sub-zero Kelvin degrees, though...

Link to comment
Share on other sites

Just read you're going to use something like a stripped-down boo for user-defined variables. You aren't, by any chance, thinking about extending that to an Autopilot scripting thingy, like kOS, but you know, with proper language features like functions and arrays and non-messed-up maintenance? Or if someone else is interested in doing that (and has the time for it), that would also be nice. I would propably try to do it myself, but I'm always running out of time, so...propably not going to work out. Of course, this is all very hypothetical since your basic Boo integration is still just a plan, and there might be a usable fork of kOS incoming.

Link to comment
Share on other sites

Just read you're going to use something like a stripped-down boo for user-defined variables. You aren't, by any chance, thinking about extending that to an Autopilot scripting thingy, like kOS, but you know, with proper language features like functions and arrays and non-messed-up maintenance?

It might happen. But if I ever do something of the sort, it'll be a MechJeb addon giving your Boo scripts direct access to MJ internals -- because I have no mathematical background to do it all from scratch and no desire to rip code out of MechJeb in such quantities. :) Which will earn it the ire of all the "kOS over MJ" crowd, but I think I can pacify those people by making it a configuration that disables MJ human interface modules...

We'll see, right now I have a backlog of less difficult things to code a couple minor versions long. :)

Link to comment
Share on other sites

How do I save the Squad Texture Reduction pack "somewhere" in GameData? Do I save it as a .txt? .cfg? how should I name it?

edit:

nevermind, I figured it out

Edited by mvronsky
Link to comment
Share on other sites

does this mod change things in a save file? Like store information in it

And can cause this a broken save file? (If the extneral Camera is not mounted on a Vessel)

Yes, it saves some information, but none of it is critical even for itself -- it's things like current page numbers and state of light switches. It does not manipulate the save file directly and cannot 'break' it. Missing an external camera is a perfectly normal occurrence (it can, after all, fall off during the normal flying).

What exactly is happening to your save file? Does KSP refuse to load it, or it loads the file and something doesn't work afterwards?

Link to comment
Share on other sites

You can't. String.Format is a (rather basic by itself) string layout language, but it is not a mathematical expression processor. Tags are a screen layout language, but they are not a mathematical expression processor either.

...

In the meantime, if you want a variable that is derived from existing variables, there's no problem at all just adding one -- gimme a list of what you actually want. I'll readily add anything provided it doesn't require writing more than a page of code to do it, and I will seriously consider things that will so require.

Awww what a good developer. Have a treat!

The main thing I'd like to see is [orbital period] - [time to AP], and ditto for PE. I usually circularize my orbit by pointing at prograde and watching time to AP, increasing my Y pitch to increase time to AP and throttling down to decrease time to AP. By balancing on or very near my AP, I can circularize without fussing with a node and in a single burn. The only problem is that when I pass AP, I have to do a lot of rapid subtraction to figure out how far ahead I am. I'd like to see a negative value for that.

I'd really like to throw time to AP into your BAR function and get a nice indicator to balance around a zero point. That would look a lot nicer if you included a new BAR argument that allowed you to display it backwards.

Thanks a bunch for all your time spent on this project. I'm really enjoying digging my hands into a new language, and these displays feel so much better than MechJeb's.

Link to comment
Share on other sites

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