Open ossama-othman opened 6 years ago
Consider using C++11 user-defined literals to transparently convert all degree values to radians in a user friendly manner, e.g.:
MaRC::ViewingGeometry vg(...);
vg.subobserv(15.67_deg, -23_deg); // converts degrees to radians
vg.position_angle(23_rad); // no conversion to radians needed
Assuming this turns out to be useful, creation of a larger set of user-defined literals for unit types used throughout MaRC may be the better way to go.
The angle units in MaRC::ViewingGeometry methods that accept an angle, such as a latitude, are not consistent. For example, the
sub_observ()
method expects degrees but theis_visible()
method expects radians. This error prone. Angle units should be all be consistent, preferrably in radians, to minimize the need to convert while performing mapping operations.