Consider passing `ellipsoidGeodesic` and writing the `startHeading`, etc. properties directly into it.  `vincentyInverseFormula` is private and not called from anywhere else, so the coupling isn't really a problem, and this approach would allow you to avoid allocating the object literal for `r`.