libprop: utils.h Source File

- Main Page
- Namespaces
- Classes
- Files

# utils.h

Go to the documentation of this file.

    00001 /*
    00002         libprop -- library to simulate and measure radio signal propagation
    00003
    00004         Copyright (C) 2007 Jeffrey Sharkey, jsharkey.org
    00005
    00006         This program is free software: you can redistribute it and/or modify
    00007         it under the terms of the GNU General Public License as published by
    00008         the Free Software Foundation, either version 3 of the License, or
    00009         (at your option) any later version.
    00010
    00011         This program is distributed in the hope that it will be useful,
    00012         but WITHOUT ANY WARRANTY; without even the implied warranty of
    00013         MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    00014         GNU General Public License for more details.
    00015
    00016         You should have received a copy of the GNU General Public License
    00017         along with this program.  If not, see <http://www.gnu.org/licenses/>.
    00018 */
    00019
    00020 #pragma once
    00021
    00022 #include <math.h>
    00023 #include <float.h>
    00024 #include <assert.h>
    00025
    00026 #include <iostream>
    00027 #include <time.h>
    00028
    00029 using namespace std;
    00030
    00031
    00032 #define PI 3.14159
    00033 #define RADIUS 6378.2064
    00034
    00036 double toRadians(double d);
    00037
    00039 double toDegrees(double r);
    00040
    00044 double ieee_single(char *data2);
    00045
    00046
    00047
    00049 class TimeRemaining {
    00050 private:
    00052         int value;
    00054         int display;
    00056         int max;
    00058         int wide;
    00060         time_t start;
    00061
    00062 public:
    00066         TimeRemaining(int _max, int _display);
    00067
    00069         void increment();
    00070 };
    00071