-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtest.cpp
57 lines (52 loc) · 3.47 KB
/
test.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
#include <iostream>
#include "SUBoom.hpp"
using namespace std;
int main(){
double h0 = 15240.;
double M = 1.5;
double psi = 0.;
double gamma = 0.;
double g = 1.4;
unsigned int noise_flag = 0;
// unsigned int N_phi = 2;
// double phi[N_phi] = {0., 30.};
static const unsigned int N_phi = 1;
double phi[N_phi] = {0.};
double dphi = 1.0E-3;
double r0 = 5.0;
double dr = 1.E-3;
double m = 1.E6;
double dp = 1.E-6;
double l = 1.E-6;
SUBoom boom(h0, M, psi, gamma, g, noise_flag, N_phi , phi, dphi, r0, dr, m, dp, l);
static const int len = 58;
//double x[len] = {0., 6.7815, 13.5630, 45.4731, 45.4731, 61.66};
double x[len] = {0.,0.445712891563636,1.23438580101818,1.48221521738182,1.68237903992727,1.98585526581818,2.29369160029091,2.91449505076364,3.42914622087273,3.93657629105455,4.23909181505455,4.83768299323636,5.13525776465454,6.53009133861818,8.28331950370909,9.94406691534546,10.8518774164364,11.2525217764364,11.9832886433455,12.2302207008000,12.4851762026182,13.0647644862545,13.5475435793455,13.8610913393455,14.1147799815273,14.5666265851636,16.8439123531636,17.1973661917091,17.4453539655273,18.4488123691636,18.7477912433455,18.9486940673455,19.2006935633455,19.9623929197091,21.5896741226182,22.4140830309818,22.6186808622545,22.7701761604364,22.9201934557091,23.5021043153455,23.7481917997091,23.9487779088000,24.5531755269818,25.0956025946182,25.4924463757091,26.2958465284364,26.5958811189818,26.9462733800727,27.3002550768000,28.1150569662545,28.7240997364364,29.3564738382545,29.7775990957091,29.9293055371636,30.0786894026182,30.6617615502546,30.8611863713455,32.9168772746182};
double p[len] = {0.,50.0275606038874,164.271696413294,190.536009167337,198.418666198698,187.924306411029,147.233003297986,30.4023307845853,-48.3572073712452,-77.2269603616650,-81.1572714811709,-44.3796954070760,-14.1747499729009,84.3310933875598,140.833635709484,140.880024746008,127.776281653857,140.915976249314,307.674125020301,340.503646168419,316.878869592599,137.027415262680,-69.0839448628126,-149.161627491476,-163.596735931868,-155.707120545029,-243.608546128667,-251.476126723158,-226.523463976835,142.428258840000,163.442492385426,166.073910482256,163.455249370470,116.211494848395,-0.591079825583010,-133.171326601612,-155.484453169713,-159.419403192872,-152.850715621056,-0.538229955996995,37.5426472589689,42.7996848230646,38.8777237301330,116.354141135706,155.751190129727,168.902481984314,182.039857127945,195.178391997488,183.372382202100,116.437641401450,81.0056953043283,-115.911357782084,-243.251350547432,-248.497950578310,-237.990833805597,-93.5560171907459,-80.4215413618984,-27.8488462691152};
double T[len];
int Msig = len;
cout << "Condition Atmospheric Data" << endl;
boom.ConditionAtmosphericData();
cout << "Scale Factors" << endl;
boom.ScaleFactors(x, len);
cout << "Initial Wave Normals" << endl;
boom.InitialWaveNormals();
cout << "Ray Tracer" << endl;
boom.RayTracer();
cout << "Ray Tube Area" << endl;
boom.RayTubeArea();
cout << "Find Initial Ray Time" << endl;
boom.FindInitialRayTime();
cout << "ODE Terms" << endl;
boom.ODETerms();
cout << "Distance To Time" << endl;
boom.DistanceToTime(x, T, len);
cout << "Create Signature" << endl;
boom.CreateSignature(T, p, len);
cout << "Propagate Signal" << endl;
boom.PropagateSignal(len, Msig);
for(int j = 0; j < Msig; j++){
cout << "signal.T[" << j << "] = " << boom.signal.final_T[j] << ", ";
cout << "signal.p[" << j << "] = " << boom.signal.final_p[j] << endl;
}
}