summaryrefslogtreecommitdiff
path: root/lib/naca/naca5.ml
diff options
context:
space:
mode:
Diffstat (limited to 'lib/naca/naca5.ml')
-rw-r--r--lib/naca/naca5.ml18
1 files changed, 18 insertions, 0 deletions
diff --git a/lib/naca/naca5.ml b/lib/naca/naca5.ml
new file mode 100644
index 0000000..865f3ec
--- /dev/null
+++ b/lib/naca/naca5.ml
@@ -0,0 +1,18 @@
+(* -*- mode: tuareg; -*- *)
+
+type naca5 = { l : float; p : float; s : int; t : float }
+
+(** Implementation for NACA 5-digit airfoil generation *)
+
+let generate_coordinates (naca_num : string) =
+ (* Logic for generating 5-digit NACA airfoil coordinates *)
+ naca_num
+
+(* type naca4 = { m : float; p : float; t : float } *)
+
+let parse_naca5 (naca_num : string) =
+ let l = String.sub naca_num 0 1 |> float_of_string |> ( *. ) 0.15 in
+ let p = String.sub naca_num 1 1 |> float_of_string |> ( *. ) 0.05 in
+ let s = String.sub naca_num 2 2 |> int_of_string in
+ let t = String.sub naca_num 2 2 |> float_of_string |> ( *. ) 0.01 in
+ { l; p; s; t }
Copyright 2019--2025 Marius PETER