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.

RTable_OffMode.f90 2.8 KiB

1 year ago
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  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. Do while (((RTable%N_old-0.0d0)/RTable%time_step)>386.0d0)
  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. if (IsPortable) then
  29. RTable%AssignmentSwitch = 1
  30. else
  31. RTable%AssignmentSwitch = AssignmentSwitch
  32. end if
  33. if ((any(RTable%AssignmentSwitch==(/6,7,12/))) .or. (RTSwitch==0) .or. (IsStopped == .true.)) then
  34. RTBLWR = 0
  35. end if
  36. Call sleepqq (80) !?????????????????
  37. End Do
  38. !==================================================================
  39. RTable%N_ref = 0.
  40. RTable%N_new = 0.
  41. RTable%N_old = 0.
  42. RTable%ia = 0.
  43. RTable%ia_old = 0.
  44. RTable%ia_new = 0.
  45. RTable%x = 0.
  46. RTable%x_old = 0.
  47. RTable%x_new = 0.
  48. RTable%y = 0.
  49. RTable%y_old = 0.
  50. RTable%y_new = 0.
  51. RTable%w = 0.
  52. RTable%w_old = 0.
  53. RTable%w_new = 0.
  54. RTable%Speed = 0.
  55. RT_wOld = 0.
  56. Call Set_RotaryRPMGauge(sngl(1-RTable%RpmGaugeMalf)*real(RTable%Speed,8))
  57. RTable%SoundRPM = INT(RTable%Speed)
  58. Call SetSoundRT( RTable%SoundRPM )
  59. !RotaryRPMGauge=RTable%Speed
  60. !RPM=RotaryRPMGauge
  61. RTable%Output_Current = 0.
  62. 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]
  63. 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]
  64. Call Set_RotaryTorque(sngl(1-RTable%TorqueGaugeMalf)*real(RTable%Torque,8))
  65. !RotaryTorqueGauge=(RTable%String_Torque)/12.
  66. end subroutine RTable_OffMode