Creating Boost unit system for astrodynamic equations
I am starting to convert code I have written using standard types (e.g. double) which calculates the orbits of objects in space. Common man's way of describing astrodynamic equations. The equations fall into two types: dimensionless and with dimensions. For those that have a dimension they fall into three types: Length (earth radii) Time (minutes) Angle (radians) So derived types would be: Velocity (radians/minute) Now that I have described what types are required I have a few questions: 1. Where is the length type for already defined for earth radii? 2. What advantage is there to creating my own unit system? It seems that my unit system would have: - earth radii - kg (useless in the equations) - minute - radians Stephen
Length (earth radii) Time (minutes) Angle (radians)
So derived types would be:
Velocity (radians/minute)
Be careful to define this as angular velocity...
Now that I have described what types are required I have a few questions:
1. Where is the length type for already defined for earth radii?
In your header file? The library does not include earth radii as a unit of length, but it is easy to roll your own.
2. What advantage is there to creating my own unit system?
For most applications, it is not necessary to create a whole unit system; you should just define your desired base units and, possibly, conversion factors to SI or some other system.
It seems that my unit system would have:
- earth radii
Look at
- kg (useless in the equations)
If mass doesn't appear in any of your equations, it is not necessary to define or include it.
- minute
This already exists in the library :
- radians
This already exists in the library
participants (2)
-
Matthias Schabel
-
Stephen Torri