From 4b7ef90b312f0c5a5d28cc3f603d95c975577a17 Mon Sep 17 00:00:00 2001 From: James Turner Date: Wed, 11 Aug 2021 11:40:16 +0100 Subject: [PATCH] YASim: Add Lift/Drag to test output Patch from Huntley Palmer --- src/FDM/YASim/yasim-test.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/FDM/YASim/yasim-test.cpp b/src/FDM/YASim/yasim-test.cpp index d5b896b79..657ef4109 100644 --- a/src/FDM/YASim/yasim-test.cpp +++ b/src/FDM/YASim/yasim-test.cpp @@ -77,8 +77,8 @@ void yasim_graph(Airplane* a, const float alt, const float kts, Airplane::Config float cl_max = 0, cd_min = 1e6, ld_max = 0; int cl_max_deg = 0, cd_min_deg = 0, ld_max_deg = 0; - printf("aoa\tlift\tdrag\n"); - for(int deg=-15; deg<=90; deg++) { + printf("aoa\tLift\tDrag\tLvsD\n"); + for(int deg=-5; deg<=29; deg++) { float aoa = deg * DEG2RAD; _calculateAcceleration(a, aoa, speed, acc); float drag = acc[0] * (-1/9.8); @@ -97,7 +97,7 @@ void yasim_graph(Airplane* a, const float alt, const float kts, Airplane::Config ld_max= ld; ld_max_deg = deg; } - printf("%2d\t%.4f\t%.4f\n", deg, lift, drag); + printf("%2d\t%.4f\t%.4f\t%.4f\n", deg, lift, drag, ld); } printf("# cl_max %.4f at %d deg\n", cl_max, cl_max_deg); printf("# cd_min %.4f at %d deg\n", cd_min, cd_min_deg);