$search

conversions.h File Reference

Units conversion constants and functions. More...

#include <math.h>
#include <sys/time.h>
#include <time.h>
Include dependency graph for conversions.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

static int analog_to_digital (double voltage, double maxvolts, int nbits)
static double analog_volts (int data, double maxvolts, int nbits)
static double feet2meters (double feet)
static double kmph2mmps (double kmph)
static double meters2feet (double meters)
static double mmps2mph (double mm)
static double mph2mmps (double mph)
static double mph2mps (double mph)
static double mps2mph (double mps)
static double tv2secs (struct timeval *tv)

Variables

const double CM_PER_INCH = 2.54
const double CM_PER_METER = 100.0
const double DEGREES_PER_RADIAN = 180.0/M_PI
const double HALFPI = M_PI / 2.0
const double INCHES_PER_FOOT = 12.0
const double METERS_PER_FOOT = INCHES_PER_FOOT * CM_PER_INCH / CM_PER_METER
const double METERS_PER_MILE = MMETERS_PER_MILE / 1000.0
const long MINUTES_PER_HOUR = 60
const double MMETERS_PER_KM = 1000000.0
const double MMETERS_PER_MILE = 1609344.0
const double RADIANS_PER_DEGREE = M_PI/180.0
const long SECONDS_PER_HOUR = SECONDS_PER_MINUTE * MINUTES_PER_HOUR
const long SECONDS_PER_MINUTE = 60
const double TWOPI = 2.0 * M_PI

Detailed Description

Units conversion constants and functions.

Todo:
use art_msgs/Conversions definitions for multi-language support

Definition in file conversions.h.


Function Documentation

static int analog_to_digital ( double  voltage,
double  maxvolts,
int  nbits 
) [inline, static]

convert analog voltage corresponding digital encoding

Definition at line 101 of file conversions.h.

static double analog_volts ( int  data,
double  maxvolts,
int  nbits 
) [inline, static]

convert analog input data to corresponding voltage

Definition at line 92 of file conversions.h.

static double feet2meters ( double  feet  )  [inline, static]

convert from feet to meters

Definition at line 74 of file conversions.h.

static double kmph2mmps ( double  kmph  )  [inline, static]

Definition at line 51 of file conversions.h.

static double meters2feet ( double  meters  )  [inline, static]

convert from meters to feet

Definition at line 80 of file conversions.h.

static double mmps2mph ( double  mm  )  [inline, static]

convert between millimeters per second and miles per hour

Definition at line 46 of file conversions.h.

static double mph2mmps ( double  mph  )  [inline, static]

Definition at line 56 of file conversions.h.

static double mph2mps ( double  mph  )  [inline, static]

convert between meters per second and miles per hour

Definition at line 62 of file conversions.h.

static double mps2mph ( double  mps  )  [inline, static]

convert from meters per second to miles per hour

Definition at line 68 of file conversions.h.

static double tv2secs ( struct timeval *  tv  )  [inline, static]

convert timeval to seconds

Definition at line 86 of file conversions.h.


Variable Documentation

const double CM_PER_INCH = 2.54

Definition at line 28 of file conversions.h.

const double CM_PER_METER = 100.0

Definition at line 29 of file conversions.h.

const double DEGREES_PER_RADIAN = 180.0/M_PI

Definition at line 38 of file conversions.h.

const double HALFPI = M_PI / 2.0

Definition at line 42 of file conversions.h.

const double INCHES_PER_FOOT = 12.0

Unit conversion constants:

Definition at line 27 of file conversions.h.

Definition at line 30 of file conversions.h.

const double METERS_PER_MILE = MMETERS_PER_MILE / 1000.0

Definition at line 33 of file conversions.h.

const long MINUTES_PER_HOUR = 60

Definition at line 35 of file conversions.h.

const double MMETERS_PER_KM = 1000000.0

Definition at line 31 of file conversions.h.

const double MMETERS_PER_MILE = 1609344.0

Definition at line 32 of file conversions.h.

const double RADIANS_PER_DEGREE = M_PI/180.0

Definition at line 37 of file conversions.h.

Definition at line 36 of file conversions.h.

const long SECONDS_PER_MINUTE = 60

Definition at line 34 of file conversions.h.

const double TWOPI = 2.0 * M_PI

Useful constants

Definition at line 41 of file conversions.h.

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Properties Friends Defines


art_common
Author(s): Austin Robot Technology
autogenerated on Fri Mar 1 14:12:12 2013