MechJeb2

MechJeb2

4M Downloads

Configurable (or at least higher) precision levels in displays

tavert opened this issue ยท 7 comments

commented

Why did MJ2 drop to one decimal place on most readouts? Would it take much more space to add another couple digits? If most users are fine with low-precision information, could the number of digits be made a configuration option? Either globally for all info, or (perhaps too messy) per display.

commented

Sorry for no response for a long time, but perhaps @tavert or someone else could say which info items could use more precision? I think it would be a little messy to make the precision configurable, but it's easy for us to increase the default displayed precision on certain items.

commented

I'd like another digit or two on Apoapsis, Periapsis, SMA, Inclination, and Time To Apoapsis / Periapsis. The Intake Air quantities (in kg/s) are showing way more digits than they need to, those can be reduced to maybe 5 digits.

Is there one place in the code where levels of precision are determined based on units or some other criteria?

commented

There's no one place in the code where precision is set for everything, which is why it's a bit messy to make it configurable. A lot of things end up using the default value of 4 significant figures used by MuUtils.ToSI, but not everything does. I'll see about upping the precision on the ones you mentioned.

commented

Thanks, I see MuUtils.ToSI now. I'd be most of the way happy if I could change that default sigFigs = 4 to maybe 5 or 6 (though that would be easy to do just building from source myself).

For the times, would that be in GuiUtils.TimeToDHMS? Could that be changed for the last i in the for loop to add one or two decimal places in the seconds?

For inclination, looks like it should just be changing F1 to F2 on line 87 of VesselState.cs and line 79 of MechJebModuleInfoItems.cs

commented

Yes, you've found the right places in the code. a1a0604 increases the precision for everything you mentioned except the times, because I haven't yet changed GuiUtils.TimeToDHMS in the manner you suggested.

commented

860b612 adds 1 decimal place of precision to time to Ap/Pe when those times are < 60s. You can grab the resulting MechJeb2.dll here if you don't feel like compiling your own: http://jenkins.mumech.com/job/MechJeb2/lastBuild/

commented

Awesome, thank you much! Happy user is happy.

Edit: Go ahead and close this issue at next release. Future precision requests can be added here to re-open if anybody who reads this comment has one.