VR-Vantage 2.7 API Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
ssSonar.h
Go to the documentation of this file.
1 
2 // Copyright JRM Enterprises, Inc. 2004
3 // All rights reserved.
4 //
5 // This code is the intellectual property of JRM Enterprises, Inc.
6 // It may not be used or released as source or compiled binary form
7 // without the prior written consent of JRM Enterprises, Inc.
8 //
10 
11 #ifndef _ssSonar_
12 #define _ssSonar_
13 
14 #include "ssEnvironment.h"
15 #include "ssObject.h"
16 #include "ssdllexport.h"
17 
18 #include "Sonar.h"
19 
21 // class: ssSonar
22 //
23 // description: sonar methods for generation of LOS acoustic return
24 //
26 {
27 public:
29  // typedef std::map<int, ssObject *> ObjectMap;
30 
32  //ssSonar
36  ssSonar();
37 
39  //~ssSonar
43  ~ssSonar();
44 
45 
47  // ssSonar::SetTransducerByMALOSonarCode
48  //
49  // code=1: SQS510HullMount Halifax hull mount active
50  // code=2: TAKRHullMount T-AR Bob Hope hull mount active
51  // code=3: TMS118AD CH148 dipper active
52  // code=4: CP140SonoBuoy CP-140 Sonobuoy
53  // code=5: CP140LF CP-140 LF active
54  // code=6: SINTRA2040HullMount Victoria Hull Mount passive
55  // code=7: CANTASSSQR501TowedArray Halifax Towed Array passive
56  // code=8: CANTASS2046TowedArray Victoria Towed Array passive
57  // code=9: DICASS62A
58  // code=10: DICASS62B
59  // code=11: DICASS62C
60  // code=12: DICASS62D
61  //
62  void SetTransducerByMALOSonarCode(int code, ACOUSTIC_TRANSDUCER *transduce);
63 
65  // CalculateSourceLevelAndDirectivities
66  //
67  // Calculates Source Level (*SL), transmitter Directivity Index (*DIT), and receiver Directivity Index (*DI) in [dB]
68  // at particular direction totargetFRD in transducer source's FRD frame.
69  //
70  int CalculateSourceLevelAndDirectivities(ACOUSTIC_TRANSDUCER source, VECTOR totargetFRD, double *SL, double *DIT, double *DI);
71 
73  // LoadTS_DATABASE
74  //
75  // Loads ATAS target strength database from disk. Assumes filenames are sent in via target_filelist.
76  //
77  int LoadTS_DATABASE(TS_DATABASE *tsd, char *target_filelist, char *sigsim_data_dir);
78 
80  // FreeTS_DATABASE
81  //
82  // Frees ATAS target strength database.
83  //
85 
87  // LoadSubsurface1DProfile
88  //
89  // Loads underwater pressure/temp/salinity profile from file on disk.
90  //
91  int LoadSubsurface1DProfile(char *file, SUBSURFACE_1DPROFILE *seadata);
92 
94  // FreeSubsurface1DProfile
95  //
96  // Frees underwater pressure/temp/salinity profile.
97  //
99 
101  // AcousticPropagator
102  //
103  // Calculates 1-way transmission loss, noise level, and reverberation level between two points.
104  //
105  // INPUTS :
106  // E defines the Earth ellipsoid so that proper ranges and angles can be calculated
107  // seadata gives the subsurface depths and physical properties (pressure, temp, salinity) at each depth
108  // plc gives the sensor/target geometry
109  // freq_khz [kHz] gives the frequency of interest
110  // SL [dB] is the source power level (applicable only for active requests, and if the propagator supports reverberation)
111  // OUTPUTS :
112  // TL [dB] is the 1-way transmission loss between sensor and target
113  // NL [dB] is the noise level
114  // RL [dB] is the reverberation level (if supported)
115  // delay_sec [s] is the propagation time
116  //
117  int AcousticPropagator(ellipsoid E, SUBSURFACE_1DPROFILE seadata, ST_PLACEMENT plc, double freq_khz, double SL, double *TL, double *NL, double *RL, double *delay_sec);
118 
119 
121  // CalcSTGeometry
122  //
123  // Calculates range and LOS angles w.r.t. each position, based on ST_PLACEMENT input.
124  //
125  // range [m] source-target range
126  // totargetFRD [unitless cosines] direction to target in sensor's FRD frame
127  // tosourceFRD [unitless cosines] direction to source in target's FRD frame
128  //
129  void CalcSTGeometry(ST_PLACEMENT *plc);
130 
132  // CalculateTargetStrength
133  //
134  // Returns Target Strength (*TS) from ATAS target strength database, according to request parameters tsr.
135  //
136  int CalculateTargetStrength(TS_DATABASE tsd, TS_REQUEST tsr, double *TS);
137 
139  // SignalExcess
140  //
141  // Returns SE = Signal Excess [dB] , given the following :
142  // SL = Signal Level [dB]
143  // DIT= Source Directivity Index [dB]
144  // DI = Receiver (hydrophone) Directivity Index [dB]
145  // TS = Target Strength [dB]
146  // TL1= 1-way Transmission Loss [dB] TO TARGET
147  // TL2= 1-way Transmission Loss [dB] FROM TARGET
148  // RL = Reverberation Level [dB]
149  // NL = Noise Level [dB]
150  // RD = Recognition Differential [dB] = Threshold for detection, really. Depends on signal processing.
151  //
152  double SignalExcess(double SL, double DIT, double DI, double TL1, double TL2, double TS, double RL, double NL, double RD);
153 
155  // SonarAcquisitionStatus
156  //
157  // Returns acquisition status based on Signal Excess SE
158  // 0 = no detect
159  // 1 = detect
160  // 2 = classify
161  // 3 = recognize
162  // 4 = identify
163  //
164  int SonarAcquisitionStatus(double SE, double *DSEED);
165 
167  // SonarAcquisitionStatusKnownThresholds
168  //
169  // Returns acquisition status based on Signal Excess SE
170  // 0 = no detect
171  // 1 = detect
172  // 2 = classify
173  // 3 = recognize
174  // 4 = identify
175  //
176  int SonarAcquisitionStatusKnownThresholds(double SE, double ThreshDetect, double ThreshClassify, double ThreshRecognize, double ThreshIdentify);
177 
178  // helpers
179 
181  //setEnvironment
186  void setEnvironment(ssEnvironment *env);
187 
189  //*getEnvironment
194  ssEnvironment *getEnvironment();
195 
196 private:
197 
199  //setNumberObjects
204  void setNumberObjects(unsigned int num);
205 
207  //getNumberObjects
212  unsigned int getNumberObjects();
213 
215  //setObjectMap
220  // void setObjectMap(ObjectMap map);
221 
223  //setTerrain
228  void setTerrain(ssObject *obj);
229 
231 // ObjectMap m_objectMap;
233  unsigned int m_numberObjects;
234 
237 
240 
241  friend class SigSimRT;
242 
243 };
244 
245 
246 
247 #endif // _ssSonar_
248 


Copyright © 2005-2021 MAK Technologies. All Rights Reserved (www.mak.com)