Weather Observation Station 19

  • + 4 comments

    Again, you're matching up latitude and longitude values from the table with your b-a and d-c distance calculations. That is not what the instructions tell you to do. You need to query four numbers from the table. Assemble the four numbers into two points — it does not matter whether or not a number originally corresponded to a geographic x or y coordinate. These numbers do not correspond to locations on a 2D plane as far as we're concerned until such a time as they are assembled into points P1 and P2. Once you've found the values that create points P1 and P2, they are points on a 2D plane that you must find the Euclidean distance for. Your sqrt((b-a)^2+(d-c)^2) formula is not the Euclidean distance between points P1(a, b) and P2(c, d), which is why your formula is not correct.