[Units] another system problems
Hi,
I used a previous version of the Units library to sketch out a fps system
(foot-pound-second) that paralleled the cgs system, and the code compiled
and ran fine. I am now returning to this effort, and I want to wrap it into
a coordinate transform package, but I can no longer get the code to compile.
I am using the latest code from the Boost sandbox, and MS Visual Studio with
WinXP. The problem appears to be in the conversions, but I don't see what is
missing when compared to cgs.
typedef unit
AMDG Patricia Hawley wrote:
Hi, I used a previous version of the Units library to sketch out a fps system (foot-pound-second) that paralleled the cgs system, and the code compiled and ran fine. I am now returning to this effort, and I want to wrap it into a coordinate transform package, but I can no longer get the code to compile. I am using the latest code from the Boost sandbox, and MS Visual Studio with WinXP. The problem appears to be in the conversions, but I don't see what is missing when compared to cgs.
typedef unit
my_unit; typedef quantity< my_unit, ofs::Real64 > linear_measure; linear_measure dummy(200.0*CGS::centimeter); // implicit conversion from SI::meter to CGS::centimeter linear_measure dummy2(200.0*FPS::foot); The first three lines work fine, but the last one generates 10 errors with my compiler (MSVC 8.0). The first error is
Can you post the definitions of FPS::foot, FPS::system &c. In Christ, Steven Watanabe
Steven Watanabe
AMDG
Can you post the definitions of FPS::foot, FPS::system &c.
In Christ, Steven Watanabe
Here is the definition for feet (using centimeters as an example):
#ifndef BOOST_UNITS_FPS_LENGTH_HPP
#define BOOST_UNITS_FPS_LENGTH_HPP
#include
AMDG Patricia Hawley wrote:
#include
#include #include
For now
#include
FPS is a fairly common system where I work, and although it is short for foot-pounds-seconds since pounds is a force, the mass unit is slugs.
BTW, it's okay to have a system that uses length, force, and time. In Christ, Steven Watanabe
participants (2)
-
Patricia Hawley
-
Steven Watanabe