ShareShortcuts

Calc LS Weights

Use to calculate the weight distribution in the holds for a 737-800 on Jet2

danhill1987
Fork “Calc LS Weights”

Built something new on top of this Shortcut? Share it as a fork: it becomes a Shortcut of your own, which you manage, and both pages link to each other so danhill1987 gets credit.

  1. 1Get the Shortcut and change it in the Shortcuts app. Give it a name of its own.
  2. 2Share it from the Shortcuts app and copy the iCloud link.
  3. 3Come back here, paste the link and describe what is different, e.g. “Added a step that uses Apple Intelligence to personalise the text.”
Downloads
67K
Saved
0
Actions
52
Category
Utilities
Version
1.1
Language
EN

Use to calculate the weight distribution in the holds for a 737-800 on Jet2

What's New

Version 1.1

Updated Title

Version History
1.1 Jul 25, 2019

Updated Title

1.0 Jul 25, 2019

First release

What it does

52 actions
  1. Ask for Input
    Number of bags?
  2. Add to Variable
  3. Ask for Input
    Total Bag Weight?
  4. Set Variable
    Wght
  5. List
  6. Choose from List
  7. If
  8. Ask for Input
    Pieces in H1?
  9. Set Variable
    H1Pcs
  10. Calculate
  11. Set Variable
    Pcs
  12. Ask for Input
    Weight in H1?
  13. Set Variable
    H1Weight
  14. Calculate
  15. Set Variable
    Wght
  16. If
  17. Number
  18. Set Variable
    H1Weight
  19. List
  20. Choose from List
  21. If
  22. Ask for Input
    Pieces in H4?
  23. Set Variable
    H4Pcs
  24. Calculate
  25. Set Variable
    Pcs
  26. Ask for Input
    Weight in H4?
  27. Set Variable
    H4Weight
  28. Calculate
  29. Set Variable
    Wght
  30. If
  31. Number
  32. Set Variable
    H4Weight
  33. Calculate
  34. Set Variable
    WghtPerPc
  35. Calculate
  36. Round Number
  37. Set Variable
    H2Pcs
  38. Round Number
  39. Set Variable
    H3Pcs
  40. Calculate
  41. Round Number
  42. Set Variable
    H2Wght
  43. Calculate
  44. Round Number
  45. Set Variable
    H3Wght
  46. Calculate
  47. Calculate
  48. Set Variable
    TtlPcs
  49. Calculate
  50. Calculate
  51. Set Variable
    TtlWght
  52. Show Alert

View as code
Beta

Every action of this Shortcut written out as Cherri, a programming language for Shortcuts. Great for learning how it works.

#include 'actions/math'
#define color red
#define glyph airplane

prompt("Number of bags?", "Number")
@Pcs
prompt("Total Bag Weight?", "Number")
@Wght
const List = list("Yes", "No")
const SelectedItem = chooseFromList(List, "Anything in H1?")

if SelectedItem == "Yes" {
	prompt("Pieces in H1?", "Number")
	@H1Pcs
	@Pcs = @Pcs - @H1Pcs
	prompt("Weight in H1?", "Number")
	@H1Weight
	@Wght = @Wght - @H1Weight
} else {
	@H1Weight = 0
}
const List1 = list("Yes", "No")
const SelectedItem1 = chooseFromList(List1, "Anything in H4?")

if SelectedItem1 == "Yes" {
	prompt("Pieces in H4?", "Number")
	@H4Pcs
	@Pcs = @Pcs - @H4Pcs
	prompt("Weight in H4?", "Number")
	@H4Weight
	@Wght = @Wght - @H4Weight
} else {
	@H4Weight = 0
}
@WghtPerPc = @Wght / @Pcs
const CalculationResult = @Pcs / 2
round(CalculationResult)
@H2Pcs
round(CalculationResult)
@H3Pcs
const CalculationResult1 = @WghtPerPc * @H2Pcs
round(CalculationResult1)
@H2Wght
const CalculationResult2 = @WghtPerPc * @H3Pcs
round(CalculationResult2)
@H3Wght
const CalculationResult3 = @Pcs + @H1Pcs
@TtlPcs = CalculationResult3 + @H4Pcs
const CalculationResult4 = @Wght + @H1Weight
@TtlWght = CalculationResult4 + @H4Weight
confirm("\nB{@TtlPcs}/{@TtlWght}\nH1: {@H1Weight}kgs\nH2: {@H2Wght}kgs\nH3: {@H3Wght}kgs\nH4: {@H4Weight}kgs")
Open in Cherri Playground Decompiled with cherri 2.3.0 (GPL-2.0). May need small fixes before it compiles.

Ratings & Reviews

Write a Review
–
out of 5
★★★★★
★★★★
★★★
★★
★
0 ratings

No reviews yet. Be the first to share what you think!

Advertisement

You Might Also Like

See All
Advertisement