diff --git a/src/lib/constants.ts b/src/lib/constants.ts index 5daa671..3d35a9d 100644 --- a/src/lib/constants.ts +++ b/src/lib/constants.ts @@ -127,6 +127,10 @@ export const localization = new Map([ ["en-GB", "Liftable Weight"], ["de-DE", "Liftkapazität"] ])], + ["liftableCargoWeight", new Map([ + ["en-GB", "Liftable Cargo Weight"], + ["de-DE", "Fracht Liftkapazität"] + ])], ["thrust", new Map([ ["en-GB", "Thrust"], ["de-DE", "Schub"] diff --git a/src/routes/+page.svelte b/src/routes/+page.svelte index dac1fa1..c03c4b7 100644 --- a/src/routes/+page.svelte +++ b/src/routes/+page.svelte @@ -86,11 +86,9 @@ return volume; }) - let maxWeight = $derived.by(() => { - let weight = totalThrust / (gravity * 9.81); - weight -= totalVolume * weightPerVolume; - return weight; - }) + let maxWeight = derived.by(totalThrust / (gravity * 9.81)) + + let maxCargoWeight = $derived.by(maxWeight -= totalVolume * weightPerVolume) function weightConversion(weight: number): string { if (weight > 1000) { @@ -217,6 +215,7 @@ {/each} +

{localized("liftableCargoWeight")}: {weightConversion(maxCargoWeight)}

{localized("liftableWeight")}: {weightConversion(maxWeight)}