-#if 0
- // P13 (Globe, AZ)
- // lon = -110.6642442;
- // lat = 33.3528903;
- // heading = 102.0 * DEG_TO_RAD;
- // length = 1769;
- // width = 23;
-
- // KANE
- lon = -93.2113889;
- lat = 45.145;
- elevation = 912 * FEET_TO_METER;
- heading = 270.0 * DEG_TO_RAD;
- length = 1220;
- width = 23;
-
- gen_runway_area( lon * DEG_TO_RAD, lat * DEG_TO_RAD,
- heading, length, width, nodes, &count );
-
- fgBucketFind(lon, lat, &b);
- printf( "Bucket = lon,lat = %d,%d x,y index = %d,%d\n",
- b.lon, b.lat, b.x, b.y);
-
- index = fgBucketGenIndex(&b);
- fgBucketGenBasePath(&b, base);
- sprintf(path, "%s/Scenery/%s", argv[1], base);
- sprintf(command, "mkdir -p %s\n", path);
- system(command);
-
- sprintf(exfile, "%s/%ld.node.ex", path, index);
- sprintf(file, "%s/%ld.poly", path, index);
- printf( "extra node file = %s\n", exfile);
- printf( "poly file = %s\n", file);
-
- // output extra nodes
- if ( (fd = fopen(exfile, "w")) == NULL ) {
- printf("Cannot open file: %s\n", exfile);
- exit(-1);
- }
-
- fprintf(fd, "%d 2 0 0\n", count);
- for ( i = 0; i < count; i++ ) {
- fprintf( fd, "%d %.2f %.2f %.2f\n", i + 1,
- nodes[i].lon * RAD_TO_ARCSEC, nodes[i].lat * RAD_TO_ARCSEC,
- elevation);
- }
- fclose(fd);
-
- // output poly
- if ( (fd = fopen(file, "w")) == NULL ) {
- printf("Cannot open file: %s\n", file);
- exit(-1);
- }
-
- // output empty node list
- fprintf(fd, "0 2 0 0\n");
-
- // output segments
- fprintf(fd, "%d 0\n", count);
- for ( i = 0; i < count - 1; i++ ) {
- fprintf( fd, "%d %d %d\n", i + 1, i + 1, i + 2 );
- }
- fprintf( fd, "%d %d %d\n", count, count, 1 );
-
- // output hole center
- fprintf( fd, "1\n");
- fprintf( fd, "1 %.2f %.2f\n", lon * 3600.0, lat * 3600);
-
- fclose(fd);
-
-#endif
-
-
-// $Log: main.c,v