Skip to content

Custom Sensor

The Custom Sensor Plugin is a component of the KeepTrack application that provides functionality for creating and managing custom sensors used in space surveillance and tracking.

Features

  • Create custom sensors with user-defined parameters
  • Replace existing sensors with custom configurations
  • Clear all custom sensors
  • Use geolocation to set sensor coordinates (HTTPS only)
  • Integration with other KeepTrack components like SoundManager and SensorManager

User Interface

The plugin adds the following UI elements:

  1. A “Custom Sensor” icon in the bottom menu for quick access
  2. A side menu with detailed sensor configuration options
  3. A “Create” submenu in the right-click context menu for creating sensors at specific locations

Custom Sensor Configuration

Users can configure the following parameters for a custom sensor:

  • Latitude and Longitude
  • Elevation above sea level (in kilometers)
  • Sensor type (Observer, Optical, Phased Array Radar, Mechanical)
  • Telescope option (for simplified configuration)
  • Azimuth range (minimum and maximum)
  • Elevation range (minimum and maximum)
  • Range (minimum and maximum in kilometers)

Usage

Creating a Custom Sensor

  1. Click the “Custom Sensor” icon in the bottom menu
  2. Fill in the sensor parameters in the side menu
  3. Click “Add Custom Sensor” to create the sensor

Replacing an Existing Sensor

  1. Select an existing sensor using the Sensor List Plugin
  2. Open the Custom Sensor menu
  3. Modify the sensor parameters as needed
  4. Click “Replace Sensor” to update the existing sensor

Creating a Sensor at a Specific Location

  1. Right-click on the desired location on the globe
  2. Select “Create” from the context menu
  3. Choose “Create Observer Here” or “Create Sensor Here”
  4. The Custom Sensor menu will open with pre-filled coordinates
  5. Adjust other parameters as needed and submit

Integration with KeepTrack

The Custom Sensor Plugin integrates with several KeepTrack components:

  • SoundManager: Plays sound effects for user interactions
  • SensorManager: Manages the current sensor selection and sensor data
  • ColorSchemeManager: Updates the color scheme based on sensor type
  • UiManager: Handles UI updates and notifications
  • CatalogManager: Communicates with the satellite cruncher for calculations

Code Configuration

The plugin supports the following configuration options:

  • bottomIconCallback: Function called when the bottom icon is clicked
  • dragOptions: Configures the draggability of the side menu
  • isRmbOnEarth, isRmbOffEarth, isRmbOnSat: Control when the right-click menu is available
  • rmbMenuOrder: Sets the order of the plugin’s entry in the right-click menu

Development

When extending or modifying the Custom Sensor Plugin, consider the following:

  • The plugin follows the KeepTrackPlugin architecture
  • It registers various event handlers for user interactions and application events
  • Sensor data is processed and added to the SensorManager
  • The UI is generated dynamically based on user input and sensor type

Troubleshooting

  • If the geolocation button is not visible, ensure you’re using HTTPS
  • Check the browser console for any error messages
  • Verify that the required KeepTrack components (SensorManager, ColorSchemeManager, etc.) are properly initialized

Security Note

The plugin includes basic input sanitization for the sensor type to prevent XSS attacks. When extending the plugin, ensure proper input validation and sanitization for all user inputs.