Add Total Liftable Weight Output
This commit is contained in:
parent
f180f7b826
commit
0268359eef
2 changed files with 8 additions and 5 deletions
|
@ -127,6 +127,10 @@ export const localization = new Map([
|
||||||
["en-GB", "Liftable Weight"],
|
["en-GB", "Liftable Weight"],
|
||||||
["de-DE", "Liftkapazität"]
|
["de-DE", "Liftkapazität"]
|
||||||
])],
|
])],
|
||||||
|
["liftableCargoWeight", new Map([
|
||||||
|
["en-GB", "Liftable Cargo Weight"],
|
||||||
|
["de-DE", "Fracht Liftkapazität"]
|
||||||
|
])],
|
||||||
["thrust", new Map([
|
["thrust", new Map([
|
||||||
["en-GB", "Thrust"],
|
["en-GB", "Thrust"],
|
||||||
["de-DE", "Schub"]
|
["de-DE", "Schub"]
|
||||||
|
|
|
@ -86,11 +86,9 @@
|
||||||
return volume;
|
return volume;
|
||||||
})
|
})
|
||||||
|
|
||||||
let maxWeight = $derived.by(() => {
|
let maxWeight = derived.by(totalThrust / (gravity * 9.81))
|
||||||
let weight = totalThrust / (gravity * 9.81);
|
|
||||||
weight -= totalVolume * weightPerVolume;
|
let maxCargoWeight = $derived.by(maxWeight -= totalVolume * weightPerVolume)
|
||||||
return weight;
|
|
||||||
})
|
|
||||||
|
|
||||||
function weightConversion(weight: number): string {
|
function weightConversion(weight: number): string {
|
||||||
if (weight > 1000) {
|
if (weight > 1000) {
|
||||||
|
@ -217,6 +215,7 @@
|
||||||
{/each}
|
{/each}
|
||||||
</div>
|
</div>
|
||||||
<Separator />
|
<Separator />
|
||||||
|
<p>{localized("liftableCargoWeight")}: {weightConversion(maxCargoWeight)}</p>
|
||||||
<p>{localized("liftableWeight")}: {weightConversion(maxWeight)}</p>
|
<p>{localized("liftableWeight")}: {weightConversion(maxWeight)}</p>
|
||||||
</Card.Content>
|
</Card.Content>
|
||||||
</Card.Root>
|
</Card.Root>
|
||||||
|
|
Loading…
Reference in a new issue