| 1 | //=//////////////////////////////////////////////////////////////////////
|
|---|
| 2 | //=
|
|---|
| 3 | //= atm
|
|---|
| 4 | //=
|
|---|
| 5 | //= @file atm.cxx
|
|---|
| 6 | //= @desc Header file
|
|---|
| 7 | //= @author J C Gonzalez
|
|---|
| 8 | //= @email gonzalez@mppmu.mpg.de
|
|---|
| 9 | //= @date Thu May 7 16:24:22 1998
|
|---|
| 10 | //=
|
|---|
| 11 | //=----------------------------------------------------------------------
|
|---|
| 12 | //=
|
|---|
| 13 | //= Created: Thu May 7 16:24:22 1998
|
|---|
| 14 | //= Author: Jose Carlos Gonzalez
|
|---|
| 15 | //= Purpose: Simulation of atmospheric absorption
|
|---|
| 16 | //= Notes:
|
|---|
| 17 | //=
|
|---|
| 18 | //=----------------------------------------------------------------------
|
|---|
| 19 | //=
|
|---|
| 20 | //= $RCSfile: atm.h,v $
|
|---|
| 21 | //= $Revision: 1.1.1.1 $
|
|---|
| 22 | //= $Author: harald $
|
|---|
| 23 | //= $Date: 1999-10-29 07:00:32 $
|
|---|
| 24 | //=
|
|---|
| 25 | //=//////////////////////////////////////////////////////////////////////
|
|---|
| 26 |
|
|---|
| 27 | // @T \newpage
|
|---|
| 28 |
|
|---|
| 29 | //!@section Source code of |atm.h|.
|
|---|
| 30 |
|
|---|
| 31 | /*!@"
|
|---|
| 32 |
|
|---|
| 33 | In this section you can find the source code for the file |atm.h|.
|
|---|
| 34 |
|
|---|
| 35 | @"*/
|
|---|
| 36 |
|
|---|
| 37 | //!@{
|
|---|
| 38 | #ifndef _atm_
|
|---|
| 39 | #define _atm_
|
|---|
| 40 |
|
|---|
| 41 | #ifdef _this_
|
|---|
| 42 | #define _define_extern_
|
|---|
| 43 | #endif
|
|---|
| 44 |
|
|---|
| 45 | #ifndef _this_
|
|---|
| 46 | #define _this_ atm
|
|---|
| 47 | #endif
|
|---|
| 48 | //!@}
|
|---|
| 49 |
|
|---|
| 50 | //!@subsection Include files.
|
|---|
| 51 |
|
|---|
| 52 | //!@{
|
|---|
| 53 |
|
|---|
| 54 | #include <iostream.h>
|
|---|
| 55 | #include <fstream.h>
|
|---|
| 56 | #include <stdlib.h>
|
|---|
| 57 | #include <stdio.h>
|
|---|
| 58 | #include <string.h>
|
|---|
| 59 | #include <math.h>
|
|---|
| 60 |
|
|---|
| 61 | #include "jcmacros.h"
|
|---|
| 62 | #include "jcdebug.h"
|
|---|
| 63 |
|
|---|
| 64 | #include "reflector-v.h"
|
|---|
| 65 |
|
|---|
| 66 | //!@}
|
|---|
| 67 |
|
|---|
| 68 | //!@subsection Macro-definitions, and constants.
|
|---|
| 69 |
|
|---|
| 70 | //!@{
|
|---|
| 71 |
|
|---|
| 72 | // now we define the list ITEM_LIST of possible items in
|
|---|
| 73 | // the parameters file. note that they are functions of
|
|---|
| 74 | // T(x). we will change T(x) to be the real item or the
|
|---|
| 75 | // string of this item when needed
|
|---|
| 76 |
|
|---|
| 77 | #define ATM_MODELS_LIST /* LIST OF POSIBLE MODELS OF ATMOSPHERE */ \
|
|---|
| 78 | T(ATM_NOATMOSPHERE), /* no atmosphere at all: transmittance = 100% */ \
|
|---|
| 79 | T(ATM_90PERCENT), /* atmosphere with transmittance = 90% */ \
|
|---|
| 80 | T(ATM_ISOTHERMAL), /* isothermal approximation */ \
|
|---|
| 81 | T(ATM_CORSIKA) /* atmosphere as defined in CORSIKA */
|
|---|
| 82 |
|
|---|
| 83 | #define T(x) x // define T() as the name as it is
|
|---|
| 84 |
|
|---|
| 85 | enum ATM_MODELS_TYPE {
|
|---|
| 86 | ATM_MODELS_LIST
|
|---|
| 87 | };
|
|---|
| 88 |
|
|---|
| 89 | #undef T
|
|---|
| 90 |
|
|---|
| 91 | #define T(x) #x // define T() as the string of x
|
|---|
| 92 |
|
|---|
| 93 | char *const ATM_MODELS_NAMES[] = {
|
|---|
| 94 | ATM_MODELS_LIST
|
|---|
| 95 | };
|
|---|
| 96 |
|
|---|
| 97 | #undef T
|
|---|
| 98 |
|
|---|
| 99 | #define ATM_NAME_MAX_LENGTH 40
|
|---|
| 100 |
|
|---|
| 101 | float atm(float wavelength, float height, float theta);
|
|---|
| 102 | #ifdef _define_extern_
|
|---|
| 103 | extern void set_atm_mod(ATM_MODELS_TYPE i);
|
|---|
| 104 | extern ATM_MODELS_TYPE conv_atm_mod(char *atmod);
|
|---|
| 105 | #else
|
|---|
| 106 | void set_atm_mod(ATM_MODELS_TYPE i);
|
|---|
| 107 | ATM_MODELS_TYPE conv_atm_mod(char *atmod);
|
|---|
| 108 | #endif
|
|---|
| 109 | char *get_atm_mod();
|
|---|
| 110 | char *get_atm_mod_n(ATM_MODELS_TYPE i);
|
|---|
| 111 |
|
|---|
| 112 |
|
|---|
| 113 | // routines written in Fortran
|
|---|
| 114 |
|
|---|
| 115 | #define attenu attenu_
|
|---|
| 116 | extern "C" {
|
|---|
| 117 | void attenu(float *, float *, float *, float *);
|
|---|
| 118 | }
|
|---|
| 119 |
|
|---|
| 120 | //!@}
|
|---|
| 121 |
|
|---|
| 122 | //!@{
|
|---|
| 123 |
|
|---|
| 124 | #endif // ! _atm_
|
|---|
| 125 |
|
|---|
| 126 | //!@}
|
|---|
| 127 |
|
|---|
| 128 |
|
|---|
| 129 | //=------------------------------------------------------------
|
|---|
| 130 | //!@subsection Log of this file.
|
|---|
| 131 |
|
|---|
| 132 | //!@{
|
|---|
| 133 |
|
|---|
| 134 | /*
|
|---|
| 135 | * $Log: not supported by cvs2svn $
|
|---|
| 136 | * Revision 1.3 1999/03/24 16:33:02 gonzalez
|
|---|
| 137 | * REFLECTOR 1.1: Release
|
|---|
| 138 | *
|
|---|
| 139 | * Revision 1.2 1999/01/21 16:03:32 gonzalez
|
|---|
| 140 | * Only small modifications
|
|---|
| 141 | *
|
|---|
| 142 | */
|
|---|
| 143 |
|
|---|
| 144 | //!@}
|
|---|
| 145 | //=EOF
|
|---|