Calculating Elements from Position and Velocity Vectors --- RECORDSEPARATOR --- Let r and v be the cartesian position and velocity --- RECORDSEPARATOR --- vectors of an orbiting object in coordinates of a reference frame --- RECORDSEPARATOR --- with respect to which the elements of the orbit are to be calculated (e.g. geocentric equatorial for an --- RECORDSEPARATOR --- orbit around Earth, or heliocentric ecliptic for an orbit around the Sun). We assume a right-handed --- RECORDSEPARATOR --- system with the x-axis pointing towards the vernal equinox (or other reference direction) and the z-axis pointing upwards. --- RECORDSEPARATOR --- Compute the following auxiliary vectors: