• Nie Znaleziono Wyników

util,h

N/A
N/A
Protected

Academic year: 2021

Share "util,h"

Copied!
2
0
0

Pełen tekst

(1)

#ifndef UTIL_H #define UTIL_H /*************************************************************** ** ** ** "util.h" ** ** ** ** CONTENTS: ** ** ** ** Definition of Class Util; ** ** Static methods define ... and ... calculate ... ** ** This file contains prototypes of small math utilities. ** ** ** ** HISTORY: ** ** ** ** Version Date Changes Author/Programmer ** ** ** ** 1.00 12/01/03 Original J.Malinowski ** ** 1.10 12/03/11 Nmi_To_Km(..) method added JM ** ** 1.11 16/03/07 Redesign JM ** ***************************************************************/ #include <math.h>

typedef unsigned int word;

//---extern const double pi; // pi constant with full accuracy extern const double tpi; // 2*pi

extern const double hpi; // pi/2

extern const double dtr; // 1 deg of arc = dtr radians extern const double rtd; // 1 rad = rtd degrees

extern const double hts; // hrs to sec: 3600.0 extern const double sth; // sec to hrs: 1/3600.0 extern const double htm; // hrs to min: 60.0 extern const double mth; // min to hrs: 1/60.o

//---class Util {

// Represents utility class of static methods. public:

(2)

public:

static double Rad_To_Km( double r ); static double Rad_To_Nmi( double r );

static double Nmi_To_Rad( double m ){return nmikm*m/r_equat;} static double Km_To_Rad( double k ) { return k/r_equat; } static double Km_To_Nmi( double k ) { return k/nmikm; } static double Nmi_To_Km( double m ) { return m*nmikm; }

// Conversions between radians, naut.miles and kilometers //= radians nautical miles kilometers distance units

static word Version(); // Version control protected:

static double r_equat; // equatorial radius, meters static const double nmikm = 1.852;

// nmi to km conversion=1.852 static const double kmnmi;

};

//---#endif

Cytaty

Powiązane dokumenty

Here we present the application of the double- -digit coding in the study Diagnoza kompe- tencji gimnazjalistów 2011 (Diagnosis of the competencies of lower secondary school

It will be OK to work in groups, but of no more than 2 students – unlike some other inquiry based classes that you might have taken (e.g. Math 3CI/5AI/5BI), you are NOT supposed to

We are now going to increase the abstraction in this course by using the terminology of vector spaces, bases, linear independence in everything we do.. We will study a particular

Attendance in discussion sessions on Wednesdays is mandatory; your participation in the sessions will be graded by your TA, and will contribute to your final grade – there will be

Students who miss either one of the midterm exams for legitimate reasons will have the value of that examination transferred to the final examination thereby increasing the value of

Evaluation: approximately 25 short assignments, counting for a total of 15% of your mark, 3 quizzes, each counting for 15% of your mark for a total of 45%, and final

Evaluation: 20 short assignments, counting for a total of 20% of your mark, 2 quizzes, each counting for 20% of your mark for a total of 40% and final take-home examination counting

Evaluation: 14 assignments, counting for a total of 10% of your mark, 2 midterm tests, each counting for 20% of your mark for a total of 40% and final examination counting for 50%