SDK Question get gear status

Topper

Addon Developer
Addon Developer
Donator
Joined
Mar 28, 2008
Messages
666
Reaction score
20
Points
33
Hello, is there any workaround to get the gear status of a vessel if it's retracted or not? I havn't seen an api method to get it. I think it's because it's a general "animation" without anything special, but there is also an api method "doubleVESSEL::GetWheelbrakeLevel". For the Deltaglieder, this returns the same value no matter if the gear is retracted or not... I want to retract the gear automaticly which is possible with *VESSEL->SendBufferedKey(OAPI_KEY_G), but I only want to do this if the gear is not allready down.
 

Face

Well-known member
Orbiter Contributor
Addon Developer
Beta Tester
Joined
Mar 18, 2008
Messages
4,398
Reaction score
578
Points
153
Location
Vienna
Hello, is there any workaround to get the gear status of a vessel if it's retracted or not? I havn't seen an api method to get it. I think it's because it's a general "animation" without anything special, but there is also an api method "doubleVESSEL::GetWheelbrakeLevel". For the Deltaglieder, this returns the same value no matter if the gear is retracted or not... I want to retract the gear automaticly which is possible with *VESSEL->SendBufferedKey(OAPI_KEY_G), but I only want to do this if the gear is not allready down.

I know of 2 workarounds:
  1. Hook into RecordEvent and listen for the GEAR tag.
  2. Save the vessel state by means of clbkSaveState() and a temporary file, then parse the file for the GEAR tag.

I used both in OMP, but eventually settled on the second option for some application reasons.
 
Top