question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

aligned_on_ils produces GeodError

See original GitHub issue

While 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:closed
  • Created 3 years ago
  • Comments:12 (8 by maintainers)

github_iconTop GitHub Comments

1reaction
ClaudiusBZcommented, May 5, 2020

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 😃

0reactions
TheYsconatorcommented, Jun 10, 2020

Wow you’re fast!

The method is indeed found when using the version from github, which resolves my issue. Thank you!

Read more comments on GitHub >

github_iconTop Results From Across the Web

No results found

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found