summaryrefslogtreecommitdiff
path: root/wing_scripts/get_ds.m
diff options
context:
space:
mode:
authorMarius Peter <blendoit@gmail.com>2019-07-15 13:29:36 -0700
committerMarius Peter <blendoit@gmail.com>2019-07-15 13:29:36 -0700
commit32b6a6e80d22a6d6e8449821d3117252de3e89ba (patch)
treec658df6c4cb1f9d13ce62764c14cf2f5672878a0 /wing_scripts/get_ds.m
parentcab1c2b9470ddc9099c4458daf2388d30ac12ca6 (diff)
commence class-ification of gui
Diffstat (limited to 'wing_scripts/get_ds.m')
-rw-r--r--wing_scripts/get_ds.m20
1 files changed, 20 insertions, 0 deletions
diff --git a/wing_scripts/get_ds.m b/wing_scripts/get_ds.m
new file mode 100644
index 0000000..2f0eb9d
--- /dev/null
+++ b/wing_scripts/get_ds.m
@@ -0,0 +1,20 @@
+function ds = get_ds(xi,xf,u)
+
+dist = 0;
+numSteps = 10;
+dx = (xf-xi)/numSteps;
+z0 = get_z(xi,u);
+x0 = xi;
+for i=1:10
+ tempX = x0+dx;
+ if tempX > 0
+ tempZ = get_z(tempX,u);
+ else
+ tempZ = 0;
+ end
+ dist = dist + (dx^2+(tempZ-z0)^2)^.5;
+ z0 = tempZ;
+ x0 = tempX;
+end
+
+ds =dist; \ No newline at end of file
Copyright 2019--2024 Marius PETER