]>
Commit | Line | Data |
---|---|---|
50a14534 EB |
1 | /* |
2 | * viking -- GPS Data and Topo Analyzer, Explorer, and Manager | |
3 | * | |
4 | * Copyright (C) 2003-2005, Evan Battaglia <gtoevan@gmx.net> | |
5 | * | |
6 | * This program is free software; you can redistribute it and/or modify | |
7 | * it under the terms of the GNU General Public License as published by | |
8 | * the Free Software Foundation; either version 2 of the License, or | |
9 | * (at your option) any later version. | |
10 | * | |
11 | * This program is distributed in the hope that it will be useful, | |
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
14 | * GNU General Public License for more details. | |
15 | * | |
16 | * You should have received a copy of the GNU General Public License | |
17 | * along with this program; if not, write to the Free Software | |
18 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | |
19 | * | |
20 | */ | |
21 | ||
22 | #ifndef __VIKING_GLOBALS_H | |
23 | #define __VIKING_GLOBALS_H | |
24 | ||
25 | #define PROJECT "Viking" | |
901ca9d5 | 26 | #define VIKING_VERSION PACKAGE_VERSION |
1fe49af0 | 27 | #define VIKING_VERSION_NAME "This Name For Rent" |
50a14534 EB |
28 | #define VIKING_URL "http://viking.sf.net/" |
29 | ||
50a14534 EB |
30 | #define ALTI_TO_MPP 1.4017295 |
31 | #define MPP_TO_ALTI 0.7134044 | |
32 | ||
33 | #define VIK_DEFAULT_ALTITUDE 0.0 | |
34 | ||
35 | #define VIK_GTK_WINDOW_FROM_WIDGET(x) GTK_WINDOW(gtk_widget_get_toplevel(GTK_WIDGET(x))) | |
36 | #define VIK_GTK_WINDOW_FROM_LAYER(x) VIK_GTK_WINDOW_FROM_WIDGET(VIK_LAYER(x)->vt) | |
37 | ||
38 | #define DEG2RAD 0.017453293 | |
39 | #define RAD2DEG 57.2957795 | |
40 | ||
41 | /* mercator projection, latitude conversion (degrees) */ | |
42 | #define MERCLAT(x) (RAD2DEG * log(tan((0.25 * M_PI) + (0.5 * DEG2RAD * (x))))) | |
43 | #define DEMERCLAT(x) (RAD2DEG * atan(sinh(DEG2RAD * (x)))) | |
44 | ||
45 | #endif |