I am willing to improve your parser and before doing this, I would like to get your feedback on the idea and if you would be willing to accept the changes:
PROBLEM:
This is an excerpt from german airspace which is very typical
DP 48:38:54 N 009:37:28 E
V D=-
V X=48:41:19 N 009:12:39 E
DB 48:38:54 N 009:37:25 E, 48:53:47 N 009:29:13 E
DP 48:49:10 N 008:47:51 E
the problem is the first coordinates of "DB". It is very close (18m) to the previous DP and I think this is a human mistake. The author always tried to have the same coordinates for:
- The first coordinates of DB and the previous DP
- the second coordinates of DB and the next DP
However, sometimes they differ by a few meters.
IMPACT:
You can see the resulting problem, if you zoom into the airspace as presented by http://airspace.xcontest.org or burnair.cloud or whatever. It is kind of "zick zack". I also work for a paragliding computer called "strato" (https://github.com/fhorinek/BB) implementing airspace calculation. They also suffer from this problem, as too many intersections are found, because of wrong coordinates.
PROPOSED SOLUTION
Either check explicitely for the above two cases in
|
const { lineNumber } = token.getTokenized(); |
or check every point in an airspace for a given minimum distance. This should be controlled by a new flag, maybe "--check-distance" or something.
What do you think about rhis?