Skip to content

blaaaaaaah/windy-plugin-sail-router-planner

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

171 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

Windy Sailing Weather Forecast Plugin โ›ต

A comprehensive sailing weather forecast plugin for Windy that provides advanced route planning with detailed weather analysis and sailing-specific features.

๐Ÿš€ Current Status

โœ… FULLY FUNCTIONAL - Production-ready sailing weather forecast system

  • ๐ŸŒ Live Development Server: Running at https://0.0.0.0:9999
  • ๐Ÿ”„ Hot Reload: Real-time building with Rollup
  • โšก Ready for Production: All core features implemented and polished

โœจ Key Features

๐Ÿ—บ๏ธ Interactive Route Planning

  • Click-to-Create Routes: Click on map to add waypoints with real-time visualization
  • Great Circle Navigation: Accurate long-distance routing using Earth's curvature
  • Visual Route Editor: Drag waypoints to modify routes with live feedback
  • Distance Labels: Automatic nautical mile distance display on route segments
  • Day Markers: Visual 24-hour interval markers (1d, 2d, 3d) along multi-day routes

๐ŸŒค๏ธ Comprehensive Weather Forecasting

  • Detailed Forecast Table: Hour-by-hour weather analysis for entire passage
  • True & Apparent Wind: Toggle between true wind and apparent wind relative to boat
  • Multi-Day Support: Handles passages of any length with proper time management
  • Pre/Post Departure: Shows weather 4 hours before and after passage
  • Real-Time Weather Stats: Complete leg analysis with min/max/avg values

๐Ÿ“Š Sailing-Specific Analytics

  • Leg Weather Statistics: Comprehensive analysis per route segment
    • Wind speeds (min/avg/max) and gusts
    • Wave heights and periods
    • Wind angle distribution (% upwind/reaching/downwind)
  • Passage Timing: Multi-day leg durations (e.g., "2d 6h", "8h 30m")
  • Speed Management: Customizable speed per leg with real-time recalculation
  • Departure Time Control: Adjustable departure with forecast regeneration

๐ŸŽจ Professional User Interface

  • Responsive Layout: Optimized for both desktop and mobile
  • Loading States: Professional loading animations with progress feedback
  • Date Formatting: Intuitive "Wed 25" format using browser locale
  • Auto-Scroll: Smart positioning to show departure time prominently
  • Visual Freshness: Color-coded forecast freshness indicators

๐ŸŽฏ Quick Start

๐Ÿš€ Install Plugin (Direct Use)

Plugin URL: https://windy-plugins.com/13935398/windy-plugin-sail-router-planner/0.1.0/plugin.min.js

  1. Open Windy.com
  2. Click the Menu (hamburger icon)
  3. Select "Install Windy plugin"
  4. Choose "Load plugin directly from URL"
  5. Paste the plugin URL above
  6. Access via Plugins menu โ†’ "Sail Router Planner"

๐Ÿ› ๏ธ Development Setup

npm start
# Development server: https://0.0.0.0:9999
# Load in Windy: https://www.windy.com/developer-mode

2. Create Your Route

  1. Click on the map to add waypoints
  2. Watch route visualization appear in real-time
  3. Drag waypoints to adjust course
  4. Set individual leg speeds as needed
  5. Adjust departure time if required

3. Analyze Weather Forecast

  • Hourly Timeline: Scroll through hour-by-hour forecasts
  • True/Apparent Toggle: Switch wind perspective as needed
  • Leg Statistics: Expand waypoints for detailed analytics
  • Map Integration: Hover forecast rows to see position on map
  • Layer Control: Click wind/wave icons to change map overlay

๐Ÿงญ Advanced Features

Route Management

  • Multi-Color Routes: Visual distinction for multiple routes
  • Waypoint Controls: Hover to delete, drag to reposition
  • Route Persistence: URL-based route saving and sharing
  • Real-Time Updates: Instant recalculation on any change

Weather Integration

  • Windy API: Direct integration with Windy's forecast models
  • Data Validation: Robust handling of missing or incomplete data
  • Time Alignment: Forecasts aligned to clock hours (XX:00)
  • Forecast Consolidation: Smart averaging for optimal accuracy

Sailing Calculations

  • Apparent Wind Vector: Proper vector addition for apparent wind
  • Course Calculations: True bearings with 0-359ยฐ convention
  • Wind Angles: Relative angles for sail trim decisions
  • Distance Accuracy: Great circle distances in nautical miles

๐Ÿ“‹ Forecast Table Features

Weather Data Display

  • Wind Speed & Direction: True and apparent wind with visual indicators
  • Wave Information: Height, period, and direction relative to course
  • Weather Conditions: Icons and precipitation data
  • Visibility & Conditions: Complete weather picture for sailing

Navigation Information

  • Time & Position: Precise timing and coordinates for each forecast point
  • Course & Speed: Bearing and boat speed for each leg segment
  • Progress Tracking: Visual progress through passage timeline

Interactive Controls

  • Hover Preview: Mouse over forecast rows for map preview
  • Time Scrubbing: Navigate through forecast timeline
  • Speed Adjustment: Modify leg speeds with instant recalculation
  • Departure Control: Change start time with forecast regeneration

๐Ÿ”ง Technical Architecture

Core Components

src/
โ”œโ”€โ”€ plugin.svelte                    # Main UI component
โ”œโ”€โ”€ components/
โ”‚   โ””โ”€โ”€ ForecastTable.svelte        # Detailed weather forecast display
โ”œโ”€โ”€ controllers/
โ”‚   โ””โ”€โ”€ RouteEditorController.ts    # Interactive route management
โ”œโ”€โ”€ services/
โ”‚   โ”œโ”€โ”€ WindyAPI.ts                 # Windy API integration
โ”‚   โ””โ”€โ”€ WeatherForecastService.ts   # Forecast processing & statistics
โ”œโ”€โ”€ types/
โ”‚   โ”œโ”€โ”€ RouteTypes.ts               # Route and navigation types
โ”‚   โ”œโ”€โ”€ WeatherTypes.ts             # Weather data structures
โ”‚   โ””โ”€โ”€ Coordinates.ts              # Geographic coordinate types
โ””โ”€โ”€ utils/
    โ”œโ”€โ”€ NavigationUtils.ts          # Sailing calculations
    โ””โ”€โ”€ RouteSerializer.ts          # Route URL encoding/decoding

Data Flow

User Interaction โ†’ Route Controller โ†’ Weather Service โ†’ Forecast Table
      โ†“                   โ†“                โ†“             โ†“
  Map Clicks    โ†’ Route Visualization โ†’ API Calls โ†’ Weather Display
      โ†“                   โ†“                โ†“             โ†“
  Waypoints     โ†’ Distance Labels   โ†’ Leg Stats โ†’ Interactive UI

๐Ÿ“ˆ Weather Statistics

Per-Leg Analysis

  • Wind Statistics: Min/avg/max speeds and gusts
  • Wave Analysis: Height and period ranges
  • Wind Angles: Sailing point percentages
    • Upwind: <60ยฐ relative to wind
    • Reaching: 60-120ยฐ relative to wind
    • Downwind: 120ยฐ+ relative to wind

Forecast Quality

  • Freshness Indicators: Color-coded forecast age
  • Data Validation: Robust handling of missing data
  • Time Accuracy: Hour-aligned forecasts for consistency

๐ŸŒŠ Example Use Cases

Ocean Passages

  • Plan multi-day Atlantic or Pacific crossings
  • Analyze weather windows for optimal departure
  • Monitor wind patterns and wave conditions
  • Track progress with day markers along route

Coastal Cruising

  • Day sailing with precise timing
  • Harbor-to-harbor passage planning
  • Weather analysis for safe arrival windows
  • Fuel/food planning with accurate timing

Racing & Performance

  • Optimize routing for weather advantages
  • Analyze apparent wind for sail selection
  • Compare different departure times
  • Study wind angle distribution for strategy

๐Ÿ”ฎ Technical Highlights

Advanced Algorithms

  • Great Circle Navigation: Earth-curvature-aware routing
  • Vector Wind Calculations: Proper apparent wind computation
  • Statistical Analysis: Comprehensive leg weather statistics
  • Time Management: Precise passage timing calculations

User Experience

  • Responsive Design: Seamless desktop and mobile experience
  • Real-Time Feedback: Instant visual updates on changes
  • Professional Polish: Loading states, animations, error handling
  • Intuitive Controls: Natural sailing workflow integration

Integration Quality

  • Windy API Expertise: Deep integration with Windy's systems
  • Plugin Standards: Follows Windy plugin development best practices
  • Performance Optimized: Efficient API usage and data processing
  • Error Resilience: Graceful handling of edge cases and API limitations

๐Ÿ› ๏ธ Development

Prerequisites

  • Node.js 18+
  • Windy plugin development access
  • Basic sailing/navigation knowledge helpful

Commands

npm start          # Development server
npm run build      # Production build
git status         # Check changes
git commit         # Commit improvements

Plugin Loading

  1. Start development: npm start
  2. Open Windy: https://www.windy.com/developer-mode
  3. Load plugin: https://localhost:9999/plugin.js
  4. Access via: Plugins menu โ†’ "Sail Router Planner"

๐Ÿ† Project Status

โœ… Completed Features (Production Ready)

  • Interactive route creation and editing
  • Comprehensive weather forecast table
  • True/apparent wind calculations and toggle
  • Multi-day passage support with day markers
  • Detailed per-leg weather statistics
  • Professional UI with loading states
  • Great circle navigation accuracy
  • Browser locale date formatting
  • Responsive layout optimization
  • Route URL persistence and sharing

๐ŸŽฏ Quality Achievements

  • Production-grade error handling
  • Comprehensive TypeScript typing
  • Professional visual polish
  • Sailing-specific feature set
  • Performance optimization
  • Mobile responsiveness

๐ŸŒŠ Professional sailing weather routing at your fingertips!

This plugin represents a complete sailing weather forecast solution, built with deep Windy API integration and professional sailing workflow understanding.

About

Windy plugin for sailing routing

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors