airport-dist 1.2.0 → 1.2.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +7 -3
- package/dist/index.js +1 -1
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# airport-dist
|
|
2
2
|
|
|
3
|
-
A CLI tool to calculate geographical and aviation route distances between airports using IATA codes.
|
|
3
|
+
A CLI tool to calculate geographical and aviation route distances between airports using IATA codes, with flight time estimates.
|
|
4
4
|
|
|
5
5
|
## Installation
|
|
6
6
|
|
|
@@ -20,10 +20,11 @@ airport-dist -f LHR -t DXB
|
|
|
20
20
|
|
|
21
21
|
## Output
|
|
22
22
|
|
|
23
|
-
The tool provides two distance measurements:
|
|
23
|
+
The tool provides two distance measurements plus flight time:
|
|
24
24
|
|
|
25
25
|
1. **Geographical Distance** - Great circle (Haversine) distance, the shortest path between two points on Earth
|
|
26
26
|
2. **Aviation Route Distance** - Actual airline route distance from bundled route database (55,000+ routes)
|
|
27
|
+
3. **Flight Time** - Estimated flight duration from airline data
|
|
27
28
|
|
|
28
29
|
```
|
|
29
30
|
Calculating distances from JFK to LAX...
|
|
@@ -45,6 +46,7 @@ DISTANCE RESULTS
|
|
|
45
46
|
3982.00 km
|
|
46
47
|
2474.30 miles
|
|
47
48
|
2150.11 nautical miles
|
|
49
|
+
Flight time: 6h 19m
|
|
48
50
|
Source: Airline route data (bundled)
|
|
49
51
|
|
|
50
52
|
============================================================
|
|
@@ -65,7 +67,7 @@ airways, restricted airspace, weather patterns, and traffic flow.
|
|
|
65
67
|
## Data Sources
|
|
66
68
|
|
|
67
69
|
- **Airport Database**: 150+ major international airports with coordinates
|
|
68
|
-
- **Route Database**: 55,000+ airline routes with
|
|
70
|
+
- **Route Database**: 55,000+ airline routes with distances and flight times from [Jonty/airline-route-data](https://github.com/Jonty/airline-route-data)
|
|
69
71
|
- **Fallback**: Estimation using industry-standard routing factors when route not in database
|
|
70
72
|
|
|
71
73
|
## How It Works
|
|
@@ -74,6 +76,8 @@ airways, restricted airspace, weather patterns, and traffic flow.
|
|
|
74
76
|
|
|
75
77
|
- **Aviation Route Distance**: Sourced from bundled airline route data containing actual flight distances. Falls back to estimation for routes not in the database.
|
|
76
78
|
|
|
79
|
+
- **Flight Time**: Sourced from bundled airline route data. Only available for routes in the database.
|
|
80
|
+
|
|
77
81
|
## License
|
|
78
82
|
|
|
79
83
|
MIT
|
package/dist/index.js
CHANGED
|
@@ -17,7 +17,7 @@ function formatFlightTime(minutes) {
|
|
|
17
17
|
program
|
|
18
18
|
.name("airport-dist")
|
|
19
19
|
.description("Calculate geographical and aviation route distances between airports")
|
|
20
|
-
.version("1.2.
|
|
20
|
+
.version("1.2.1")
|
|
21
21
|
.requiredOption("-f, --from <code>", "Origin airport IATA code (e.g., JFK)")
|
|
22
22
|
.requiredOption("-t, --to <code>", "Destination airport IATA code (e.g., LAX)")
|
|
23
23
|
.action(async (options) => {
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "airport-dist",
|
|
3
|
-
"version": "1.2.
|
|
4
|
-
"description": "CLI tool to calculate geographical and aviation route distances between airports",
|
|
3
|
+
"version": "1.2.2",
|
|
4
|
+
"description": "CLI tool to calculate geographical and aviation route distances between airports, with flight time estimates",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
7
7
|
"bin": {
|