Upon which reference or equation is the ballistic function based? I need to determine how to approach putting in trajectories from other functions where I have physics based inputs and then do my random variations.
The Ballistic function implements a simple keplarian orbit passing through the two locations (both must have the same altitude).
The apogee altitude is set to the Loft factor multiplied by the minimum energy apogee altitude.
The minimum-energy trajectory between the two points is a unique keplarian orbit. The time of flight is then calculated from the keplarian orbital elements:
t = 2 * (pi - M) / n
where M is the mean anomaly at the launch or impact point (whichever is smaller), and n is the mean motion.