summaryrefslogtreecommitdiff
path: root/lib/naca/naca5.ml
blob: 865f3ec1e63d80614a17e7cd7b92af2d29c29215 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
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