]> git.example.dev Git - research-obsidian.git/commitdiff
updated: making the code a bit better
author2weiEmu <zweiemu@gmail.com>
Thu, 5 Feb 2026 14:18:59 +0000 (15:18 +0100)
committer2weiEmu <zweiemu@gmail.com>
Thu, 5 Feb 2026 14:18:59 +0000 (15:18 +0100)
.obsidian/workspace.json
Nebulous Command/Notes on Mechanics.md
Nebulous Command/calc.py
Nebulous Command/data.py [new file with mode: 0644]
Nebulous Command/missile-simulator.py

index a6b2aaf3c23ff7ea010bab57db0da3cd83ada534..db2cc5fd3dd57c1b97428c1ea29d2d7dd89d3fc0 100644 (file)
   },
   "active": "04094233c3d02ad2",
   "lastOpenFiles": [
-    "List of things to do.md",
-    "Nebulous Command/calc.py~",
     "Nebulous Command/missile-simulator.py~",
+    "Nebulous Command/calc.py~",
+    "Nebulous Command/data.py~",
     "Nebulous Command/4913",
+    "Nebulous Command/data.py",
+    "List of things to do.md",
     "Nebulous Command/calc.py",
     "Nebulous Command/Notes on Mechanics.md~",
     "Nebulous Command/Notes on Mechanics.md",
     "Nebulous Command/Notes on Nebulous Command.md",
     "Nebulous Command/ANS/My Fleets",
     "Nebulous Command/ANS",
-    "Untitled",
     "Some cool music perhaps?.md",
     "System Overview and Links.md",
     "Thoughts on Politics and Researching, and finding out things that you think are right.md",
index 7daa4409a212f9bbed33db07510efeb601acfd55..8d3b836bb04659fe597d1b96b8f90119e2904e54 100644 (file)
@@ -6,6 +6,7 @@ things that I still have to simulate:
 - missiles separate
 - new ui with where detected in the combination and where not
 - better error handling
+- better manipulations of settings for everything, perhaps tkinter more?
 
 
 Why does this document exist? Basically I just wanna explore what is the best way to build a solid _combat_ fleet in Nebulous. I.e. capable of winning fair 3000 point on 3000 point 1v1s, and perhapsperforming supporting roles in a match.
index b515d8f496edc19fec92c7c66d65efc99534f70a..bcd79bcd48f96601e4d6e4bac463e143f9103c08 100644 (file)
@@ -1,4 +1,5 @@
 from dataclasses import dataclass
+from data import Jammer, Ship, jammers, ships, Radar, radars
 import math
 # Data / Data-Sheets basically
 # --- ships ---
@@ -6,81 +7,6 @@ import math
 padding = 16
 
 
-@dataclass
-class Jammer:
-    name: str
-    range_km: float
-    radiated_power_kw: int
-    gain_db: int
-
-
-jammers = [
-    Jammer("No Jammer", 0, 0, 0),
-    Jammer("Self Screening Jammer", 2.5, 5, 2),
-    Jammer("Boosted Self Screening Jammer", 5, 5, 4)
-]
-
-
-@dataclass
-class Ship:
-    name: str
-    rcs_m2: float
-
-
-ships = [
-    Ship("Sprinter", 2601),
-    Ship("Raines", 3783),
-    Ship("Keystone", 6281),
-    Ship("Vauxhall", 11727),
-    Ship("Axford", 14332),
-    Ship("Solomon", 27876),
-    Ship("Ferryman", 2601),
-    Ship("Draugr", 4685),
-    Ship("Flathead", 9869),
-    Ship("Ocello", 15745),
-    Ship("Marauder", 15745),
-    Ship("Moorline", 15745),
-    Ship("SGM-100 Balestra", 156),
-    Ship("SGM-200 Tempest", 625),
-    Ship("SGT-300 Pilum", 900),
-    Ship("SGM-H-200 Cyclone", 625),
-    Ship("SGM-H-300 Atlatl", 1600),
-    Ship("CM300 Container", 1600),
-    Ship("Side / SGM-100 Balestra", 400),
-    Ship("Side / SGM-200 Tempest", 950),
-    Ship("Side / SGT-300 Pilum", 2400),
-    Ship("Side / SGM-H-200 Cyclone", 950),
-    Ship("Side / SGM-H-300 Atlatl", 3600),
-    Ship("Side / CM300 Container", 4000),
-]
-
-
-@dataclass
-class Radar:
-    name: str
-    radiated_power_kw: int
-    gain_db: int
-    aperture_size_m2: int
-    sensitivity_dBm: float
-    noise_filtering_dB: int
-    burnthrough_multiplier: int
-    max_range_km: float
-
-
-# for Return Power Density Calculations
-radars = [
-    Radar("RF101", 1500, 80, 20, 0, 0, 0, 9),
-    Radar("RM50", 4100, 50, 30, -38.5, 0, 12, 9.5),
-    Radar("RS35", 3500, 40, 25, -36, 0, 8, 8),
-    Radar("RS41", 4500, 60, 40, -38.5, 0, 0, 11.5),
-    Radar("R400", 5000, 70, 100, -38, 0, 0, 14),
-    Radar("R550", 3500, 50, 250, -36, 0, 0, 18),
-    Radar("RF44", 1500, 60, 40, 0, 0, 0, 6.5),
-    Radar("Bulwark Huntress", 4000, 40, 60, -38, 0, 4, 10),
-    Radar("Ithaca", 3100, 40, 60, -34, 0, 4, 8.5),
-]
-
-
 def select_ship() -> Ship:
     print("Select the index of the ship you want")
     for i, ship in enumerate(ships):
diff --git a/Nebulous Command/data.py b/Nebulous Command/data.py
new file mode 100644 (file)
index 0000000..4885bb6
--- /dev/null
@@ -0,0 +1,82 @@
+from dataclasses import dataclass
+
+
+@dataclass
+class Jammer:
+    name: str
+    range_km: float
+    radiated_power_kw: int
+    gain_db: int
+
+
+jammers = [
+    Jammer("No Jammer", 0, 0, 0),
+    Jammer("Self Screening Jammer", 2.5, 5, 2),
+    Jammer("Boosted Self Screening Jammer", 5, 5, 4)
+]
+
+
+@dataclass
+class Ship:
+    name: str
+    rcs_m2: float
+
+
+@dataclass
+class Missile(Ship):
+    side_rcs_m2: float
+
+
+
+ships = [
+    Ship("Sprinter", 2601),
+    Ship("Raines", 3783),
+    Ship("Keystone", 6281),
+    Ship("Vauxhall", 11727),
+    Ship("Axford", 14332),
+    Ship("Solomon", 27876),
+    Ship("Ferryman", 2601),
+    Ship("Draugr", 4685),
+    Ship("Flathead", 9869),
+    Ship("Ocello", 15745),
+    Ship("Marauder", 15745),
+    Ship("Moorline", 15745),
+    Ship("SGM-100 Balestra", 156),
+    Ship("SGM-200 Tempest", 625),
+    Ship("SGT-300 Pilum", 900),
+    Ship("SGM-H-200 Cyclone", 625),
+    Ship("SGM-H-300 Atlatl", 1600),
+    Ship("CM300 Container", 1600),
+    Ship("Side / SGM-100 Balestra", 400),
+    Ship("Side / SGM-200 Tempest", 950),
+    Ship("Side / SGT-300 Pilum", 2400),
+    Ship("Side / SGM-H-200 Cyclone", 950),
+    Ship("Side / SGM-H-300 Atlatl", 3600),
+    Ship("Side / CM300 Container", 4000),
+]
+
+
+@dataclass
+class Radar:
+    name: str
+    radiated_power_kw: int
+    gain_db: int
+    aperture_size_m2: int
+    sensitivity_dBm: float
+    noise_filtering_dB: int
+    burnthrough_multiplier: int
+    max_range_km: float
+
+
+# for Return Power Density Calculations
+radars = [
+    Radar("RF101", 1500, 80, 20, 0, 0, 0, 9),
+    Radar("RM50", 4100, 50, 30, -38.5, 0, 12, 9.5),
+    Radar("RS35", 3500, 40, 25, -36, 0, 8, 8),
+    Radar("RS41", 4500, 60, 40, -38.5, 0, 0, 11.5),
+    Radar("R400", 5000, 70, 100, -38, 0, 0, 14),
+    Radar("R550", 3500, 50, 250, -36, 0, 0, 18),
+    Radar("RF44", 1500, 60, 40, 0, 0, 0, 6.5),
+    Radar("Bulwark Huntress", 4000, 40, 60, -38, 0, 4, 10),
+    Radar("Ithaca", 3100, 40, 60, -34, 0, 4, 8.5),
+]
index c51451881a93980481ec14ad1fc9da3e62b89d18..4f15a7f75c6d1137a801fbdd9ef5d0b8af6dd949 100644 (file)
@@ -1,4 +1,5 @@
 from calc import ships, jammers, radars, select_ship, select_jammer, select_radar
+from data import Jammer, Ship, jammers, ships, Radar, radars
 import cv2 as cv
 import numpy as np
 import math