API de seguimiento de vuelos en tiempo real sobre la Peninsula Iberica.
Compatible con OpenSky Network.
Devuelve todos los vuelos activos, opcionalmente filtrados por bounding box.
| Param | Tipo | Descripcion |
|---|---|---|
lamin | float | Latitud minima (sur) |
lamax | float | Latitud maxima (norte) |
lomin | float | Longitud minima (oeste) |
lomax | float | Longitud maxima (este) |
{
"time": 1710672000,
"states": [
[
"4b1803", // [0] icao24
"IBE3421 ", // [1] callsign (8 chars)
"Spain", // [2] origin_country
1710672000, // [3] time_position
1710672000, // [4] last_contact
-3.5626, // [5] longitude
40.4719, // [6] latitude
10668.00, // [7] baro_altitude (m)
false, // [8] on_ground
245.50, // [9] velocity (m/s)
42.30, // [10] true_track (deg)
0.50, // [11] vertical_rate (m/s)
null, // [12] sensors
10718.00, // [13] geo_altitude (m)
"5765", // [14] squawk
false, // [15] spi
0 // [16] position_source
]
]
}
const API = 'http://localhost:3003';
async function getFlights() {
const resp = await fetch(
API + '/api/states/all?lamin=35&lomin=-10&lamax=44&lomax=5'
);
const data = await resp.json();
console.log('Vuelos activos:', data.states.length);
data.states.forEach(s => {
console.log(
s[1].trim(), // callsign
s[6].toFixed(2) + ' N', // lat
s[5].toFixed(2) + ' W/E', // lon
Math.round(s[7]) + 'm' // altitude
);
});
}
getFlights();