Simulation Core
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

71 lines
2.5 KiB

  1. subroutine RTable_OffMode
  2. use RTable_VARIABLES
  3. use CDataDisplayConsoleVariables
  4. use CDrillingConsoleVariables
  5. use CSimulationVariables
  6. use CWarningsVariables
  7. use CSounds
  8. IMPLICIT NONE
  9. !==================================================================
  10. ! Rate limit for off Mode
  11. if (((RTable%N_old-0.0d0)/RTable%time_step)>386.0d0) then
  12. RTable%N_ref = (-386.0d0*RTable%time_step)+RTable%N_old
  13. !else
  14. ! RTable%N_ref=0.0d0
  15. !end if
  16. CALL RTable_INPUTS
  17. CALL RTable_Solver
  18. RTable%N_old = RTable%N_ref
  19. if ( RT_OldTransMode==0 .and. RTTransmissionLever/=0 .and. RTable%w_new/=0.d0 ) then
  20. Call Activate_RotaryGearsAbuse()
  21. RTable%SoundGearCrash = .true.
  22. Call SetSoundRtGearCrash(RTable%SoundGearCrash)
  23. else
  24. RTable%SoundGearCrash = .false.
  25. Call SetSoundRtGearCrash(RTable%SoundGearCrash)
  26. end if
  27. RT_OldTransMode = RTTransmissionLever
  28. !==================================================================
  29. else
  30. RTable%N_ref = 0.
  31. RTable%N_new = 0.
  32. RTable%N_old = 0.
  33. RTable%ia = 0.
  34. RTable%ia_old = 0.
  35. RTable%ia_new = 0.
  36. RTable%x = 0.
  37. RTable%x_old = 0.
  38. RTable%x_new = 0.
  39. RTable%y = 0.
  40. RTable%y_old = 0.
  41. RTable%y_new = 0.
  42. RTable%w = 0.
  43. RTable%w_old = 0.
  44. RTable%w_new = 0.
  45. RTable%Speed = 0.
  46. RT_wOld = 0.
  47. Call Set_RotaryRPMGauge(sngl(1-RTable%RpmGaugeMalf)*real(RTable%Speed,8))
  48. RTable%SoundRPM = INT(RTable%Speed)
  49. Call SetSoundRT( RTable%SoundRPM )
  50. !RotaryRPMGauge=RTable%Speed
  51. !RPM=RotaryRPMGauge
  52. RTable%Output_Current = 0.
  53. RotaryTorqueGauge = ( ((RTable%J_coef+RTable%String_JCoef)*(((RTable%w_new/RTable%Conv_Ratio)-RT_wOld)/RTable%time_step))+(RTable%String_Torque) )*0.73756215 ![N.m]*0.73756215 = [ft.lbf]
  54. RTable%Torque = ( ((RTable%J_coef+RTable%String_JCoef)*(((RTable%w_new/RTable%Conv_Ratio)-RT_wOld)/RTable%time_step))+(RTable%String_Torque) )*0.73756215 ![N.m]*0.73756215 = [ft.lbf]
  55. Call Set_RotaryTorque(sngl(1-RTable%TorqueGaugeMalf)*real(RTable%Torque,8))
  56. !RotaryTorqueGauge=(RTable%String_Torque)/12.
  57. end if
  58. end subroutine RTable_OffMode