Skip to content

Commit

Permalink
update: Mon 02 Dec 2024 02:46:11 PM CET
Browse files Browse the repository at this point in the history
  • Loading branch information
cophilot committed Dec 2, 2024
1 parent 3195d00 commit 52be0a5
Show file tree
Hide file tree
Showing 12 changed files with 56 additions and 43 deletions.
6 changes: 4 additions & 2 deletions .templates/Engine/$$name.u$$.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
import Engine from '../../types/Engine';
import { EngineCycleUtils } from '../../types/EngineCycle';
import EngineCycle from '../../types/EngineCycle';
import type EngineStats from '../../types/EngineStats';
import { PropellantUtils } from '../../types/Propellant';
import { Weight } from '../../types/units/Weight';
import { ISP } from '../../types/units/ISP';
import { Size } from '../../types/units/Size';
import Country from '../../types/state/Country';
import Status from '../../types/state/Status';

/**
* The $$name$$ rocket engine.
Expand All @@ -18,8 +19,9 @@ const $$name.u$$: EngineStats = {
imageUrl: '',
schemanticUrl: '',
country: Country.USA,
status: Status.IN_USE,
propellant: PropellantUtils.HYDRO_LOX,
cycle: EngineCycleUtils.GAS_GENERATOR,
cycle: EngineCycle.GAS_GENERATOR,
specificImpulseSeaLevel: new ISP(0),
specificImpulseVacuum: new ISP(0),
height: new Size(0),
Expand Down
3 changes: 2 additions & 1 deletion src/components/UnitView.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,8 @@
padding: 10px 5px;
}
.null-placeholder {
min-width: calc(40vw - 20px);
padding-right: 20px;
min-width: calc(40vw - 30px);
}
.name {
Expand Down
6 changes: 4 additions & 2 deletions src/data/engines/F1.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
import Engine from '../../types/Engine';
import { EngineCycleUtils } from '../../types/EngineCycle';
import type EngineStats from '../../types/EngineStats';
import { PropellantUtils } from '../../types/Propellant';
import { Weight } from '../../types/units/Weight';
import { ISP } from '../../types/units/ISP';
import { Size } from '../../types/units/Size';
import Country from '../../types/state/Country';
import Status from '../../types/state/Status';
import EngineCycle from '../../types/state/EngineCycle';

/**
* @author cophilot
Expand All @@ -17,8 +18,9 @@ const F1: EngineStats = {
schemanticUrl:
'https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcRpGWtZ0VQRF-kGHelKxkPTCslk51UObDWOqQ&s',
country: Country.USA,
status: Status.RETIRED,
propellant: PropellantUtils.KERO_LOX,
cycle: EngineCycleUtils.GAS_GENERATOR,
cycle: EngineCycle.GAS_GENERATOR,
specificImpulseSeaLevel: new ISP(263),
specificImpulseVacuum: new ISP(304),
height: new Size(5.6),
Expand Down
7 changes: 4 additions & 3 deletions src/data/engines/RL10.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
import Engine from '../../types/Engine';
import { EngineCycleUtils } from '../../types/EngineCycle';
import type EngineStats from '../../types/EngineStats';
import { PropellantUtils } from '../../types/Propellant';
import { Weight } from '../../types/units/Weight';
import { ISP } from '../../types/units/ISP';
import { Size } from '../../types/units/Size';
import Country from '../../types/state/Country';
import Status from '../../types/state/Status';
import EngineCycle from '../../types/state/EngineCycle';

/**
* @author cophilot
Expand All @@ -17,9 +18,9 @@ const RL10: EngineStats = {
'https://upload.wikimedia.org/wikipedia/commons/8/8a/Common_Extensible_Cryogenic_Engine.jpg',
schemanticUrl: 'https://farm9.staticflickr.com/8345/8201255231_4dac24eb93_z.jpg',
country: Country.USA,

status: Status.IN_USE,
propellant: PropellantUtils.HYDRO_LOX,
cycle: EngineCycleUtils.EXPANDER,
cycle: EngineCycle.EXPANDER,
specificImpulseSeaLevel: null,
specificImpulseVacuum: new ISP(465.5),
height: new Size(4.15),
Expand Down
7 changes: 4 additions & 3 deletions src/data/engines/RS25.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
import Engine from '../../types/Engine';
import { EngineCycleUtils } from '../../types/EngineCycle';
import EngineCycle from '../../types/state/EngineCycle';
import type EngineStats from '../../types/EngineStats';
import { PropellantUtils } from '../../types/Propellant';
import Country from '../../types/state/Country';
import Status from '../../types/state/Status';
import { ISP } from '../../types/units/ISP';
import { Size } from '../../types/units/Size';
import { Weight } from '../../types/units/Weight';
Expand All @@ -14,9 +15,9 @@ const RS25: EngineStats = {
'https://upload.wikimedia.org/wikipedia/commons/thumb/b/b1/Shuttle_Main_Engine_Test_Firing.jpg/250px-Shuttle_Main_Engine_Test_Firing.jpg',
schemanticUrl: 'https://pbs.twimg.com/media/CL5DN9sWoAABWyM.jpg',
country: Country.USA,

status: Status.IN_USE,
propellant: PropellantUtils.HYDRO_LOX,
cycle: EngineCycleUtils.STAGED_COMBUSTION,
cycle: EngineCycle.STAGED_COMBUSTION,
specificImpulseSeaLevel: new ISP(366),
specificImpulseVacuum: new ISP(452.3),
height: new Size(4.3),
Expand Down
7 changes: 4 additions & 3 deletions src/data/engines/RS68.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
import Engine from '../../types/Engine';
import { EngineCycleUtils } from '../../types/EngineCycle';
import type EngineStats from '../../types/EngineStats';
import { PropellantUtils } from '../../types/Propellant';
import { Weight } from '../../types/units/Weight';
import { ISP } from '../../types/units/ISP';
import { Size } from '../../types/units/Size';
import Country from '../../types/state/Country';
import Status from '../../types/state/Status';
import EngineCycle from '../../types/state/EngineCycle';

/**
* @author cophilot
Expand All @@ -17,9 +18,9 @@ const RS68: EngineStats = {
schemanticUrl:
'https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcT_p79S1pj-BhX47Munv2R44orq9EbhcPPAUg&s',
country: Country.USA,

status: Status.RETIRED,
propellant: PropellantUtils.HYDRO_LOX,
cycle: EngineCycleUtils.GAS_GENERATOR,
cycle: EngineCycle.GAS_GENERATOR,
specificImpulseSeaLevel: new ISP(410),
specificImpulseVacuum: new ISP(411.9),
height: new Size(5.2),
Expand Down
6 changes: 4 additions & 2 deletions src/data/engines/VINCI.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
import Engine from '../../types/Engine';
import { EngineCycleUtils } from '../../types/EngineCycle';
import type EngineStats from '../../types/EngineStats';
import { PropellantUtils } from '../../types/Propellant';
import { Weight } from '../../types/units/Weight';
import { ISP } from '../../types/units/ISP';
import { Size } from '../../types/units/Size';
import Country from '../../types/state/Country';
import Status from '../../types/state/Status';
import EngineCycle from '../../types/state/EngineCycle';

/**
* @author cophilot
Expand All @@ -18,8 +19,9 @@ const VINCI: EngineStats = {
schemanticUrl:
'https://www.researchgate.net/publication/259896080/figure/fig1/AS:463040966598656@1487408977145/NCI-O-engine-flow-scheme-left-and-mock-up-right-courtesy-of-SAFRAN.png',
country: Country.EUROPE,
status: Status.IN_USE,
propellant: PropellantUtils.HYDRO_LOX,
cycle: EngineCycleUtils.EXPANDER,
cycle: EngineCycle.EXPANDER,
specificImpulseSeaLevel: null,
specificImpulseVacuum: new ISP(457.2),
height: new Size(3.22),
Expand Down
2 changes: 2 additions & 0 deletions src/routes/engine/[name]/+page.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@
</h1>
<img src={engine.stats.imageUrl} alt="" class="engine-img mb" />
<StateView state={engine.stats.country} name="Origin" />
<StateView state={engine.stats.status} name="Status" />
<StateView state={engine.stats.cycle} name="Cycle" />
<UnitView unit={engine.stats.specificImpulseSeaLevel} name="Specific Impulse" />
<UnitView unit={engine.stats.specificImpulseVacuum} name="Specific Impulse (Vac)" />
<UnitView unit={engine.stats.height} name="Height" />
Expand Down
21 changes: 0 additions & 21 deletions src/types/EngineCycle.ts

This file was deleted.

4 changes: 3 additions & 1 deletion src/types/EngineStats.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import type { EngineCycle } from './EngineCycle';
import type EngineCycle from './state/EngineCycle';
import type { Propellant } from './Propellant';
import type Country from './state/Country';
import type Status from './state/Status';
import type { ISP } from './units/ISP';
import type { Size } from './units/Size';
import type { Weight } from './units/Weight';
Expand All @@ -11,6 +12,7 @@ export default interface EngineStats {
imageUrl: string;
schemanticUrl: string;
country: Country;
status: Status;
propellant: Propellant;
cycle: EngineCycle;
specificImpulseSeaLevel: ISP | null;
Expand Down
17 changes: 17 additions & 0 deletions src/types/state/EngineCycle.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
import type GradientColor from '../display/GradientColor';
import State from './State';

const gradient: GradientColor = {
firstColor: '#49ff6b',
secondColor: '#49ff6b',
thirdColor: '#ffde00',
fontColor: '#000000'
};

export default class EngineCycle extends State {
public static readonly GAS_GENERATOR: State = new State('Gas Generator', gradient);

public static readonly STAGED_COMBUSTION: State = new State('Staged Combustion', gradient);

public static readonly EXPANDER: State = new State('Expander', gradient);
}
13 changes: 8 additions & 5 deletions src/types/state/Status.ts
Original file line number Diff line number Diff line change
@@ -1,13 +1,16 @@
import State from './State';

export default class Status {
export default class Status extends State {
public static readonly RETIRED: State = new State('Retired', {
startColor: '#032d61',
endColor: '#b51240'
firstColor: '#620d0e',
secondColor: '#ff2225',
thirdColor: '#ff5557'
});

public static readonly IN_USE: State = new State('In Use', {
startColor: '#ffd800',
endColor: '#cd0000'
firstColor: '#66ffa3',
secondColor: '#00ff65',
thirdColor: '#006226',
fontColor: '#000000'
});
}

0 comments on commit 52be0a5

Please sign in to comment.