Boost Users :
Subject: Re: [Boost-users] [units] Convert from Degree Minutes to Degrees
From: Matthias Schabel (boost_at_[hidden])
Date: 2013-09-19 12:56:44
> Angles have their own system that define both radians and degrees. I would like to create the necessary type for minutes (this is 1/60 of a degree). My first thought was to create a scale unit with degrees as the base type. I couldn't determine how to enter the scale of 1/60. The other option is to define a new base unit. I would think using the degrees base unit would be a good reference, but it uses an "INTERNAL ONLY" macro call "BOOST_UNITS_DEFINE_BASE_UNIT_WITH_CONVERSIONS". What should I use to create a unit type that will convert from degree minutes to just degrees?
Creating a scaled unit for minutes of arc is a good idea, but the base unit is already available in <boost/units/base_units/angle/arcminute.hpp> so you shouldn't have to go to the trouble other than defining the corresponding unit. Conversions to/from degrees should just work...
Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net