This is IcaoDefinitions.h in view mode; [Download] [Up]
// ICAO 4 NeXT
// main definition file
// all defines should go here !
#import <objc/zone.h>
/* Change to define if optimizing PS Output */
#undef timetest
#define NXLS(bla) NXLocalizedString(bla, 0, 0)
/* Convert point to cm */
#define POINT2CM(a) ((a)/72*2.54)
//**************************
//*value defines
// **************************
/* Entry for <clear Entry> in the Browser */
#define IO_CLEARENTRY "<clear Entry>"
/* PI */
#define PI M_PI
/* radius of earth in km */
#define EARTH_RADIUS 6378.14486779
/* length of one degree on a meridian (ca. 60 NM) */
#define ONE_DEGREE 111.321137
// string definitions for the default system
#define APPNAME [NXApp appName]
#define IPD_NEWUSER "Message Mail"
#define IPD_AUTOLAUNCH "Auto Launch"
#define IPD_ONLOADING "On loading"
#define IPD_ONSTARTUP "On startup"
#define IPD_OPTIMIZEMONO "Optimize mono"
#define IPD_STARTUPFILE "Default worldpart"
#define IPD_PROJECTIONTYPE "Projection type"
#define IPD_RUBBERUNIT "Rubberband unit"
#define IPD_AUTOUNIT "Autorouter unit"
#define IPD_AUTOROUTE "NXWindow Frame AutoRoute"
#define IPD_RUNWAYUNIT "Runway unit"
#define IPD_ELEVATIONUNIT "Elevation unit"
#define IPD_RANGEUNIT "Range unit"
#define IPD_SUGGESTUNIT "Suggest unit"
#define RCD_AUTOROUTE "AutoRoute"
/* strings for automatic mailing for new user and update */
#define KIND_OF "KIND OF"
#define VERSION "0.7"
#define MSG_TITLE NXLS("msg_title")
#define MSG_INFO NXLS("msg_info")
#define MSG_LATER NXLS("msg_later")
#define MSG_UPDATE NXLS("msg_update")
#define MSG_OK NXLS("msg_ok")
#define MSG_NOTYET NXLS("msg_not_yet")
#define MSG_NO NXLS("msg_no")
#define MSG_IUSEIT NXLS("msg_i_use_it")
#define MSG_RESPONSE NXLS("msg_response")
//supported projections
#define PROJECT_LAMBERT 1
#define PROJECT_MERCATOR 2
/* Print Settings = Tags in the nib */
#define KEEP_SCALE 0
#define ADJUST_ROUTE 1
/* Constants for the route. */
#define FROM 0
#define VIA1 1
#define VIA2 2
#define VIA3 3
#define DEST 4
//for graph_primitives
#define SCREEN 0
#define POSTSCRIPT 1
#define SOLID 0
#define DASH 1
#define DOT -5
#define BLACK 0
#define WHITE 1
#define GRAY 2
#define LIGHTGRAY 3
#define NAVYBLUE 4
#define SKYBLUE 5
#define RED 6
#define PINK 7
#define LIGHTGREEN 8
#define YELLOW 9
/* let's see what object types we have to deal with */
#define UNKNOWN -9999
/* aerodromes */
#define O_INTLAIRPORT 1
#define O_AIRPORT 2
#define O_AIRPORT_CIV_MIL 3
#define O_AIRPORT_MIL 4
#define O_AIRFIELD 5
#define O_SPECIAL_AIRFIELD 6
#define O_HELIPORT 7
#define O_HELIPORT_AMB 8
#define O_GLIDER_SITE 9
#define O_HANG_GLIDER_SITE 10
#define O_PARACHUTE_JUMPING_SITE 11
#define O_FREE_BALLON_SITE 12
/* radio navigation facilities */
#define O_VOR 101
#define O_VOR_DME 102
#define O_VORTAC 103
#define O_TACAN 104
#define O_NDB 105
#define O_MARKER_BEACON 106
#define O_BASIC_RADIO_FACILITY 107
/* misc */
#define O_OBSTRUCTION 201
#define O_GROUP_OBSTRUCTION 202
#define O_FIRED_OBSTRUCTION 203
#define O_FIRED_GROUP_OBSTRUCTION 204
#define O_AERO_GROUND_LIGHT 205
/* airspace structure */
#define O_REPORTING_POINT 301
#define O_CTR 351
#define O_CVFR 352
/* gliding objects */
#define O_WAYPOINT 401
/* natural objects */
#define O_RIVER 1001
#define O_HIGHWAY 1002
#define O_ROAD 1003
#define O_LAKE 1004
#define O_VILLAGE 1010
#define O_TOWN 1011
#define O_BORDER 1101
#define O_STATE_BORDER 1102
#define O_COUNTRY 1103
#define O_STATE 1104
#define O_ISLAND 1105
#define O_ISOGONE 2001
// ICAO constants
#define MAXOBJECTS 100000
#define MAXPOINTS 10000 /* max. no. of points for one object */
// **************************
//*data structure
// **************************
/* LOCATION is used to specify geographic locations by degrees.
Resolution is 1/100th of a second.
Positive values mean North/East, negative values South/West.
So: 1 second is 100
1 minute is 6,000
1 degree is 360,000
-------- x 360
129,600,600 is earth's circumference, so we can
easily use 32 bit long vars to represent these values. */
typedef struct
{
long latitude;
long longitude;
} LOCATION;
typedef int COLOR;
typedef double FREQ;
/*
* Oliver thinks:
* Why is that next Pointer untypified ?
* In Martins Version it isn't any longer.
*/
typedef struct
{ /* runway description */
int direction;
int length;
char surface;
void *next; /* pointer to next runway of list */
} RUNWAYDEF;
/* general object structure */
typedef struct
{
int type; /* one of the above constants */
char *name; /* e.g. Grefrath-Niershorst */
char *alias; /* e.g. EDLF */
LOCATION location; /* geographic location */
FREQ frequency;
double msl; /* object elev in ft above msl */
double top_msl; /* elev of object's top in ft above msl */
double range; /* range of VORs etc. in NM */
RUNWAYDEF *runways; /* list of runways */
LOCATION *points; /* polygon --- points describing the object */
int numpoints;/* number of points in above list */
LOCATION topleft, bottomright; /* bounding box if polygons are
* given */
int piece; /* number of piece rectangle if object is
* visible */
} OBJECT;
typedef struct { /* used to build alphabetical object index */
int index;
char *name;
} TABLEENTRY;
typedef struct
{
NXZone *mapZone;
LOCATION map_origin;
long map_scale;
long map_zeromeridian;
long top, left, bottom, right;
LOCATION topleft, topright, bottomleft, bottomright;
double map_width, map_height;
int mapWidth, mapHeight;
double mapWidthcm, mapHeightcm;
double originx, originy;
double scalefactor;
double mercatorscale;
char map_projection;
double v1, v2;
OBJECT **objectlist;
int objectno;
TABLEENTRY *nametable;
int tableentries;
char **namearray;
int db_objects; /* exported database information */
int db_visible;
int drawroutenumpoints;
LOCATION drawroutepoints[100];
int visiblelist[2000];
int visiblenumber;
} backupData;
These are the contents of the former NiCE NeXT User Group NeXTSTEP/OpenStep software archive, currently hosted by Netfuture.ch.