forked from LaurieWired/XplaneFlightData
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtest_calculators.sh
More file actions
executable file
·42 lines (33 loc) · 1.17 KB
/
test_calculators.sh
File metadata and controls
executable file
·42 lines (33 loc) · 1.17 KB
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
#!/bin/bash
# Test all C++ calculators with example data
echo "===================================="
echo "X-Plane Flight Calculator Test Suite"
echo "===================================="
# Show which version is active
if [ -f .active_version ]; then
VERSION=$(cat .active_version)
echo "Testing: $VERSION version"
else
echo "Testing: Unknown version (run 'make compliant' or 'make non-compliant')"
fi
echo "===================================="
echo ""
echo "1. Turn Performance Calculator"
echo " Input: 250 kts TAS, 25° bank, 90° turn"
./turn_calculator 250 25 90
echo ""
echo "2. VNAV Calculator"
echo " Input: FL350 to 10000 ft, 100nm away, 450 kts GS"
./vnav_calculator 35000 10000 100 450 -1500
echo ""
echo "3. Density Altitude Calculator"
echo " Input: 5000 ft PA, 25°C OAT, 150 IAS, 170 TAS"
./density_altitude_calculator 5000 25 150 170
echo ""
echo "4. Flight Performance Calculator (comprehensive)"
echo " Input: Full flight envelope parameters"
./flight_calculator 250 245 90 95 220 0.65 35000 35000 -500 75000 5 120 250 0.82
echo ""
echo "===================================="
echo "All tests complete!"
echo "===================================="