aligned_on_ils produces GeodError
See original GitHub issueWhile trying out the newly implemented functions, I noticed that the method aligned_on_ils
(in my case) always ends with an error for self downloaded trajectories. I use the latest version from Github.
If you use the example trajectory from the documentation, however, it runs fine. I used exactly the same syntax which is proposed by the documentation:
aligned = next(flight.aligned_on_ils('LOWW'))
print(f"ILS {aligned.max('ILS')} until {aligned.stop:%H:%M}")
The following error message is triggered:
Traceback (most recent call last):
File "..../src/Test.py", line 11, in <module>
aligned = next(flight.aligned_on_ils('LOWW'))
File "....\anaconda3\envs\venv-traffic\lib\site-packages\traffic\algorithms\navigation.py", line 246, in aligned_on_ils
self.bearing(threshold,)
File "....\anaconda3\envs\venv-traffic\lib\site-packages\traffic\core\flight.py", line 1334, in bearing
other.longitude * np.ones(size),
File "....\anaconda3\envs\venv-traffic\lib\site-packages\traffic\core\geodesy.py", line 16, in bearing
angle1, angle2, dist1 = geod.inv(lon1, lat1, lon2, lat2, *args, **kwargs)
File "....\anaconda3\envs\venv-traffic\lib\site-packages\pyproj\geod.py", line 261, in inv
self._inv(inx, iny, inz, ind, radians=radians)
File "pyproj\_geod.pyx", line 117, in pyproj._geod.Geod._inv
pyproj.exceptions.GeodError: Array lengths are not the same.
Any ideas what kind of problem is there. Could it be related to the newly integrated version of pyproj?
Issue Analytics
- State:
- Created 3 years ago
- Comments:12 (8 by maintainers)
Top Results From Across the Web
No results found
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Hello Xavier,
thank you for the fast response. Indeed resampling the flights was the solution so far. Maybe some timestamps were incomplete or missing. Now every example works like a charm 😃
Wow you’re fast!
The method is indeed found when using the version from github, which resolves my issue. Thank you!