-
Notifications
You must be signed in to change notification settings - Fork 48
November 27 Update #488
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
November 27 Update #488
Conversation
EFFECTIVE: 27 NOVEMBER 2025 NEXT ISSUE: 22 JANUARY 2026
WalkthroughThis pull request updates the Canadian national airspace waypoint data file, adding and revising airway route segments (T719, T801, T856, etc.) with precise latitude-longitude coordinates, altitude levels, and navigation parameters for XCSoar flight navigation software. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10–15 minutes Areas requiring extra attention:
Possibly related PRs
Suggested reviewers
Poem
Pre-merge checks and finishing touches❌ Failed checks (1 inconclusive)
✅ Passed checks (2 passed)
✨ Finishing touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
for more information, see https://pre-commit.ci
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 4
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
data/content/airspace/country/CA-ASP-National-XCSoar.txt(8 hunks)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
- GitHub Check: build
🔇 Additional comments (5)
data/content/airspace/country/CA-ASP-National-XCSoar.txt (5)
31369-31382: T899 addition looks fine; keep naming/altitude conventions consistent.
No obvious formatting issues in this hunk.
1-12: PR objectives (rebase/clean commits/no PR description): please ensure they’re satisfied before merge.
Not something I can confirm from the file content, but it’s explicitly requested in the PR description.
22182-22191: The V349 airway definition is correctly formatted per the file's design.The forward+return pattern in airways (lines 22187–22197) is standard in this file format. V342 and V343 follow the same structure: point coordinates trace a path northward, then return southward to the starting point. The inserted DP points (52:12:09.8N 122:04:32.7W → 52:16:17.1N 122:15:41.5W → 52:59:37.8N 121:32:25.3W) maintain proper coordinate ordering without gaps or discontinuities. No action needed.
24233-24357: T645 additions are structurally consistent and parse-ready.
Validation confirms: 9 T645 segments with proper AC/AN/AL/AH headers, all altitudes in correct MSL format (12500MSL/18000MSL), and all 44 coordinate values (DP, DB, V X=) properly formatted as DD:MM:SS[.S][NS] DDD:MM:SS[.S][EW]. No structural errors or malformed tokens detected.
27629-27688: This is not an issue. T719 segments are individual bounded airway corridors, not sequential waypoints meant to connect end-to-start. Each segment is a self-contained closed-loop definition (like other airway examples in the file: GUELPH CORRIDOR, Calgary Arrivals SE/SW). The naming "DISCO to VIXOR" describes the geographic area covered, not a flight path sequence. The segments may overlap geographically, which is intentional for airway corridor coverage. The data within each segment is coherent.
| * CANADIAN AIRSPACE 318 nolowE | ||
| * EFFECTIVE: 27 NOVEMBER 2025 NEXT ISSUE: 22 JANUARY 2026 | ||
| * UNNOFFICIAL DATA (Not for navigation) | ||
| * | ||
| * Data derived from the DESIGNATED AIRSPACE HANDBOOK | ||
| * https://www.navcanada.ca/EN/products-and-services/Pages/aeronautical-information-products-designated-airspace-handbook.aspx | ||
| * US/Canada border derived from the International Boundary Commission | ||
| * http://www.internationalboundarycommission.org/en/maps-coordinates/maps.php | ||
| * Parsed using CanAirspaceParser.py on: 26/09/2025 20:15:58 | ||
| * Parsed using CanAirspaceParser.py on: 12/12/2025 14:20:20 | ||
| * written by Chris Gough | ||
| * Send error{s}/comments/requests to christophermgough {at} gmail {dot} com | ||
| * |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fix spelling/metadata hygiene in header comments (“UNNOFFICIAL”, “nolowE”).
Typos reduce trust and make grepping/automation harder (e.g., “UNNOFFICIAL” → “UNOFFICIAL”).
🤖 Prompt for AI Agents
In data/content/airspace/country/CA-ASP-National-XCSoar.txt around lines 1-12
the header contains typos and inconsistent metadata casing: change "UNNOFFICIAL"
to "UNOFFICIAL" and correct the metadata token "nolowE" to the repository's
canonical token/casing (e.g., "NOLOWE" or the exact token used in other files);
preserve surrounding punctuation/spacing and run a quick grep to apply the same
fix wherever this header pattern appears.
| AC B | ||
| AN T629 Airway | ||
| *WILLIAMS LAKE, BC VOR to COGLE, BC INTXN | ||
| *WILLIAMS LAKE, BC VOR to KANOO, BC INTXN | ||
| AL 12500MSL | ||
| AH 18000MSL | ||
| V D=+ | ||
| V X= 52:14:13.6N 122:10:06.9W | ||
| DB 52:15:01.5N 122:26:19.8W, 52:13:23.3N 121:53:54.5W | ||
| DB 52:15:01.8N 122:26:19.8W, 52:13:23.1N 121:53:54.5W | ||
| DP 51:27:26.1N 122:00:16.9W | ||
| DP 51:29:03.6N 122:32:09.6W | ||
| V D=+ | ||
| V X= 51:28:16.0N 122:16:13.0W | ||
| DB 51:29:03.6N 122:32:09.6W, 51:29:04.3N 122:32:09.5W | ||
| DP 52:15:01.8N 122:26:19.8W | ||
|
|
||
| AC B | ||
| AN T629 Airway | ||
| *KANOO, BC INTXN to SEATN, BC INTXN | ||
| AL 12500MSL | ||
| AH 18000MSL | ||
| V D=+ | ||
| V X= 51:28:16.0N 122:16:13.0W | ||
| DB 51:29:02.9N 122:32:09.7W, 51:29:03.6N 122:32:09.6W | ||
| DP 51:27:26.1N 122:00:16.9W | ||
| DP 50:41:23.3N 122:06:23.4W | ||
| DP 50:42:58.5N 122:37:45.0W | ||
| V D=+ | ||
| V X= 50:42:12.0N 122:22:04.0W | ||
| DB 50:42:58.5N 122:37:45.0W, 50:42:58.9N 122:37:44.9W | ||
| DP 51:29:02.9N 122:32:09.7W | ||
|
|
||
| AC B | ||
| AN T629 Airway | ||
| *SEATN, BC INTXN to GLACE, BC INTXN | ||
| AL 12500MSL | ||
| AH 18000MSL | ||
| V D=+ | ||
| V X= 50:42:12.0N 122:22:04.0W | ||
| DB 50:42:58.0N 122:37:45.1W, 50:42:58.5N 122:37:45.0W | ||
| DP 50:41:23.3N 122:06:23.4W | ||
| V D=+ | ||
| V X= 50:11:21.0N 122:25:52.0W | ||
| DB 50:10:32.8N 122:10:21.5W, 50:10:32.8N 122:10:21.5W | ||
| DP 50:12:07.1N 122:41:22.9W | ||
| DP 50:42:58.0N 122:37:45.1W | ||
|
|
||
| AC B | ||
| AN T629 Airway | ||
| *GLACE, BC INTXN to GARRE, BC INTXN | ||
| AL 12500MSL | ||
| AH 18000MSL | ||
| DP 50:12:07.1N 122:41:22.9W | ||
| DP 50:10:32.8N 122:10:21.5W | ||
| V D=+ | ||
| V X= 50:11:21.0N 122:25:52.0W | ||
| DB 50:10:32.8N 122:10:21.5W, 50:10:32.8N 122:10:21.5W | ||
| DP 49:53:33.3N 122:12:31.9W | ||
| DP 49:55:06.5N 122:43:22.5W | ||
| V D=+ | ||
| V X= 49:54:21.N 122:27:57.W | ||
| DB 49:55:06.5N 122:43:22.5W, 49:55:07.1N 122:43:22.4W | ||
| DP 50:12:07.1N 122:41:22.9W | ||
|
|
||
| AC B | ||
| AN T629 Airway | ||
| *GARRE, BC INTXN to JANEK, BC INTXN | ||
| AL 12500MSL | ||
| AH 18000MSL | ||
| V D=+ | ||
| V X= 49:54:21.N 122:27:57.W | ||
| DB 49:55:06.0N 122:43:22.6W, 49:55:06.5N 122:43:22.5W | ||
| DP 49:53:33.3N 122:12:31.9W | ||
| V D=+ | ||
| V X= 49:40:33.4N 122:29:35.5W | ||
| DB 49:39:46.3N 122:14:14.7W, 49:39:41.5N 122:14:15.3W | ||
| DP 49:41:23.2N 122:44:56.1W | ||
| DP 49:55:06.0N 122:43:22.6W | ||
|
|
||
| AC B | ||
| AN T629 Airway | ||
| *JANEK, BC INTXN to SHARD, BC INTXN | ||
| AL 12500MSL | ||
| AH 18000MSL | ||
| DP 49:41:23.2N 122:44:56.1W | ||
| DP 49:39:41.5N 122:14:15.3W | ||
| V D=+ | ||
| V X= 49:40:33.4N 122:29:35.5W | ||
| DB 49:39:41.5N 122:14:15.3W, 49:39:36.6N 122:14:16.0W | ||
| DP 49:18:38.0N 122:17:22.9W | ||
| DP 49:20:07.6N 122:47:52.0W | ||
| V D=+ | ||
| V X= 49:19:23.9N 122:32:37.3W | ||
| DB 49:20:07.6N 122:47:52.0W, 49:20:18.6N 122:47:50.7W | ||
| DP 49:41:23.2N 122:44:56.1W | ||
|
|
||
| AC B | ||
| AN T629 Airway | ||
| *SHARD, BC INTXN to COGLE, BC INTXN | ||
| AL 12500MSL | ||
| AH 18000MSL | ||
| V D=+ | ||
| V X= 49:19:23.9N 122:32:37.3W | ||
| DB 49:19:56.7N 122:47:53.1W, 49:20:07.6N 122:47:52.0W | ||
| DP 49:18:38.0N 122:17:22.9W | ||
| V D=+ | ||
| V X= 49:04:36.N 122:33:54.W | ||
| DB 49:03:45.8N 122:18:44.7W, 49:05:24.1N 122:49:03.7W | ||
| DP 52:15:01.5N 122:26:19.8W | ||
| DB 49:04:01.1N 122:18:43.0W, 49:05:08.8N 122:49:05.2W | ||
| DP 49:19:56.7N 122:47:53.1W | ||
|
|
||
| AC B |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧩 Analysis chain
🏁 Script executed:
#!/bin/bash
# Find any coordinates that look like "DD:MM:SS.N" or "DD:MM:SS.W" (missing seconds fraction + hemisphere attached to a dot).
rg -nP '\b\d{1,2}:\d{2}:\d{2}\.[NS]\b|\b\d{1,3}:\d{2}:\d{2}\.[EW]\b' data/content/airspace/country/CA-ASP-National-XCSoar.txtRepository: XCSoar/xcsoar-data-content
Length of output: 196
Blocker: malformed coordinates like 49:54:21.N 122:27:57.W will likely break parsers.
These lack fractional seconds (missing values after the decimal point) and are inconsistent with the rest of the file's DD:MM:SS(.s)N/W format. Correct to full format like 49:54:21.0N 122:27:57.0W.
🧩 Analysis chain
🏁 Script executed:
#!/bin/bash
# Detect DB lines where the two endpoints are identical (ignoring spacing).
python3 - <<'PY'
import re, pathlib
p = pathlib.Path("data/content/airspace/country/CA-ASP-National-XCSoar.txt")
db_re = re.compile(r'^DB\s+(.+?),\s*(.+?)\s*$')
def norm(s): return re.sub(r'\s+', ' ', s.strip())
degenerate_count = 0
for i,line in enumerate(p.read_text(encoding="utf-8", errors="replace").splitlines(), 1):
m = db_re.match(line)
if not m:
continue
a,b = norm(m.group(1)), norm(m.group(2))
if a == b:
degenerate_count += 1
print(f"Line {i}: {line}")
print(f"\nTotal degenerate DB segments found: {degenerate_count}")
PYRepository: XCSoar/xcsoar-data-content
Length of output: 156
🏁 Script executed:
#!/bin/bash
# First check file size and line count
wc -l data/content/airspace/country/CA-ASP-National-XCSoar.txt
# Extract the relevant section (lines 23960-24069) and search for degenerate DB segments
sed -n '23960,24069p' data/content/airspace/country/CA-ASP-National-XCSoar.txt | grep "^DB" | while IFS= read -r line; do
# Extract coordinates
coords=$(echo "$line" | sed 's/^DB\s*//; s/,/\n/')
first=$(echo "$coords" | head -1 | sed 's/\s\+/ /g' | xargs)
second=$(echo "$coords" | tail -1 | sed 's/\s\+/ /g' | xargs)
if [ "$first" = "$second" ]; then
echo "DEGENERATE: $line"
fi
doneRepository: XCSoar/xcsoar-data-content
Length of output: 264
🏁 Script executed:
#!/bin/bash
# Get exact line numbers for the degenerate DB segments in the specified range
sed -n '23960,24069p' data/content/airspace/country/CA-ASP-National-XCSoar.txt | grep -n "^DB" | while IFS=: read -r rel_line content; do
first=$(echo "$content" | sed 's/^DB\s*//; s/,.*//; s/\s\+/ /g' | xargs)
second=$(echo "$content" | sed 's/^DB.*,\s*//; s/\s\+/ /g' | xargs)
if [ "$first" = "$second" ]; then
actual_line=$((23959 + rel_line))
echo "Line $actual_line: $content"
fi
doneRepository: XCSoar/xcsoar-data-content
Length of output: 201
Fix degenerate DB segments with identical endpoints.
Lines 24002 and 24015 contain DB 50:10:32.8N 122:10:21.5W, 50:10:32.8N 122:10:21.5W—zero-length arcs that may cause geometry processing errors. Verify the correct second endpoint and correct both instances.
🤖 Prompt for AI Agents
data/content/airspace/country/CA-ASP-National-XCSoar.txt lines ~24002 and
~24015: two DB segments are degenerate because both endpoints are identical ("DB
50:10:32.8N 122:10:21.5W, 50:10:32.8N 122:10:21.5W"); locate the authoritative
source (chart/IFS/ingest) to determine the intended second endpoint and replace
the duplicate coordinate with the correct one in both occurrences; if the
correct second point cannot be determined, remove the duplicate endpoint so the
DB line becomes a single coordinate entry or convert the segment to the correct
DP/DP pattern to avoid zero-length arcs, and validate the file with the geometry
linter afterward.
| AC B | ||
| AN T825 Airway | ||
| *ITMAV, BC INTXN to MOBID, BC INTXN | ||
| *ITMAV, BC INTXN to VIGSO, BC INTXN | ||
| AL 12500MSL | ||
| AH 18000MSL | ||
| V D=+ | ||
| V X= 49:28:33.1N 124:10:43.0W | ||
| DB 49:33:21.6N 123:57:15.9W, 49:23:42.9N 124:24:07.3W | ||
| DB 49:33:21.7N 123:57:16.0W, 49:23:42.9N 124:24:07.3W | ||
| DP 49:33:24.7N 124:32:25.5W | ||
| DP 49:43:04.4N 124:05:29.6W | ||
| V D=+ | ||
| V X= 49:38:15.4N 124:18:58.9W | ||
| DB 49:43:04.4N 124:05:29.6W, 49:43:04.0N 124:05:29.2W | ||
| DP 49:33:21.7N 123:57:16.0W | ||
|
|
||
| AC B | ||
| AN T825 Airway | ||
| *VIGSO, BC INTXN to MOBID, BC INTXN | ||
| AL 12500MSL | ||
| AH 18000MSL | ||
| V D=+ | ||
| V X= 49:38:15.4N 124:18:58.9W | ||
| DB 49:43:04.9N 124:05:30.0W, 49:43:04.4N 124:05:29.6W | ||
| DP 49:33:24.7N 124:32:25.5W | ||
| V D=+ | ||
| V X= 49:49:46.4N 124:28:52.2W | ||
| DB 49:44:56.2N 124:42:22.4W, 49:54:34.9N 124:15:19.3W | ||
| DP 49:33:21.6N 123:57:15.9W | ||
| DB 49:44:55.3N 124:42:21.5W, 49:54:35.9N 124:15:20.1W | ||
| DP 49:43:04.9N 124:05:30.0W | ||
|
|
||
| AC B |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧩 Analysis chain
🏁 Script executed:
rg -n "AN T825 Airway" -C5 data/content/airspace/country/CA-ASP-National-XCSoar.txtRepository: XCSoar/xcsoar-data-content
Length of output: 662
🏁 Script executed:
sed -n '31250,31279p' data/content/airspace/country/CA-ASP-National-XCSoar.txt | cat -nRepository: XCSoar/xcsoar-data-content
Length of output: 946
🏁 Script executed:
rg "AN T825 Airway" -A 20 data/content/airspace/country/CA-ASP-National-XCSoar.txt | head -100Repository: XCSoar/xcsoar-data-content
Length of output: 894
🏁 Script executed:
python3 << 'EOF'
from math import radians, cos, sin, asin, sqrt
def haversine(lon1, lat1, lon2, lat2):
"""Calculate distance between two points in nautical miles"""
lon1, lat1, lon2, lat2 = map(radians, [lon1, lat1, lon2, lat2])
dlon = lon2 - lon1
dlat = lat2 - lat1
a = sin(dlat/2)**2 + cos(lat1) * cos(lat2) * sin(dlon/2)**2
c = 2 * asin(sqrt(a))
nm = c * 3440.065 # Earth radius in nautical miles
return nm
def parse_coord(coord_str):
"""Parse DMS coordinate to decimal degrees"""
parts = coord_str.replace('N', '').replace('S', '').replace('E', '').replace('W', '').strip()
deg, min_sec = parts.split(':')[0], ':'.join(parts.split(':')[1:])
minutes, seconds = min_sec.split(':')
decimal = float(deg) + float(minutes)/60 + float(seconds)/3600
return decimal
# Parse coordinates from review comment
coords = {
"T825-1-DB1": ("49:33:21.7N", "123:57:16.0W"),
"T825-1-DB2": ("49:23:42.9N", "124:24:07.3W"),
"T825-1-DP1": ("49:33:24.7N", "124:32:25.5W"),
"T825-1-DP2": ("49:43:04.4N", "124:05:29.6W"),
"T825-1-VX2": ("49:38:15.4N", "124:18:58.9W"),
"T825-1-DB3": ("49:43:04.4N", "124:05:29.6W"),
"T825-1-DB4": ("49:43:04.0N", "124:05:29.2W"),
"T825-1-DP3": ("49:33:21.7N", "123:57:16.0W"),
"T825-2-VX1": ("49:38:15.4N", "124:18:58.9W"),
"T825-2-DB1": ("49:43:04.9N", "124:05:30.0W"),
"T825-2-DB2": ("49:43:04.4N", "124:05:29.6W"),
"T825-2-DP1": ("49:33:24.7N", "124:32:25.5W"),
}
# Problematic DB pairs
problem_pairs = [
("T825-1-DB3", "T825-1-DB4"),
("T825-2-DB1", "T825-2-DB2"),
]
print("Distance analysis for problematic DB pairs:")
for name1, name2 in problem_pairs:
lat1, lon1_str = coords[name1]
lat2, lon2_str = coords[name2]
lat1_deg = parse_coord(lat1)
lon1_deg = -parse_coord(lon1_str)
lat2_deg = parse_coord(lat2)
lon2_deg = -parse_coord(lon2_str)
dist = haversine(lon1_deg, lat1_deg, lon2_deg, lat2_deg)
print(f"\n{name1} to {name2}:")
print(f" {coords[name1][0]} {coords[name1][1]}")
print(f" to")
print(f" {coords[name2][0]} {coords[name2][1]}")
print(f" Distance: {dist:.3f} nm")
# Compare with normal DB pair
print(f"\n\nComparison - Normal DB pair (T825-1-DB1 to DB2):")
lat1_deg = parse_coord("49:33:21.7N")
lon1_deg = -parse_coord("123:57:16.0W")
lat2_deg = parse_coord("49:23:42.9N")
lon2_deg = -parse_coord("124:24:07.3W")
dist = haversine(lon1_deg, lat1_deg, lon2_deg, lat2_deg)
print(f" Distance: {dist:.3f} nm")
EOFRepository: XCSoar/xcsoar-data-content
Length of output: 400
T825 Airway: DB endpoints are essentially duplicated coordinates—remove or correct.
The DB pairs in both segments have endpoints separated by only ~0.008–0.009 nm (approximately 50 feet), making them effectively identical points and invalid for airway definition. Line 31262 has DB 49:43:04.4N 124:05:29.6W, 49:43:04.0N 124:05:29.2W and line 31271 has DB 49:43:04.9N 124:05:30.0W, 49:43:04.4N 124:05:29.6W. Compare these to the first DB leg at line 31258 (DB 49:33:21.7N 123:57:16.0W, 49:23:42.9N 124:24:07.3W), which spans ~20 nm as expected. Verify the intended waypoints for each segment and correct the duplicated coordinates.
🤖 Prompt for AI Agents
In data/content/airspace/country/CA-ASP-National-XCSoar.txt around lines
31250–31279, the DB coordinate pairs for T825 segments are effectively
duplicated (differences of ~0.008–0.009 nm) and therefore invalid; replace or
correct them so each DB pair defines two distinct endpoints spanning the
intended leg length. Verify the correct waypoint coordinates from source
(chart/airway definition) and either remove the near-duplicate coordinate or
substitute the proper endpoint so DB entries are meaningful (e.g., make the
second coordinate match the far endpoint used in the other segment), and ensure
consistency with the adjoining DP/DB points and overall airway geometry.
EFFECTIVE: 27 NOVEMBER 2025 NEXT ISSUE: 22 JANUARY 2026
Summary by CodeRabbit
New Features
Bug Fixes
✏️ Tip: You can customize this high-level summary in your review settings.