trajectory calculations