Program Listing for File constants.h
↰ Return to documentation for file (/tmp/ws/src/marti_common/swri_math_util/include/swri_math_util/constants.h
)
// *****************************************************************************
//
// Copyright (c) 2014, Southwest Research Institute® (SwRI®)
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are met:
// * Redistributions of source code must retain the above copyright
// notice, this list of conditions and the following disclaimer.
// * Redistributions in binary form must reproduce the above copyright
// notice, this list of conditions and the following disclaimer in the
// documentation and/or other materials provided with the distribution.
// * Neither the name of Southwest Research Institute® (SwRI®) nor the
// names of its contributors may be used to endorse or promote products
// derived from this software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
// ARE DISCLAIMED. IN NO EVENT SHALL <COPYRIGHT HOLDER> BE LIABLE FOR ANY
// DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
// ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
//
// *****************************************************************************
#ifndef MATH_UTIL_CONSTANTS_H_
#define MATH_UTIL_CONSTANTS_H_
namespace swri_math_util
{
static const long double _pi = 3.1415926535897932384626433832795029L;
static const long double _2pi = 6.28318530717958647692528676655900576L;
static const long double _half_pi = 1.57079632679489661923132169163975144L;
static const long double _deg_2_rad = 0.01745329251994329576923690768488612L;
static const long double _rad_2_deg = 57.2957795130823208767981548141051703L;
static const double _kph_to_mps = 0.2777777777777778;
static const double _mps_to_mph = 2.2369362920544025;
static const double _feet_to_meters = 0.3048;
static const double _yards_to_meters = 0.9144;
}
#endif // MATH_UTIL_CONSTANTS_H_