1#pragma once
2
3
4void EntryPhysicsReplayTests()
5{
6 struct Recorded {double altitude,temperature,tas,q,mach;};
7 const Recorded samples[]={
8 {125.01220703125,222.75201416015625,3.6901026439521227,1.2590370385729257,11.489178657531738},
9 {99.989013671875,188.74710083007812,1.4716062289234342,5.8124900026808906,5.0931167602539062},
10 {75.0361328125,186.48416137695312,0.98336562765155633,75.530719727544763,3.4986226558685303},
11 {60.0693359375,258.20645141601562,1.1135488242422433,715.68100396564796,3.4076125621795654},
12 {40.00537109375,286.12155151367188,1.1579953344251563,11229.325664556622,3.4157588481903076},
13 {30.008056640625,267.68832397460938,0.66322743562688247,16395.113625979135,2.0355277061462402},
14 {27.00390625,263.77102661132812,0.47062143995764855,15958.207723976178,1.4576672315597534},
15 {20.00146484375,255.56520080566406,0.26797483419292611,10802.401878923962,0.84646147489547729},
16 {25.503173828125,261.8621826171875,0.3210704247486359,21545.13608281593,0.99893462657928467},
17 };
18 auto in=BillEntryFixture();
19 for(const auto& s:samples) {
20 in.own={{in.radius+s.altitude,0,0},{0,s.tas,0}};
21 in.entryVehicle.airVelocity={0,s.tas,0};in.entryVehicle.temperatureK=s.temperature;
22 const auto air=EntryPhysics::Atmosphere(in,in.own,0,true);
23 Check(std::abs(air.q/s.q-1)<.025,"Vieneo effective q reproduces recorded client samples within frame-lag tolerance");
24 Check(std::abs(air.mach-s.mach)<.001,"Vieneo sound-speed/composition model reproduces recorded Mach");
25 }
26}