Calculation as an assignment in a noncondition

Figure 134. A Calculation in a Nonconditional Expression

The example shown in this figure uses a calculation in the RHS of the assignment to derive the total weight carried by an Aircraft on the FlightPlan, where the total weight equals the weight of the fuel plus the weight of all Cargos onboard plus the empty weight of the Aircraft itself. The portion

plan.fuel * 0.812

converts a fuel load measured in liters -- the unit of measure that airlines purchase and load fuel -- into a weight measured in kilograms – unit of measure used for the weight of the cargo as well as the aircraft and crew. Note that this conversion is a bit conservative as Jet A1 fuel expands as it warms up so this figure considers it to be at the cool end of its range. This portion is then added to:

load.weight -> sum

which is equal to the sum of all Cargo weights loaded onto the Aircraft associated with this FlightPlan. The final sum of the fuel, cargo, and Aircraft weights is assigned to the FlightPlan's planWeight. Note the parentheses used here are not required – the calculation will produce the same result without them – they have been added for improved clarity.