Canonical orbital elements in terms of an arbitrary independent variable