Skip to content

Conversation

@redmond2742
Copy link
Owner

Summary

  • speed up GPXPoint.backflow with NumPy vectorisation
  • gracefully fall back to OpenCV if ffmpeg is missing
  • allow shorter extra_out tuples in CLI helper

Testing

  • pytest -q
  • `python - <<'PY'
    import sys, pandas as pd, geopy
    from datetime import datetime, timezone
    sys.path.append('src')
    from ssoss.motion_road_object import GPXPoint
    from ssoss.static_road_object import Intersection
    N=100000
    ints=[Intersection(i,("A","B"),geopy.Point(0,i*1e-6),spd=(25,25,25,25),bearing=(0,90,180,270)) for i in range(N)]
    df=pd.DataFrame({'intersection_obj':ints})
    pt=GPXPoint(0, datetime.now(timezone.utc).isoformat(), (0.0,0.0), 10)
    import timeit
    print(timeit.timeit(lambda: pt.backflow(df,'intersection'), number=1))
    PY

https://chatgpt.com/codex/tasks/task_e_6849f7a52208832ba62394286f70d18c

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants