Jump to content

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


Mihara

Recommended Posts

I want to be on the same plane as the planet. I have no idea if that is rational.

Well, it is rational and does make sense as a default, I'll see what I can do. :)

That is perhaps true, but what about when I press F2? When I said I wanted IVA-only, I wanted IVA-only :).

Well, I did add it in a few minutes ago. :)

Link to comment
Share on other sites

(snip)

......The issue stems from wanting to 0 out (or raise or lower) my inclination around the body itself and having NO IDEA HOW TO FIGURE IT OUT. At first I thought, maybe it's halfway between my AP and my PE, but there's too many obvious problems with that. So the question becomes, if I KNOW my inclination, HOW DO I FIND THE ORIGIN of my ascent and descent. It's simple, I don't. So I guess what I want is the ascending/descending node based on the planet I'm orbiting versus Kerbol. I want to be on the same plane as the planet.....

(snip)

First, lemme say I totally agree with you; your inclination and nodes definitely need a display option; maybe not all the time but easily accessible without targeting another body. It can be frustrating, especially if you're just trying to line up an SSTO approach to KSC runway and need your inclination to be 0 to assist the line up...

That being said, MechJeb and other plugins will display your numerical inclination, but not your nodes. Even without the numerical inclination, you can find your AN/DN by finding the point where your orbit crosses the equator of the body you're orbiting, provided it's orbit is on a 0 degree inclination around the sun. This is probably also true for bodies with a non-0 inclination around the sun, but I've never tried so I won't claim it is. To figure out if it's descending or ascending, well... are you going towards the north pole (ascending) or towards the south pole (descending)? From there you can find the point you need to burn to adjust your inclination. What I usually do (around Kerbin) is use the orbit line of Kerbin in the map view to draw the equator, so to speak, then line up my orbit so that one side eclipses the other, and the point the two lines you're left with cross is one of your nodes. If you need a time on it, just stick a blank maneuver node there so you can see when it is. Hope that helps.

Edit: At least till Mihara works his/her magics. :D

Link to comment
Share on other sites

First, lemme say I totally agree with you; your inclination and nodes definitely need a display option; maybe not all the time but easily accessible without targeting another body. It can be frustrating, especially if you're just trying to line up an SSTO approach to KSC runway and need your inclination to be 0 to assist the line up...

TIMETOANEQUATORIAL, TIMETODNEQUATORIAL. :P That's the only non-direct-two-orbits AN/DN values MechJeb knows how to calculate, these are what you're getting.

Link to comment
Share on other sites

Seems reasonable, thanks MechJeb ... I mean Mihara! :)

I'm getting an error recently. Moving onto the targetHelper window but I'm getting an error:


NullReferenceException: Object reference not set to an instance of an object

This is the PAGE file:


PAGE
{
name = targetHelper
textureURL = Hyomoto/MFD/images/genericBg
textureOverlayURL = Hyomoto/MFD/images/scanlines
disableSwitchingTo = btn1, btn2, btn3, btn4, btn5, btn6, btn7, btn8, btn10, up, down, enter
PAGEHANDLER
{
name = JSIVariablePageTextSwitcher
method = ShowPage
pageActiveMethod = PageActive
variableName = TARGETISCELESTIAL
scale = 0, 1
threshold = 0, 1
definitionIn = Hyomoto/MFD/Menus/infoTargetHelperTarget.txt
definitionOut = Hyomoto/MFD/Menus/infoTargetHelperBody.txt
}
CONTEXTREDIRECT
{
redirect = btn9, TargetMenu
redirect = escape, TargetMenu
redirect = home, default
}
}

I'm pretty sure I just did something wrong but the documentation for this pagehandler is, at least to me, very vague. I want to use a different page depending on whether or not you have a celestial body selected. It is only supposed to show the targetHelperBody.txt when you have a celestial body selected, otherwise it shows targetHelperTarget.txt.

EDIT: Whoops, turns out that I forgot to define the scale or defined it wrong. It isn't throwing the error anymore, but the page doesn't change. It only displays helperTargetHelper.txt regardless of my selection.

Edited by Hyomoto
Link to comment
Share on other sites

NullReferenceException: Object reference not set to an instance of an object

It would be considerably more helpful to know which function is raising it.

I'm pretty sure I just did something wrong but the documentation for this pagehandler is, at least to me, very vague.

Well, the scale/threshold code is all on loan from VariableAnimator and works exactly the same way.

First we get the value of the variable (TARGETISCELESTIAL). Then we take the scale you gave (0,1), and match the number to the scale, producing a number representing where exactly the variableName falls within the scale -- transforming it from whatever it really is to a 0.0-1.0 number where 0.0 is the bottom end of the scale and 1.0 is the top end of the scale. In this particular case the scale is 0,1 so it does not change except for floating point errors.

Then we match the result against the threshold range, which you gave as 0,1, which means it always falls within the threshold and only the definitionIn page will ever be shown. :) TARGETISCELESTIAL returns 1 if the target is celestial, so you want threshold = 0.5,1.1 (to account for the floating point error drift).

Link to comment
Share on other sites

Alrighty, thank you. I figured I was doing something wrong with threshold, I was reading the JSIVariableAnimator page since it is a lot better documented to try and wrap my head around it, I'm glad you stepped in. I'm trying your method now, but as for the error it was caused by not having defined scale, so that was all on me. I guess I forgot to hit save. As for the function though, it was JSIVariablePageSwitcher.

EDIT: Yup, working. Thanks again!

EDIT2: Recommend a filter for the track menu "SOI" to only show objects within the same sphere of influence as you. Of course that sounds good on paper, my guess is its much harder in practice.

Edited by Hyomoto
Link to comment
Share on other sites

EDIT2: Recommend a filter for the track menu "SOI" to only show objects within the same sphere of influence as you. Of course that sounds good on paper, my guess is its much harder in practice.

It is. :) Objects outside your SOI should be showing up as disabled options, though.

Link to comment
Share on other sites

Sorry if any of this was suggested already, but I have a couple ideas for making this work a bit better with RealFuels and Engine Ignitor:

Display Delta-V and stage DV some where.

Detect RealFuels fuel use and instead of displaying/warning LiquidFuel, display/warn for the fuel in use by the current stage engine.

Allow individual engines to be started and shutdown from a monitor.

Thanks!

Link to comment
Share on other sites

Display Delta-V and stage DV some where.

That involves either porting 30kb worth of code from Mechjeb that requires it's own thread to execute and praying it won't break (it eventually will) or directly asking MechJeb for the value. (Will only work if MechJeb is installed and on the ship.) I'm planning to do the latter, I'm definitely not doing the former.

There is a certain chance that stage dV might make it, but no promises.

Detect RealFuels fuel use and instead of displaying/warning LiquidFuel, display/warn for the fuel in use by the current stage engine.

Very nontrivial to do because there is no clear way to decide what to do if you are using multiple types of engines simultaneously and each is using it's own type of fuel. You can always edit the alarm/indicator light to depend on some other variable -- addressing RealFuels by name has been supported since forever.

Allow individual engines to be started and shutdown from a monitor.

Well, maybe, but there's a problem.

With docking ports, I can at least give you an idea which one is which by figuring out which direction it's pointing into. With engines, though, most of them will be pointing into the same direction, and multiple engines can be present in the same stage. How do you propose to tell between them? The order the will be retreived in is undefined, the code doesn't know which one is where. My suggestion would be to use action groups instead.

And yes, there will be action group buttons eventually -- there are on ALCOR.

Link to comment
Share on other sites

Looking at the manual, it seems that a lot of that is implemented already. Is there a way to access it?

Editing the prop configuration files and page definition files to actually request the information would be that way.

Link to comment
Share on other sites

Mihara, thanks very much for the reply!

Getting the DV from MechJeb sounds great to me, and using action groups for engines makes sense as well.

To change the variables on the alarms and pages for fuel, what would be the right way to do that? Is there a manual page I could be pointed?

I really do appreciate your work here, a glass KSP cockpit is awesome!

Link to comment
Share on other sites

To change the variables on the alarms and pages for fuel, what would be the right way to do that? Is there a manual page I could be pointed?

The indicator panel is defined in JSI/RasterPropMonitor/IndicatorPanelReplacement/prop.cfg -- it's commented, but for information on what do the options actually mean, you want to see the section of the manual pertaining to JSIVariableAnimator. (page 22 of the PDF) You probably won't want to change more than the name of the variable to refer to a different resource for your purposes.

The page definitions are all text files in JSI/RasterPropMonitor/Example/ExampleMFD, and the syntax is detailed in a separate section of the manual (page 10 of the PDF). There's a lot more things you can make it print than the example prop prints because I spend most of my KSP-related time programming new things for it to print. :) You probably want a real text editor to edit those -- I recommend Notepad++

Be careful of the wiki as it runs ahead of the release version. I hope there will be a 0.13 in a few days though...

Link to comment
Share on other sites

First, a minor bug. Not sure if you noticed it yet, but your internal indicator prop config uses FUEL_PERCENT.

EDIT: I have to get into bed but I need to get this off my brain before I do, I just realized there may be a bug in how STAGE and STAGEPERCENT return their values. I think you are just getting whatever KSP returns, and I'd have to do more testing, but it seems like it is returning the rocket total - stage versus the stage max. I didn't think about this before but while playing with STAGE ONLY in the resources panel, I noticed there was very little difference between stage and total just before it burned out. I went to go check my files to make sure I was using the right variables, but if I had thought about that, it would also explain why the stage value never goes below what's left of the total. I'm really not sure what, if anything, you can do about this but I wanted to let you know. At worst you can cite it as a known case.

If that is the case though, you might need to take the return and hack it off the total to get the actual amount.

Edited by Hyomoto
Link to comment
Share on other sites

I think you are just getting whatever KSP returns, and I'd have to do more testing, but it seems like it is returning the rocket total - stage versus the stage max.

I am pretty sure I fixed that bug a few commits ago -- STAGE variables actually returned maximums instead of the stage data they were calculating. Right now, it should be returning exactly what you see when you toggle the 'stage only' checkbox.

Link to comment
Share on other sites

Is there a guide anywhere to what button do what? I am loving this mod but can't make anything cool show up -_-

Not at the moment, no -- because, well, they change often, and third party implementations all have their own button layouts.

Link to comment
Share on other sites

OMG. This. And. B9.

Funny you should say that. Even when I remove the B9 prop placement entirely, I'm not getting results I particularly like. :)

cSQYn7l.png

They have too much detail baked straight into the internal model for this to be very effective. I'll release new patches for B9 with the next version, but really good results can't happen without bac9 actually designing internals with RPM in mind.

Link to comment
Share on other sites

Funny you should say that. Even when I remove the B9 prop placement entirely, I'm not getting results I particularly like. :)

They have too much detail baked straight into the internal model for this to be very effective. I'll release new patches for B9 with the next version, but really good results can't happen without bac9 actually designing internals with RPM in mind.

Man, thank you. I am imagining coming home from orbit in my B9 shuttle IVA only. Ugh. Russians simply make the best mods out there!

EDIT: I have a bug to report. On on the B9 S2, Mk.2, and M27 cockpits, simply being in IVA for more that 3 seconds results in the following error:

[Exception]: MissingFieldException: Field '.FlightGlobals.Ship_srfSpeed' not found

I just started coding recently, so go easy on me, but I think there is a misplaced "." at the beginning of the phrase FlightGlobals maybe it shouldn't be there? The screens freeze and are unusable. This plugin may be incompatible with firespitter as well. As soon as the firespitter console initializes and tries to display the first screen, all IVA screens freeze and I get the aforementioned error. Take care.

Edited by SkyHook
Link to comment
Share on other sites

Ok, fair enough. Do you knew which one makes the Navball show up though? Can't find it.

Button "A" in the example package and on ALCOR. For "Attitude."

I just started coding recently, so go easy on me, but I think there is a misplaced "." at the beginning of the phrase FlightGlobals maybe it shouldn't be there? The screens freeze and are unusable. This plugin may be incompatible with firespitter as well. As soon as the firespitter console initializes and tries to display the first screen, all IVA screens freeze and I get the aforementioned error. Take care.

I am pretty sure this problem is not mine because RPM has not been asking for those fields since 0.11b, I did catch that early. :) I also can't reproduce the supposed conflict with Firespitter, (I did just try today, that was the reason I decided to make full-reprop patches for B9 in the first place) but I'm using the latest Firespitter plugin when testing. Try updating it?

Regardless, the 0.13 release will contain different B9 patches which excise Firespitter displays entirely.

Link to comment
Share on other sites

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