OU-CS-Capstone-2024 / NOTAMyWatch

Group Capstone project at the University of Oklahoma. Project consists of creating an app that will more effectively warn pilots about airspace hazards. Using the FAA API for NOTAMs.
0 stars 0 forks source link

Minimal circles pathing #17

Closed Gabrieldowen closed 8 months ago

Gabrieldowen commented 8 months ago

to run uncomment the test at the very bottom of the file

getPath inputs: startLat = start airport latitude, startLong = start airport longitude, destLat = destination airport latitude, destLong = destination airport longitude, radius = radius of each API call, pathWidth = the width of the flight path that you want NOTAMs from

How it works:

  1. takes start and destination coordinates
  2. gets total distance between them
  3. gets the distance the circles need to be spaced apart
  4. gets the bearing or direction from the starting point to the destination
  5. loops for the number of circles needed
  6. for each loop get a circle 'stepDistance' away from the previous one
  7. store in coordList
  8. temporarily print the output
n-grounds commented 8 months ago

Great job figuring out the haversine algorithm for computing distance between points on a sphere. The math looks right for that, but honestly it's hard to sight read all the sines/cosines/tangents and confirm it's all in the right order and everything :)

n-grounds commented 8 months ago

I'd love to see some unit tests for this code. At the very least, let's vet that if we call getPath with two points "very close" to one another that we get back a two-element list and match the origin and destination with no points in between vs. calling getPath with two "further away from one another" points that require some intermediate steps.