[OCaml] aircraft-studio redux.
1
(* -*- mode: tuareg; -*- *)
2
3
type naca5 = { l : float; p : float; s : int; t : float }
4
5
(** Implementation for NACA 5-digit airfoil generation *)
6
7
let generate_coordinates (naca_num : string) =
8
(* Logic for generating 5-digit NACA airfoil coordinates *)
9
naca_num
10
11
(* type naca4 = { m : float; p : float; t : float } *)
12
13
let parse_naca5 (naca_num : string) =
14
let l = String.sub naca_num 0 1 |> float_of_string |> ( *. ) 0.15 in
15
let p = String.sub naca_num 1 1 |> float_of_string |> ( *. ) 0.05 in
16
let s = String.sub naca_num 2 2 |> int_of_string in
17
let t = String.sub naca_num 2 2 |> float_of_string |> ( *. ) 0.01 in
18
{ l; p; s; t }
19