
I am using Boost 1.45 and trying to use Boost Units to map the types of astrodynamic equation variables. I am getting an error with the following equation. The error is saying that the lvalue type for k2_divded_by_semi_major is wrong.
This is the library doing what it is supposed to do : your equation is dimensionally incorrect...
The questions I have are:
Q1: Did I defined my system correctly? (System file is attached - types.hpp)
Q2: How do I define ratio in the system? For example I have some constants that define a conversion (1 earth radii = 6378 km).
Look at
Q3: How do I define a variable type if its a fraction (e.g. radii / radian )?
typedef derived_dimension
sgp4::types::radii_t k2_divided_by_semi_major = m_k2 / pow<2> ( semi_major );
The types of variables are:
m_k2 sgp4::types::radii_t semi_major sgp4::types::radian_t
You are trying to assign a [length]/[plane_angle^2] to a [length] which is clearly dimensionally incorrect. Depending on your perspective, one of the upsides/downsides of Boost.Units is that it requires that you be precise in formulation of equations... Matthias