Calculate the orbit of a comet

Hi! I’m a screenwriter and, in order to convey realness in a scene, I have the necessity to know how, exactly, one can calculate the orbit of a comet; how one have to register different positions of the comet, if in realtion to a body that has a known position, how one can calculate the trajectory and the speed of the comet in the space. Has someone here the knowledge to help me?
Don’t worry, I learn fast.
Thank you in advance 🙂