keeptrack.space icon indicating copy to clipboard operation
keeptrack.space copied to clipboard

refactor: migrate sensors from TypeScript to JSON data

Open thkruz opened this issue 1 month ago • 2 comments

  • Create sensors.json with all sensor data extracted from sensors.ts
  • Add sensorLoader.ts to load sensors from JSON and instantiate sensor objects
  • Update all imports to use sensorLoader instead of sensors
  • Add conversion script (parse-sensors.mjs) to regenerate JSON from TypeScript
  • Add documentation (README.md) explaining the new architecture

This change enables sensors to be loaded from remote sources in the future without requiring code changes, while maintaining full type safety.

Files modified:

  • src/app/data/catalog-manager.ts
  • src/app/sensors/sensorManager.ts
  • src/plugins/sensor-list/sensor-list.ts
  • src/plugins/sensor/multi-site-look-angles-plugin.ts
  • test/environment/apiMocks.ts

Files added:

  • src/app/data/catalogs/sensors.json (77 sensors)
  • src/app/data/catalogs/sensorLoader.ts
  • src/app/data/catalogs/README.md
  • scripts/parse-sensors.mjs

thkruz avatar Nov 18 '25 01:11 thkruz

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

CLAassistant avatar Nov 18 '25 01:11 CLAassistant

Quality Gate Failed Quality Gate failed

Failed conditions
5 Security Hotspots
C Reliability Rating on New Code (required ≥ A)

See analysis details on SonarQube Cloud

Catch issues before they fail your Quality Gate with our IDE extension SonarQube for IDE

sonarqubecloud[bot] avatar Nov 18 '25 01:11 sonarqubecloud[bot]