Login     Register

        Contact Us     Search

XLeratorDB/engineering Online Documentation

SQL Server function to convert speed to meters per second


MSEC
 
Updated: 01 December 2008 

Use MSEC to convert from feet per hour, feet per minute, feet per second, inches per second, kilometers per hour, knots, miles per hour, miles per minute, miles per second, meters per second, meters per minute, or meters per hour to meters per second.
Syntax
SELECT [westclintech].[wct].[MSEC] (
  <@Speed, float,>
 ,<@From_scale, nvarchar(4000),>
 ,<@To_scale, nvarchar(4000),>)
Arguments
@Speed
is any real number. @Speed is an expression of type float or of a type that can be implicitly converted to float
@From_scale
is the description of the units for @Speed. @From_scale must be a valid value as specified in speed unit representations@From_scale must be of a data type that is implicitly convertible to varchar.
 
@To_scale
is the description of the metric units that @Speed is to be converted into. @To_scale must be a valid value as specified in speed unit representations. In addition to meters per second, @To_scale  can be decimeters per second, centimeters per second, millimeters per second, micrometers per second, nanometers per second, picometers per second, femtometers per second, attometers per second, zeptometers per second, yoctometers per second, decameters per second, hectometers per second, or kilometers per second .@To_scale must be of a data type that is implicitly convertible to varchar.
 
Return Types
float
Remarks
·         The following table is a representation of the conversion of one of the speed units of measure into meters per second:
feet per hour
8.46667E-05
feet per minute
0.00508
feet per second
0.3048
inches per second
0.0254
kilometers per hour
0.277777778
knots
0.514444444
miles per hour
0.44704
miles per minute
26.8224
miles per second
1609.344
meters per second
1
meters per minute
0.016666667
meters per hour
0.000277778
 
·         Conversion of meters includes all the standard prefixes with kilo representing 1,000 and yocto representing 10E-24.
Example
 
select wct.MSEC(10, 'm/s', 'km/s')
Here is the result set
----------------------
0.01
 
(1 row(s) affected)


Copyright 2008-2024 Westclintech LLC         Privacy Policy        Terms of Service