diff --git a/CLAUDE.md b/CLAUDE.md new file mode 100644 index 0000000..17110eb --- /dev/null +++ b/CLAUDE.md @@ -0,0 +1 @@ +- This project uses forgejo for source control and the fj client is available. \ No newline at end of file diff --git a/Makefile b/Makefile index 29cb180..2f71042 100644 --- a/Makefile +++ b/Makefile @@ -1,13 +1,26 @@ -BINARY_NAME=skyview +PACKAGE_NAME=skyview BUILD_DIR=build VERSION=$(shell git describe --tags --always --dirty 2>/dev/null || echo "dev") +LDFLAGS=-w -s -X main.version=$(VERSION) -.PHONY: build clean run dev test lint deb deb-clean install-deps +.PHONY: build build-all clean run dev test lint deb deb-clean install-deps +# Build main skyview binary build: - @echo "Building $(BINARY_NAME)..." + @echo "Building skyview..." @mkdir -p $(BUILD_DIR) - go build -ldflags="-w -s -X main.version=$(VERSION)" -o $(BUILD_DIR)/$(BINARY_NAME) ./cmd/skyview + go build -ldflags="$(LDFLAGS)" -o $(BUILD_DIR)/skyview ./cmd/skyview + +# Build beast-dump utility binary +build-beast-dump: + @echo "Building beast-dump..." + @mkdir -p $(BUILD_DIR) + go build -ldflags="$(LDFLAGS)" -o $(BUILD_DIR)/beast-dump ./cmd/beast-dump + +# Build all binaries +build-all: build build-beast-dump + @echo "Built all binaries successfully:" + @ls -la $(BUILD_DIR)/ clean: @echo "Cleaning..." diff --git a/README.md b/README.md index 645e56c..2a3602b 100644 --- a/README.md +++ b/README.md @@ -17,13 +17,14 @@ A high-performance, multi-source ADS-B aircraft tracking application that connec - **Multi-view Dashboard**: Map, Table, Statistics, Coverage, and 3D Radar views ### Professional Visualization -- **Signal Analysis**: Signal strength heatmaps and coverage analysis +- **Signal Analysis**: Signal strength visualization and coverage analysis - **Range Circles**: Configurable range rings for each receiver - **Flight Trails**: Historical aircraft movement tracking -- **3D Radar View**: Three.js-powered 3D visualization (optional) -- **Statistics Dashboard**: Live charts and metrics +- **3D Radar View**: Three.js-powered 3D visualization +- **Statistics Dashboard**: Aircraft count timeline *(additional charts under construction)* 🚧 - **Smart Origin**: Auto-calculated map center based on receiver locations - **Map Controls**: Center on aircraft, reset to origin, toggle overlays +- **Signal Heatmaps**: Coverage heatmap visualization *(under construction)* 🚧 ### Aircraft Data - **Complete Mode S Decoding**: Position, velocity, altitude, heading @@ -51,7 +52,7 @@ A high-performance, multi-source ADS-B aircraft tracking application that connec ```bash # Install -sudo dpkg -i skyview_2.0.0_amd64.deb +sudo dpkg -i skyview_0.0.2_amd64.deb # Configure sudo nano /etc/skyview/config.json @@ -119,9 +120,18 @@ Access the web interface at `http://localhost:8080` ### Views Available: - **Map View**: Interactive aircraft tracking with receiver locations - **Table View**: Sortable aircraft data with multi-source information -- **Statistics**: Live metrics and historical charts -- **Coverage**: Signal strength analysis and heatmaps -- **3D Radar**: Three-dimensional aircraft visualization +- **Statistics**: Aircraft count timeline *(additional charts planned)* 🚧 +- **Coverage**: Signal strength analysis *(heatmaps under construction)* 🚧 +- **3D Radar**: Three-dimensional aircraft visualization *(controls under construction)* 🚧 + +### 🚧 Features Under Construction +Some advanced features are currently in development: +- **Message Rate Charts**: Per-source message rate visualization +- **Signal Strength Distribution**: Signal strength histogram analysis +- **Altitude Distribution**: Aircraft altitude distribution charts +- **Interactive Heatmaps**: Leaflet.heat-based coverage heatmaps +- **3D Radar Controls**: Interactive 3D view manipulation (reset, auto-rotate, range) +- **Enhanced Error Notifications**: User-friendly toast notifications for issues ## 🔧 Building @@ -193,7 +203,7 @@ make check # Run all checks ### Systemd Service (Debian/Ubuntu) ```bash # Install package -sudo dpkg -i skyview_2.0.0_amd64.deb +sudo dpkg -i skyview_0.0.2_amd64.deb # Configure sources in /etc/skyview/config.json # Start service @@ -249,9 +259,9 @@ MIT License - see [LICENSE](LICENSE) file for details. ## 🆘 Support -- [GitHub Issues](https://github.com/skyview/skyview/issues) -- [Documentation](https://github.com/skyview/skyview/wiki) -- [Configuration Examples](https://github.com/skyview/skyview/tree/main/examples) +- [Issues](https://kode.naiv.no/olemd/skyview/issues) +- [Documentation](https://kode.naiv.no/olemd/skyview/wiki) +- [Configuration Examples](https://kode.naiv.no/olemd/skyview/src/branch/main/examples) --- diff --git a/assets/static/css/style.css b/assets/static/css/style.css index 26ce441..44f3103 100644 --- a/assets/static/css/style.css +++ b/assets/static/css/style.css @@ -417,6 +417,99 @@ body { color: #ffffff !important; } +/* Under Construction Styles */ +.under-construction { + color: #ff8c00; + font-size: 0.8em; + font-weight: normal; + margin-left: 8px; +} + +.construction-notice { + background: rgba(255, 140, 0, 0.1); + border: 1px solid #ff8c00; + border-radius: 4px; + padding: 8px; + margin: 8px 0; + font-size: 0.9em; + color: #ff8c00; + text-align: center; +} + +/* Toast Notifications */ +.toast-notification { + position: fixed; + top: 20px; + right: 20px; + background: rgba(40, 40, 40, 0.95); + border: 1px solid #555; + border-radius: 6px; + padding: 12px 20px; + color: #ffffff; + font-size: 0.9em; + max-width: 300px; + z-index: 10000; + transform: translateX(320px); + transition: transform 0.3s ease-in-out; + box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3); +} + +.toast-notification.error { + border-color: #ff8c00; + background: rgba(255, 140, 0, 0.1); + color: #ff8c00; +} + +.toast-notification.show { + transform: translateX(0); +} + +/* Version Info */ +.version-info { + font-size: 0.6em; + color: #888; + font-weight: normal; + margin-left: 8px; +} + +/* Collapsible Sections */ +.collapsible-header { + cursor: pointer; + user-select: none; + display: flex; + justify-content: space-between; + align-items: center; + margin: 0 0 8px 0; + padding: 4px 0; + border-bottom: 1px solid #444; +} + +.collapsible-header:hover { + color: #4a9eff; +} + +.collapse-indicator { + font-size: 0.8em; + transition: transform 0.2s ease; + color: #888; +} + +.collapsible-header.collapsed .collapse-indicator { + transform: rotate(-90deg); +} + +.collapsible-content { + overflow: hidden; + transition: max-height 0.3s ease; + max-height: 200px; +} + +.collapsible-content.collapsed { + max-height: 0; + margin: 0; + padding: 0; +} + .leaflet-popup-tip { background: #2d2d2d !important; } diff --git a/assets/static/index.html b/assets/static/index.html index 9849126..003083b 100644 --- a/assets/static/index.html +++ b/assets/static/index.html @@ -28,7 +28,7 @@
-

SkyView

+

SkyView v0.0.2

@@ -83,8 +83,11 @@
-

Display Options

-
+ +
-

Message Rate by Source

+

Message Rate by Source 🚧 Under Construction

+
This chart is planned but not yet implemented
-

Signal Strength Distribution

+

Signal Strength Distribution 🚧 Under Construction

+
This chart is planned but not yet implemented
-

Altitude Distribution

+

Altitude Distribution 🚧 Under Construction

+
This chart is planned but not yet implemented
@@ -233,10 +239,11 @@
- - +
🚧 3D Controls Under Construction
+ +
diff --git a/assets/static/js/app.js b/assets/static/js/app.js index 8570ff7..f396a5f 100644 --- a/assets/static/js/app.js +++ b/assets/static/js/app.js @@ -107,6 +107,9 @@ class SkyView { }); } + // Setup collapsible sections + this.setupCollapsibleSections(); + const toggleDarkModeBtn = document.getElementById('toggle-dark-mode'); if (toggleDarkModeBtn) { toggleDarkModeBtn.addEventListener('click', () => { @@ -458,6 +461,43 @@ class SkyView { // Clean up old trail data, etc. }, 30000); } + + setupCollapsibleSections() { + // Setup Display Options collapsible + const displayHeader = document.getElementById('display-options-header'); + const displayContent = document.getElementById('display-options-content'); + + if (displayHeader && displayContent) { + displayHeader.addEventListener('click', () => { + const isCollapsed = displayContent.classList.contains('collapsed'); + + if (isCollapsed) { + // Expand + displayContent.classList.remove('collapsed'); + displayHeader.classList.remove('collapsed'); + } else { + // Collapse + displayContent.classList.add('collapsed'); + displayHeader.classList.add('collapsed'); + } + + // Save state to localStorage + localStorage.setItem('displayOptionsCollapsed', !isCollapsed); + }); + + // Restore saved state (default to collapsed) + const savedState = localStorage.getItem('displayOptionsCollapsed'); + const shouldCollapse = savedState === null ? true : savedState === 'true'; + + if (shouldCollapse) { + displayContent.classList.add('collapsed'); + displayHeader.classList.add('collapsed'); + } else { + displayContent.classList.remove('collapsed'); + displayHeader.classList.remove('collapsed'); + } + } + } } // Initialize application when DOM is ready diff --git a/assets/static/js/modules/map-manager.js b/assets/static/js/modules/map-manager.js index 94dd323..bd2ac75 100644 --- a/assets/static/js/modules/map-manager.js +++ b/assets/static/js/modules/map-manager.js @@ -352,8 +352,14 @@ export class MapManager { } createHeatmapOverlay(data) { - // Simplified heatmap implementation - // In production, would use proper heatmap library like Leaflet.heat + // 🚧 Under Construction: Heatmap visualization not yet implemented + // Planned: Use Leaflet.heat library for proper heatmap rendering + console.log('Heatmap overlay requested but not yet implemented'); + + // Show user-visible notice + if (window.uiManager) { + window.uiManager.showError('Heatmap visualization is under construction 🚧'); + } } setSelectedSource(sourceId) { diff --git a/assets/static/js/modules/ui-manager.js b/assets/static/js/modules/ui-manager.js index 3af6789..c4e7569 100644 --- a/assets/static/js/modules/ui-manager.js +++ b/assets/static/js/modules/ui-manager.js @@ -316,6 +316,22 @@ export class UIManager { showError(message) { console.error(message); - // Could implement toast notifications here + + // Simple toast notification implementation + const toast = document.createElement('div'); + toast.className = 'toast-notification error'; + toast.textContent = message; + + // Add to page + document.body.appendChild(toast); + + // Show toast with animation + setTimeout(() => toast.classList.add('show'), 100); + + // Auto-remove after 5 seconds + setTimeout(() => { + toast.classList.remove('show'); + setTimeout(() => document.body.removeChild(toast), 300); + }, 5000); } } \ No newline at end of file diff --git a/debian/DEBIAN/control b/debian/DEBIAN/control index a208957..0d87129 100644 --- a/debian/DEBIAN/control +++ b/debian/DEBIAN/control @@ -1,10 +1,10 @@ Package: skyview -Version: 2.0.0 +Version: 0.0.2 Section: net Priority: optional Architecture: amd64 Depends: systemd -Maintainer: SkyView Team +Maintainer: Ole-Morten Duesund Description: Multi-source ADS-B aircraft tracker with Beast format support SkyView is a standalone application that connects to multiple dump1090 Beast format TCP streams and provides a modern web frontend for aircraft tracking. @@ -20,4 +20,4 @@ Description: Multi-source ADS-B aircraft tracker with Beast format support - Mobile-responsive design - Systemd integration for service management - Beast-dump utility for raw ADS-B data analysis -Homepage: https://github.com/skyview/skyview +Homepage: https://kode.naiv.no/olemd/skyview diff --git a/debian/DEBIAN/postinst b/debian/DEBIAN/postinst index 7ddbb80..5e9f8d8 100755 --- a/debian/DEBIAN/postinst +++ b/debian/DEBIAN/postinst @@ -21,19 +21,28 @@ case "$1" in chmod 755 /var/lib/skyview chmod 755 /var/log/skyview - # Set permissions on config file + # Set permissions on config files if [ -f /etc/skyview/config.json ]; then chown root:skyview /etc/skyview/config.json chmod 640 /etc/skyview/config.json fi - # Enable and start the service - systemctl daemon-reload - systemctl enable skyview.service - echo "SkyView has been installed and configured." - echo "Edit /etc/skyview/config.json to configure your dump1090 sources." - echo "Then run: systemctl start skyview" + # Install systemd service but do not enable or start it + systemctl daemon-reload + + echo "SkyView has been installed successfully." + echo "" + echo "Configuration:" + echo " - Main config: /etc/skyview/config.json" + echo "" + echo "To start SkyView:" + echo " sudo systemctl enable skyview" + echo " sudo systemctl start skyview" + echo "" + echo "Binaries installed:" + echo " - skyview: Main ADS-B tracker server" + echo " - beast-dump: Beast protocol data dump utility" ;; esac diff --git a/debian/usr/bin/beast-dump b/debian/usr/bin/beast-dump index 99c154e..525d911 100755 Binary files a/debian/usr/bin/beast-dump and b/debian/usr/bin/beast-dump differ diff --git a/debian/usr/share/man/man1/beast-dump.1 b/debian/usr/share/man/man1/beast-dump.1 index bc94ad6..2465981 100644 --- a/debian/usr/share/man/man1/beast-dump.1 +++ b/debian/usr/share/man/man1/beast-dump.1 @@ -1,4 +1,4 @@ -.TH BEAST-DUMP 1 "2024-08-24" "SkyView 2.0.0" "User Commands" +.TH BEAST-DUMP 1 "2025-08-24" "SkyView 0.0.2" "User Commands" .SH NAME beast-dump \- Utility for analyzing raw ADS-B data in Beast binary format .SH SYNOPSIS @@ -90,6 +90,6 @@ Beast format files typically use .bin or .beast extensions. .BR skyview (1), .BR dump1090 (1) .SH BUGS -Report bugs at: https://github.com/skyview/skyview/issues +Report bugs at: https://kode.naiv.no/olemd/skyview/issues .SH AUTHOR -SkyView Team \ No newline at end of file +Ole-Morten Duesund \ No newline at end of file diff --git a/debian/usr/share/man/man1/skyview.1 b/debian/usr/share/man/man1/skyview.1 index 34241fc..2c408c6 100644 --- a/debian/usr/share/man/man1/skyview.1 +++ b/debian/usr/share/man/man1/skyview.1 @@ -1,4 +1,4 @@ -.TH SKYVIEW 1 "2024-08-24" "SkyView 2.0.0" "User Commands" +.TH SKYVIEW 1 "2025-08-24" "SkyView 0.0.2" "User Commands" .SH NAME skyview \- Multi-source ADS-B aircraft tracker with Beast format support .SH SYNOPSIS @@ -83,6 +83,6 @@ Coverage heatmaps and range circles .BR beast-dump (1), .BR dump1090 (1) .SH BUGS -Report bugs at: https://github.com/skyview/skyview/issues +Report bugs at: https://kode.naiv.no/olemd/skyview/issues .SH AUTHOR -SkyView Team \ No newline at end of file +Ole-Morten Duesund \ No newline at end of file diff --git a/scripts/build-deb.sh b/scripts/build-deb.sh index 21f8c11..5c102f7 100755 --- a/scripts/build-deb.sh +++ b/scripts/build-deb.sh @@ -34,25 +34,44 @@ mkdir -p "$BUILD_DIR" # Change to project directory cd "$PROJECT_DIR" -# Build the application -echo_info "Building SkyView application..." +# Build the applications +echo_info "Building SkyView applications..." export CGO_ENABLED=0 export GOOS=linux export GOARCH=amd64 -go build -ldflags="-w -s -X main.version=$(git describe --tags --always --dirty)" \ +VERSION=$(git describe --tags --always --dirty) +LDFLAGS="-w -s -X main.version=$VERSION" + +# Build main skyview binary +echo_info "Building skyview..." +go build -ldflags="$LDFLAGS" \ -o "$DEB_DIR/usr/bin/skyview" \ ./cmd/skyview if [ $? -ne 0 ]; then - echo_error "Failed to build application" + echo_error "Failed to build skyview" exit 1 fi -echo_info "Built binary: $(file "$DEB_DIR/usr/bin/skyview")" +# Build beast-dump utility +echo_info "Building beast-dump..." +go build -ldflags="$LDFLAGS" \ + -o "$DEB_DIR/usr/bin/beast-dump" \ + ./cmd/beast-dump -# Set executable permission +if [ $? -ne 0 ]; then + echo_error "Failed to build beast-dump" + exit 1 +fi + +echo_info "Built binaries:" +echo_info " skyview: $(file "$DEB_DIR/usr/bin/skyview")" +echo_info " beast-dump: $(file "$DEB_DIR/usr/bin/beast-dump")" + +# Set executable permissions chmod +x "$DEB_DIR/usr/bin/skyview" +chmod +x "$DEB_DIR/usr/bin/beast-dump" # Get package info VERSION=$(grep "Version:" "$DEB_DIR/DEBIAN/control" | cut -d' ' -f2) @@ -69,7 +88,7 @@ sed -i "s/Installed-Size:.*/Installed-Size: $INSTALLED_SIZE/" "$DEB_DIR/DEBIAN/c echo "Installed-Size: $INSTALLED_SIZE" >> "$DEB_DIR/DEBIAN/control" # Build the package -dpkg-deb --build "$DEB_DIR" "$BUILD_DIR/$DEB_FILE" +dpkg-deb --root-owner-group --build "$DEB_DIR" "$BUILD_DIR/$DEB_FILE" if [ $? -eq 0 ]; then echo_info "Successfully created: $BUILD_DIR/$DEB_FILE"