benlansdell / flying-overhead Goto Github PK
View Code? Open in Web Editor NEWAnnounce flights of anything directly overhead.
License: MIT License
Announce flights of anything directly overhead.
License: MIT License
Hi, I love the project, Thanks for helping me out bc I'm doing something similar :)
I found how to do the opensky api call from the browser, just leaving it in case anyone is interested
export async function getFlights( coords ) {
// get the user's longitude and latitude
const [ longitude, latitude ] = [ coords.longitude, coords.latitude ];
// find the min and max longitude and latitude of the search area
const kmPerDegreeLatitude = 111.2
const kmPerDegreeLongitude = 111.2 * Math.cos( latitude / 180 * Math.PI )
const latitudeDegrees = SEARCH_DISTANCE / kmPerDegreeLatitude
const longitudeDegrees = SEARCH_DISTANCE / kmPerDegreeLongitude
// build the query string
const parameters = {
lamin: latitude - latitudeDegrees,
lomin: longitude - longitudeDegrees,
lamax: latitude + latitudeDegrees,
lomax: longitude + longitudeDegrees
}
const queryString = new URLSearchParams(parameters).toString();
// make the request and set the openskyResponse variable
const response = await fetch( OPENSKY_URL + "?" + queryString, {method: "GET", headers: HEADERS} );
const openskyResponse = await response.json();
return openskyResponse;
}
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.