Changeset 3209:bd194f02c828 in roaraudio for include/roaraudio/units.h


Ignore:
Timestamp:
01/24/10 05:05:18 (14 years ago)
Author:
phi
Branch:
default
Phase:
public
Message:

+speeds, better vallues

File:
1 edited

Legend:

Unmodified
Added
Removed
  • include/roaraudio/units.h

    r3206 r3209  
    4040 
    4141/* Time: */ 
     42#ifndef _SEC 
    4243#if defined(_UNITS_T_BASE_MSEC) 
    4344#define _SEC  1000 
     
    4748#else 
    4849#define _SEC  1 
     50#endif 
    4951#endif 
    5052 
     
    5759 
    5860/* distance */ 
     61#ifndef _METER 
     62#if defined(_UNITS_D_BASE_MMETER) 
     63#define _METER 1000 
     64#elif defined(_UNITS_D_BASE_UMETER) 
     65#define _METER 1000000 
     66//#elif defined(_UNITS_D_BASE_METER) 
     67#else 
    5968#define _METER 1 
    60 #define _AE    (149597870691*_METER) 
    61 #define _LJ    (9460730472580800*_METER) 
    62 #define _PC    (3.2615668*_LJ) 
     69#endif 
     70#endif 
     71 
     72#define _AE    (149597870691LL     *_METER) 
     73#define _LJ    (9460730472580800LL *_METER) 
     74#define _PC    (30856804413117847LL*_METER) /* TODO: FIXME: get a more corret value */ 
     75 
     76 
     77/* speed */ 
     78#define _MPS                   (_METER/_SEC) 
     79#define _KMPH                  (_KILO*_METER/_HOUR) 
     80#define _SPEED_OF_SOUND_AIR    (343 *_MPS) 
     81#define _SPEED_OF_SOUND_WATER  (1407*_MPS) 
     82#define _SPEED_OF_SOUND        _SPEED_OF_SOUND_AIR 
     83#define _SPEED_OF_LIGHT_VACUUM (299792458LL*_MPS) 
     84#define _SPEED_OF_LIGHT        _SPEED_OF_LIGHT_VACUUM 
     85 
    6386 
    6487/* Bits -> Bytes: */ 
Note: See TracChangeset for help on using the changeset viewer.