From: salanne@convex.csc.FI (Simo Salanne)
Subject: Noseangle - how to determine
Organisation: STACK Finland
Organization: Finnish Academic and Research Network Project - FUNET
Date: Sat, 19 Dec 92 21:06:47 GMT


Recently when rec.kites FAQ came live again, we discussed
obout measuring kites. One "nice to know" thing was the
noseangle. I have found direct angle measurements difficult,
that's why I did some programming. (Yes, I had to refer once
to elentary trigonometry book, and once to Perl manual.)

With following piece of Perl-code the noseangle of a sport
kite can easily determined. You measure 5 (five) distances
(2 triangles, with a common edge (e)) as described in the 
beginning of code, and you get results like:

    Flash Angel ............. closeup angle =  99 degrees
    Phantom (High Flyers) ... closeup angle = 100 degrees
    Spinoff ................. closeup angle =  91 degrees

Please report your results to the FAQ keeper: 
(SPACEMAN@kuhub.cc.ukans.edu)

Smooth Winds
Simo Salanne

------ CUT HERE -------------------------------------
#! /usr/local/bin/perl
# ---------------------------------------------------
# Determine the Nose angle of Delta shaped sport kite.
#
# By Simo Salanne, 1992
#
# This piece of code is in public domain.
#
# Measure distances a, b, c, d and e.
# Enter measured values in table $data.
# Run this Perl-script.
#
# Note: the angles a-b and a-d are NOT expected
#       to be 90 degrees. (a-b usually is, but
#       a-d usually not.)
# ----------------------------------------------------
#
#         \
#         | \
#         |   \
#         |     \
#         |   b   \
#        -|---------\-
#        ||        /  \\
#        ||      /      \\ c
#        a|    / e        \\
#        ||  /              \\
#        ||/         d        \\
#        -|---------------------\-
#         |                       \
#         |                         \
#         |                           \
#
# --------------------------------------------------------
   $pi=3.131593;
#---
# Data is in format:
#
#  $data{"Kitename"} = "angle-type,a,b,c,d,e";
#  Angle_type is "nose angle" (sail flat) or 
#  "closeup angle" (spreaders, standoffs, etc.. in place).
#  Dimensions can be inches, meters, millimeters, etc...
#  Spinoff example has millimeters.
#
   $data{"Spinoff"} = "closeup angle,553,293,775,850,625";
   $data{"Phantom (High Flyers)"} = "closeup angle,523,230,725,790,575";
   $data{"Flash Angel"} = "closeup angle,473,290,730,850,555";
#
#  This data will yield results:
#  Flash Angel ............. closeup angle =  99 degrees
#  Phantom (High Flyers) ... closeup angle = 100 degrees
#  Spinoff ................. closeup angle =  91 degrees
#
#---
print "\n";
{
   foreach $kite (sort (keys %data)) {
      ($type,$a, $b, $c, $d, $e) = split(/,/, $data{$kite});
      $p1=($a+$b+$e)/2;
      $p2=($c+$d+$e)/2;
      $r1=sqrt((($p1-$a)*($p1-$b)*($p1-$e))/$p1);
      $r2=sqrt((($p2-$c)*($p2-$d)*($p2-$e))/$p2);
      $beta=2*atan2($r1,($p1-$b))*180/$pi;
      $gamma=2*atan2($r2,($p2-$c))*180/$pi;
      $epsilon1=2*atan2($r1,($p1-$e))*180/$pi;
      $diff = $epsilon1-90;
      if ( $diff < 0 ) { $diff = -$diff;}
      if ( $diff > 3 ) {
         printf ">>> Angle a-b is: %4.1f - should be 90.0 ", $epsilon1;
         printf "Please check your measurements of %s \n", $kite;
         }

      $epsilon2=2*atan2($r2,($p2-$e))*180/$pi;
      $noseangle=2*(180-($beta+$gamma+$epsilon2));
      $id = substr($kite." .....................................",0,35);
      printf ("%s %s = %3.0f degrees\n",$id, $type, $noseangle); 
   }
} 
Newsgroups: rec.kites