Skip to main content
. 2023 May 26;23(11):5097. doi: 10.3390/s23115097
Algorithm 3: Pseudocode for parking by truck–trailer robot
  1. If ((TL & TF = dmin) @ (SLF_90 ≥ dmin_ϑ90 0) && (SLL_(135) ≥ dmin_ϑ45 0))

  2. forward

  3. else

  4. return

  5. end

  6. Case (forward)

  7. Park_pr: (SLF ≥ dmin)? Park_db: Park_db1

  8. Park_db: (SLF_45 ≥ dmin_ϑ45 0) && (SLL_(135) ≥ dmin_ϑ45 0)? Park_db1: Park_sb

  9. Park_sb: Case (Park_Move)

  10. Park_1: TL Angle_move & TF mimic @ (ϑ15 0,30,0,30 0,15 0)

  11. Park_2: TL& TF Move back @ behavioral control.

  12. Park_3: ((SLL_135 = dmin_ϑ15 0) && (SLR_(0) ≥ dmin_ϑ90 0))? Stop: Par

  13. Park_4: TL forward & back with dmin and leave parking point.

  14. end case

  15. Case (Park_db1)

  16. Park_11: (SLF ≥ dmin)? Park_1: Park12

  17. Park_12: TL Angle_move & TF mimic @ (ϑ45 0)

  18. Park_13: TL = dmin @forward, TF mimic

  19. Park_14: TL Angle_move & TF mimic @ (ϑ45 0), Parking_move

  20. end case

  21. end case

  22. Case (return)

  23. Park_r1: TL forward & back with dmin and TF starts mimic.

  24. Park_r2: TL & TF Move forward @ behavioral control.

  25. Park_r3: TL Angle_move & TF mimic @ (ϑ15 0,30,0,30 0,15 0)

  26. Park_r4: TL & TF Move forward @ behavioral control.

  27. end case