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:
- A “Custom Sensor” icon in the bottom menu for quick access
- A side menu with detailed sensor configuration options
- 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
- Click the “Custom Sensor” icon in the bottom menu
- Fill in the sensor parameters in the side menu
- Click “Add Custom Sensor” to create the sensor
Replacing an Existing Sensor
- Select an existing sensor using the Sensor List Plugin
- Open the Custom Sensor menu
- Modify the sensor parameters as needed
- Click “Replace Sensor” to update the existing sensor
Creating a Sensor at a Specific Location
- Right-click on the desired location on the globe
- Select “Create” from the context menu
- Choose “Create Observer Here” or “Create Sensor Here”
- The Custom Sensor menu will open with pre-filled coordinates
- 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 clickeddragOptions
: Configures the draggability of the side menuisRmbOnEarth
,isRmbOffEarth
,isRmbOnSat
: Control when the right-click menu is availablermbMenuOrder
: 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.