|
| 1 | +# Wind Conventions Reference |
| 2 | + |
| 3 | +## Coordinate Systems |
| 4 | + |
| 5 | +### Global Coordinate System |
| 6 | + |
| 7 | +- Uses true bearing conventions (geographic/earth frame) |
| 8 | +- **0° = North**, increases clockwise till 180°, decrease counter-clockwise till -180° (exclusive) |
| 9 | +- Range: (-180, 180] degrees |
| 10 | +- Used for true wind direction and boat heading |
| 11 | + |
| 12 | +### Boat Coordinate System |
| 13 | + |
| 14 | +- Relative to the boat's orientation |
| 15 | +- **0° = directly opposite to the boat's heading** (bow to stern direction) |
| 16 | +- Increases clockwise till 180°, decrease counter-clockwise till -180° (exclusive) relative to the boat |
| 17 | +- Range: (-180, 180] degrees |
| 18 | +- Used for apparent wind direction (sensor readings) |
| 19 | + |
| 20 | +## Wind Types |
| 21 | + |
| 22 | +### True Wind |
| 23 | + |
| 24 | +- Wind velocity in the global/geographic coordinate frame |
| 25 | +- What a stationary observer on the ground would measure |
| 26 | +- **0° = wind blowing FROM north TO south** (meteorological convention) |
| 27 | +- Independent of boat motion |
| 28 | + |
| 29 | +### Boat Wind |
| 30 | + |
| 31 | +- Wind created by the boat's own motion through the air |
| 32 | +- Direction: opposite of boat heading (`boat_heading + 180°`) |
| 33 | +- Speed: equal to boat speed |
| 34 | + |
| 35 | +### Apparent Wind |
| 36 | + |
| 37 | +- Wind experienced on the moving boat |
| 38 | +- Measured relative to the boat (boat coordinate system) |
| 39 | +- Combination of true wind + boat-induced wind |
| 40 | +- **Apparent Wind = True Wind + Boat Wind** |
| 41 | + |
| 42 | +## Conversion Functions |
| 43 | + |
| 44 | +Available in [`wind_coord_systems.py`](local_pathfinding/wind_coord_systems.py): |
| 45 | + |
| 46 | +### Coordinate System Conversions |
| 47 | + |
| 48 | +- `boat_to_global_coordinate(boat_heading, wind_direction)` - Convert boat-frame wind to global-frame bearing |
| 49 | +- `global_to_boat_coordinate(boat_heading, global_wind_direction)` - Convert global-frame wind to boat-frame |
| 50 | + |
| 51 | +### Wind Conversions |
| 52 | + |
| 53 | +- `get_true_wind(aw_dir_deg, aw_speed_kmph, boat_heading_deg, boat_speed_kmph, ret_rad)` |
| 54 | + Calculate true wind from apparent wind |
| 55 | +- `get_apparent_wind(tw_dir_deg, tw_speed_kmph, boat_heading_deg, boat_speed_kmph, ret_rad)` |
| 56 | + Calculate apparent wind from true wind |
| 57 | + |
| 58 | +## Key Notes |
| 59 | + |
| 60 | +- All angles use **meteorological convention**: wind direction indicates where wind is **coming from**, not going to |
| 61 | +- The math computes vectors in the direction wind travels, but by convention we interpret them as source directions |
| 62 | +- Boat coordinate 0° points to the stern (opposite of heading) following true bearing conventions |
0 commit comments