Post · 2 min read· pp. 259–260

Download the Fairdata Program

Public Domain Aeronautical Software (PDAS)

Download the Fairdata Program

The archive file fairdata.zip contains the files:

readme.txtthis file of general directions
fair.f90the complete source code
The sample cases provided are
case1.nmla sample case for y vs. x (non-parametric)
case1.outoutput from case1.nml
case1a.nmlsame as case1, but with added joints
case2.nmla sample case for closed parametric data - cross section
case2a.nmlsame as case2, but with added joints
case3.nmla sample case that turns back (parametric)
case3a.nmlsame as case3, but with added joints
case4.nmla sample case - drag polar of an airfoil

The program asks for the name of the input file. The program makes the file fair.out to be viewed or printed and three plotting files. The file fair.dat has the original data points. The file fair.crv has a fairly dense set of points on the spline. The file fair.jnt has the joints. Using gnuplot, you can visualize the fit with the command

gnuplot> plot 'fair.dat','fair.crv' with lines,'fair.jnt'

Anothe file called fair.dbg contains a track of the calculation. You might find the info in this file useful.

The namelist NAM1 has the following variables

xData,yDataarrays of input data
weightsweight of each data point (preset to 1.0)
jointsarray of joints
parametric.TRUE. if data is to be plotted against a parametric variable
.FALSE. if the data is to be treated as y vs. x
closed.TRUE. if the data closes (last point==first point)
.FALSE.

Note - parametric and closed are preset to FALSE.

I have not really exercised this code extensively. I do see however, that it can go unstable if you try to put too many joints into the fit. There should be at least a few data points between each pair of joints.

Public Domain Aeronautical Software (PDAS)