Mihara / RasterPropMonitor

Plugin for Kerbal Space Program. This repository is out of date and is primarily of historic interest. See https://github.com/JonnyOThan/RasterPropMonitor
http://forum.kerbalspaceprogram.com/threads/57603
Other
116 stars 67 forks source link

Request. Landing gear state #562

Closed Alexustas closed 8 years ago

Alexustas commented 8 years ago

I also added JSIInternalRPMButtons SolarPanelsState. Returns deployable solar panel state:

this is a very cool feature. Can you make the same variable for the landing gear/wheels??

DeputyLOL commented 8 years ago

Yes please!!!

MOARdV commented 8 years ago

No,

I am joking. I think the answer is "maybe". I am studying the modules now, and I will need to do some tests.

MOARdV commented 8 years ago

I can provide a variable same as the solar panels (retracting, extending, retracted, extended, broken) and I can provide a variable reporting gear position (0 = retracted, 1 = extended, in between is movement).

MOARdV commented 8 years ago

JSIInternalRPMButtons LandingGearState, same as solar panels state (-1 = none, 0 = retracted, 1 = deployed, 2 = deploying, 3 = retracting, 4 = inoperable / broken). LandingGearPosition returns 0 when gear are retracted, 1 when extended, otherwise a number between those indicating gear position.

On DropBox.

Alexustas commented 8 years ago

JSIInternalRPMButtons LandingGearState,

this variable does not track the rover wheels?

MOARdV commented 8 years ago

this variable does not track the rover wheels?

It tracks wheels with ModuleWheelDeployment.

Alexustas commented 8 years ago

I was hoping to use this variable also to keep track of damage rovers wheels

MOARdV commented 8 years ago

I was hoping to use this variable also to keep track of damage rovers wheels

Needs to be a different variable. ModuleWheelDamage tracks damage (and if it is repairable). I can add variables for it, also.

Alexustas commented 8 years ago

I can add variables for it, also.

I will be very grateful to you ))

MOARdV commented 8 years ago

Untested DropBox

JSIInternalRPMButtons GetWheelsDamaged - returns true if any wheel is damaged. GetWheelsRepairable - returns true if any wheel is repairable. GetWheelStress - returns largest "stress percent" of the wheels. That is the name of the variable in the ModuleWheelDamage - I do not know if it is 0 - 1, or 0 - 100.

Alexustas commented 8 years ago

PLUGIN_JSIInternalRPMButtons:LandingGearState always gives "-1" PLUGIN_JSIInternalRPMButtons:GetWheelsRepairable always show "1" regardless of whether all the wheels intact or all broken PLUGIN_JSIInternalRPMButtons:GetWheelStress works normal

MOARdV commented 8 years ago

What landing gear / wheels? I tested with one of the aircraft gear (Aeris 3A stock aircraft) and I got correct numbers for LandingGearState. If the wheels can not retract, then LandingGearState returns -1 - it only works with landing gear that can be extended / retracted.

GetWheelsRepairable means "can someone fix the wheels?", not "are wheels broken?". If it returns 1, then a Kerbal is allowed to repair the wheel if the wheel is broken.

What does GetWheelStress return? is it 0-1 or 0-100?

Alexustas commented 8 years ago

What landing gear / wheels?

this is my test "rover"

2016-06-16 04-49-47-435

If it returns 1, then a Kerbal is allowed to repair...

ok

What does GetWheelStress return? is it 0-1 or 0-100?

in my case it return about 10...14, so "1-100"

MOARdV commented 8 years ago

Okay. LandingGearState is always -1, because wheels can not retract. Only GetWheelsDamaged is going to work for rover wheels.

Alexustas commented 8 years ago

PLUGIN_JSIInternalRPMButtons:LandingGearState always gives "-1"

Oh, I made a mistake in that post, SORRY (. I actually used the variable "PLUGIN_JSIInternalRPMButtons: GetWheelsDamage" and it always returns "-1"

Alexustas commented 8 years ago

that's broken wheel at the rover

screenshot201

that's what the display shows (Wheel dam: -1 )

screenshot199

Wheel dam:{0} $&$ PLUGIN_JSIInternalRPMButtons:GetWheelsDamage
Wheel repair:{0} $&$ PLUGIN_JSIInternalRPMButtons:GetWheelsRepairable
Wheel stress:{0} $&$ PLUGIN_JSIInternalRPMButtons:GetWheelStress
MOARdV commented 8 years ago

I wonder if the wheel damage in that module is inaccurate. I will have to try some more tests.

MOARdV commented 8 years ago

Oh! try GetWheelsDamaged, not GetWheelsDamage?

Alexustas commented 8 years ago

Oh! you're right. stupid mistake, I'm sorry. everything works fine now

DeputyLOL commented 8 years ago

Could we add the ability to set/get brake force?

MOARdV commented 8 years ago

Added JSIInternalRPMButtons GetWheelBrakes and SetWheelBrakes. Get method returns a number from 0 - 200 that is the averaged setting of the brake tweakable on enabled wheels. Set method takes a number from 0 - 200 and applies it to all enabled wheel brakes.

DeputyLOL commented 8 years ago

Thank you!