-
Notifications
You must be signed in to change notification settings - Fork 133
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
New feature: Conics and orbital math support #160
Comments
I have never had a need for this but that does not mean it cannot be a good fit for the library. |
I'm all for having native support for conic sections (not sure what this "support" should look like) but, as an aerospace engineer by training, I don't think orbital propagation is a good fit for the library (simply because this is too specialized). I have done this with my own library written on top of Math.NET Numerics and Spatial. To assist such endeavors, time would be better spent on expanding and maturing the built-in Quaternion functions, more integrators/solvers etc.. Most of what you want are solved with Keplers equations fundamentally. Two capabilities are necessary for such a simulator: conversion between Cartesian and Keplerian elements given To understand the effort required to properly do this, please take a look at General Mission Analysis Tool by NASA: https://sourceforge.net/projects/gmat/ |
I think that trying to expand Spatial, so that orbital mechanics are properly covered, is beyond the scope of the library. However, I do think that providing support for basic geometric primitives would definitely be something work investigating. In your case it seems to me that what you basically need as a building block is the concept of an ellipse. Then you could use Spatial to suit your custom needs. This could also help other people who are in need of support for elliptical shapes. Based on #200 I wouldn't add a separate 2D and 3D case, but a general purpose (3D) case directly. However since this is a big braking change, it might take some time to implement. Let me know that you think of this. |
See https://en.wikipedia.org/wiki/Conic_section and http://www.braeunig.us/space/orbmech.htm
A conic section has a variable amount of eccentricity. 0 means a circle, >0 and <1 means an ellipse, 1 means a parabola, and >1 means hyperbola. <1 eccentricity means that the shape is "closed", but >=1 eccentricity means that the shape has diverging endpoints.
A conic section should also have a way to define their size. This is typically done with defining the semi-major axis.
It may make sense to separate the above features from the below ones, since we could implement both 2D and 3D conics. The above features apply to 2D and 3D conics equally.
Of course, like all objects, conics will need a position. This must be defined by one of the focal points, which is the center in the case of the circle, but not on an ellipse, and parabolas have no "center".
Conic sections also need to have an orientation.
In 2D, you'd only need one angle.
In 3D, this is typically done by defining the longitude of the ascending node (the point at which the conic section rises above a reference plane), the inclination of the shape to the plane at that point, then the angle between the ascending node and a specific point on the conic section (typically the periapsis). See the below image. Even if we decide to use Quaternions, there should be methods for working with 3D conic section orientation using this math.
Conic sections should have a way to sample points around them, perhaps by providing an angle, and returning a position. However, for orbits, the relationship between angle and time is not linear, so it would be nice to provide a time and get a position. Also, for usage with orbits, it would be nice to have a way to provide the position & velocity of an object, and the gravity of the body it's orbiting, to return a conic section and its current position along it.
The class hierarchy could look something like this:
The text was updated successfully, but these errors were encountered: