Boldy looking at a difficult path. Hope your calculus is good.
Are you looking for a least-squares fit to some observations in the past, or want to do a rough fit for an object that can be refined using successive approximations (from more observations) ? The first is the Gauss method, the second is Lamberts method, applied for newly discovered objects. The Lambert method also is used if you have simultaneous observations from more than 1 place (eg metors) or NEO's.
You'll need to master the maths in "Orbital Motion" by AE Roy.
Spherical trigonometry is a pre-requisite - the classic text is "Spherical Trigonometry" by W.M. Smart.
Here's a pseudocode for the Gauss method:
http://www.physicsforums.com/showthread.php?t=36657
Lamberts method is described in this paper from the AJ:
http://www.iop.org/EJ/article/1538-3...8-2fc3e1e7422e
There's also a method due to Gibbs:
http://en.wikibooks.org/wiki/Astrody...ibbsian_Method
Isaac Newton worked out a prediction for Halleys comet - without a computer, slide rule or trig tables. A fairly staggering achievement when you understand the computational accuracy required.