PROP
{
   name = WOS_SASMode
	MODEL
	{
		model = WernhersOldStuff/Props/VintageDials/SASMode
	}
	MODULE
	{
		name = JSIVariableAnimator
		refreshRate = 5
		
		VARIABLESET
		{
			scale = 0,5
			variableName = SELECT_SAS_LEVER
			controlledTransform = SliderKnob
			localRotationStart = 0,-50,0
			localRotationEnd  = 0,50,0
			maxRateChange = 0.8
		}
	}
	MODULE
	{
		name = JSIActionGroupSwitch
		switchTransform = StabilityCOL
		actionName = plugin
		switchSound = 
		PLUGINACTION
		{
			name = JSIInternalRPMButtons
			actionMethod = ButtonSASModeStabilityAssist
			stateMethod = ButtonSASModeStabilityAssistState
		}
	}
		
	
	
	MODULE
	{
		name = JSIActionGroupSwitch
		switchTransform = ProgradeCOL
		actionName = plugin
		switchSound = 
		PLUGINACTION
		{
			name = JSIInternalRPMButtons
			actionMethod = ButtonSASModePrograde
			stateMethod = ButtonSASModeProgradeState
		}
		
	}
	MODULE
	{
		name = JSIActionGroupSwitch
		switchTransform = RetrogradeCOL
		actionName = plugin
		switchSound = 
		PLUGINACTION
		{
			name = JSIInternalRPMButtons
			actionMethod = ButtonSASModeRetrograde
			stateMethod = ButtonSASModeRetrogradeState
		}
	}
	MODULE
	{
		name = JSIActionGroupSwitch
		switchTransform = InCOL
		switchSound = 
		actionName = plugin
		PLUGINACTION
		{
			name =  JSIInternalRPMButtons
			actionMethod = ButtonSASModeRadialOut
			stateMethod = ButtonSASModeRadialOutState
		}
	}
	MODULE
	{
		name = JSIActionGroupSwitch
		switchTransform = OutCOL
		actionName = plugin
		switchSound = 
		PLUGINACTION
		{
			name = JSIInternalRPMButtons
			actionMethod = ButtonSASModeRadialIn
			stateMethod = ButtonSASModeRadialInState
		}
	}
	MODULE
	{
		name = JSIActionGroupSwitch
		switchTransform = TargetCOL
		actionName = plugin
		switchSound = 
		PLUGINACTION
		{
			name = JSIInternalRPMButtons
			actionMethod = ButtonSASModeTarget
			stateMethod = ButtonSASModeTargetState
		}
	}
	
}


//SASMODESTABILITY: Returns 1 if SAS is currently configured for stability assist, 0 otherwise.
//SASMODEPROGRADE: Returns 1 if SAS is holding prograde, -1 if SAS is holding retrograde, or 0 otherwise.

//SASMODERADIAL: Returns 1 if SAS is pointing towards orbital radial +, -1 if SAS is pointing radial -, or 0 otherwise.
//SASMODETARGET: Returns 1 if SAS is pointing towards the target, -1 if SAS is pointing away from the target, or 0 otherwise.

RPM_SELECT_VARIABLE
{
	name = SAS_LEVER
	defaultValue = 0
	// prograde and retrograde
	VARIABLE_DEFINITION
	{
		name = SASMODEPROGRADE
		range = 0.5,1.5
		value =  1.0
	}
	VARIABLE_DEFINITION
	{
		name = SASMODEPROGRADE
		range = -1.5,-0.5
		value =  2.0
	}

// stability assist mode
	VARIABLE_DEFINITION
	{
		name = SASMODESTABILITY
		range = 0.5,1.5
		value =  0.0
	}

	
// radial out and in
	VARIABLE_DEFINITION
	{
		name = SASMODERADIAL
		range = 0.5,1.5
		value =  4.0
	}
	VARIABLE_DEFINITION
	{
		name = SASMODERADIAL
		range = -1.5,-0.5
		value =  3.0
	}
	VARIABLE_DEFINITION
	{
		name = SASMODETARGET
		range = 0.5,1.5
		value =  5.0
	}
}


PROP
{
   name = WOS_switch_SAS
	MODEL
	{
		model = WernhersOldStuff/Props/VintageDials/1WaySwitch
	}
   MODULE
   {
      name = JSIActionGroupSwitch
      animationName = Flick1
      switchTransform = Cube
      actionName = sas
   }
 
}


 
 

RPM_MATH_VARIABLE
{
	name = WOS_TARGETABLE_TYPE
	operator = MAX
	sourceVariable = TARGETISVESSELORPORT 
	sourceVariable = TARGETISPOSITION 
}
RPM_MATH_SIGNAL
{
	name = WOS_TARGETSIGNAL
	operator = POWER
	sourceVariable = TARGETDISTANCE
	sourceVariable = 0.5
}

RPM_SELECT_VARIABLE
{
	name = WOS_INRANGE1
	defaultValue = 0
	VARIABLE_DEFINITION
	{
		name = TARGETDISTANCE
		range = 0, 600000
		value = MATH_WOS_TARGETABLE_TYPE
	}
}
RPM_SELECT_VARIABLE
{
	name = WOS_INRANGE2
	defaultValue = 0
	VARIABLE_DEFINITION
	{
		name = TARGETDISTANCE
		range = 0, 64000
		value = MATH_WOS_TARGETABLE_TYPE
	}
}
RPM_SELECT_VARIABLE
{
	name = WOS_RANGE
	defaultValue = 775
	VARIABLE_DEFINITION
	{
		name = SELECT_WOS_INRANGE1
		range = 0.5,1.5
		value = MATH_WOS_TARGETSIGNAL
	}
}

RPM_SELECT_VARIABLE
{
	name = WOS_TARGETTAN
	defaultValue = 0
	VARIABLE_DEFINITION
	{
		name = SELECT_WOS_INRANGE2
		range = 0.5,1.5
		value = TARGETDISTANCESCALEDX
	}
}


PROP
{
  name = WOS_RadioNav
  
	MODEL
	{
		model = WernhersOldStuff/Props/VintageDials/RadioNav
		
	}
	
		MODULE
		{
			name = JSIVariableAnimator
			refreshRate = 4
            // Angle to target		
			VARIABLESET
			{
				scale = -50,50
				variableName = SELECT_WOS_TARGETTAN
				controlledTransform = RadarNavDirection
				localRotationStart = 0,0,-17
				localRotationEnd = 0,0,17
				longPath = no
			}
		}	
	MODULE
		{
			name = JSIVariableAnimator
			refreshRate = 4
            // square root of Distance to target	
			VARIABLESET
			{
				scale = 0,775
				variableName = SELECT_WOS_RANGE
				controlledTransform = RadarNavDistance
				localRotationStart = 0,0,0
				localRotationEnd = 0,0,-30
				longPath = no
			}
		}	
		
}
PROP
{
  name = WOS_RadioVol
  
	MODEL
	{
		model = WernhersOldStuff/Props/VintageDials/RadioControl
		
	}
}