1
0
Fork 0
Commit graph

911 commits

Author SHA1 Message Date
Christian Schmitt
6e5c55fc24 Allow compiling against shared SG libs.
This needs testing.
2012-07-07 15:03:10 +02:00
Peter Sadrozinski
a9d810d447 remove hard coded work directory in multicore api 2012-07-01 04:33:52 -04:00
Frederic Bouvier
107f5cefd6 Fix windows build 2012-06-28 08:43:09 +02:00
Christian Schmitt
0f690ff621 runway/taxiway: add dry lakebed texture 2012-06-24 17:49:22 +02:00
Christian Schmitt
c31247f51a Add POCO dep to the cmake files 2012-06-17 10:51:58 +02:00
Christian Schmitt
5da5dc29be Add signs size support to the STG files 2012-06-17 10:47:45 +02:00
Peter Sadrozinski
83f6532af0 Add multicore support for genapt850.
- fix launch

- fix taxiway debug uninitialized variable

- fixed issue when child crashes, not timed out - detect the error
when we get notified that the socket has data, but no line is received
2012-06-16 09:09:55 -04:00
Christian Schmitt
18fd0e9546 Simgear 'route' code is unused now. 2012-06-11 13:13:55 +02:00
Christian Schmitt
873fff2afc Fix FSF address in headers and add a proper header to GenAirports850/main.cxx 2012-05-05 12:20:21 +02:00
Christian Schmitt
09d7be09c5 Do not print out terrafit help text two times 2012-04-25 21:10:07 +02:00
Christian Schmitt
16a0a104c3 Some output cosmetics 2012-04-16 10:41:00 +02:00
Peter Sadrozinski
7c70cb8da7 Add support for legacy taxiway '10' 2012-04-14 17:08:52 -04:00
Christian Schmitt
5a80fe638b Partially revert commit b7ec098859
The heading calculation was right. I was unaware of stg using
counter-clockwise notation :(
2012-04-12 23:21:44 +02:00
Christian Schmitt
b7ec098859 -Fix taxisign heading calculation leading to wrong values in certain cases
-Unify space between yellow lights
2012-04-12 12:49:00 +02:00
Peter Sadrozinski
a7e6f7fa1b - Build runway shoulders at the same time as runway segments
- hook up --dump-rwy=x to shapefile generation for debugging runway
and shoulder polys using qgis
2012-04-11 18:35:27 -04:00
Christian Schmitt
a83bf32c2c Fix Windows-build linking issue and unify CMake files a bit 2012-04-07 14:57:22 +02:00
Christian Schmitt
451e63f84e Test for contour parts of zero size and ignore them,
which otherwise leads to a segfault.
2012-04-06 13:54:26 +02:00
Christian Schmitt
ab931442d0 Small log cosmetics :) 2012-04-04 22:05:10 +02:00
Peter Sadrozinski
b159a39d59 take the fgfs-construct default log level down a notch 2012-04-01 11:03:05 -04:00
Peter Sadrozinski
cf5bb76ee8 Use SGTimestamp for statistics gathering.
Use time(0) and standard C++ <ctime> for date / time
2012-03-31 22:09:18 -04:00
Peter Sadrozinski
7777fc4bc2 one more boneheaded fix - don't access the timevals if they aren't included 2012-03-31 11:50:30 -04:00
Peter Sadrozinski
b0a7b60502 remove time statistics from windows build
will investigate porting gettimeofday later
2012-03-31 11:43:45 -04:00
Peter Sadrozinski
dabe2c131e better fix for sys/time.h windows problem in genapt850 2012-03-31 11:22:48 -04:00
Peter Sadrozinski
daf7994c1c fix for time.h on Windows 2012-03-31 11:15:47 -04:00
Peter Sadrozinski
c1c9923892 fix duplicate point test, and casts for fmod() - should fix windows build 2012-03-31 11:00:05 -04:00
Peter Sadrozinski
512693f001 hopefully fix windows build 2012-03-31 10:31:37 -04:00
Christian Schmitt
01814b3e3e Set RWY_YELLOW_PULSE_LIGHTS as name for blinking hold-short lights.
Support for this is coming in SG and fgdata
2012-03-30 19:23:30 +02:00
Christian Schmitt
7424139772 Fix the stopway texturing. Cleanup a bit.
This needs negative pct values.
2012-03-29 21:08:40 +02:00
Christian Schmitt
449720c858 Start fixing Windows build issues 2012-03-29 21:08:08 +02:00
Christian Schmitt
6b2826050b Make sure the runways are long enough for desired markings.
This prevents texture glitches on too short runways where
there is simply not enough space for all the needed runway parts.
2012-03-26 10:07:34 +02:00
Peter Sadrozinski
59d30a34e8 A fix for LFPG problem in expand poly. If there are dups when expanding,
the resultant poly was huge, and I could run out of memory.
For closed polys, remove_dups() after snapping.

Also cleaned up the dump_xxx debug command line switches.
- now 1 based, not 0.
- debug_cp directory is the datasource name, so the directory need
  not exist before running genapt850.
2012-03-25 23:54:18 +02:00
Peter Sadrozinski
225e3e1491 - modified grid size from 1 cm to 1 mm
- snap runway and pavement polys to grid after adding slivers.
2012-03-25 23:54:18 +02:00
Peter Sadrozinski
0544854dc9 update clipper to 7.3 release 2012-03-25 23:54:17 +02:00
Peter Sadrozinski
cbea4335f4 Instead of snapping whenever clipper converts a poly, just snap before clipping,
and after  intermediate nodes are added.
If we snap before intermediate nodes are added, we generate extra slivers, as
the proximity for node insertion may fail when the extra node is snapped away
from the line we are checking
2012-03-25 23:54:17 +02:00
Peter Sadrozinski
effbefde41 onvert cout to SG_LOG in lights.cxx.
remove unused dead code in airport.cxx
2012-03-25 23:54:17 +02:00
Peter Sadrozinski
474c126a0c Remove unused convex_hull.hxx / .cxx, now that we can expand polys
using the clipper library
2012-03-25 23:54:17 +02:00
Peter Sadrozinski
97aac36c39 Add material_prefix to runway class, so we don't have to pass it around so much 2012-03-25 23:54:17 +02:00
Peter Sadrozinski
d0d30fbd52 More consolidation for runway generation
- remove gen_overrun, and the 'generic' gen_tex functions.
- removed rwy_common.cxx

NOTE: now, helipads don't share the same generate function as runway sections.
Maybe later they can be remerged...
2012-03-25 23:54:17 +02:00
Peter Sadrozinski
f5e1084eb8 Remove gen_runway_marking(). Trying to minimize the number of functions needed to generate a runway,
which should make it easier to understand the code.  If there are parts that can be generalized, I'll
pull these out.  gen_runway_marking was only called from one place however...
2012-03-25 23:54:17 +02:00
Peter Sadrozinski
051e73da6a Removing alt_m from all the BuildBTG functions. It isn't used byt SimGear
int the geo_direct_wgs_84() calls.
2012-03-25 23:54:17 +02:00
Peter Sadrozinski
f0a7f39e7b A bit of a re-work (again) but looks to be worth it.
Instead of cleaning polys after clipping, to get good triangulation, try to
clean them before clipping, snap the verticies to 1 1cm x 1cm grid, and
merge any resultant slivers back into adjacent polys.
This is very similar to how fgfs-construct worked.

Although the previous methos only failed on 3 airports, the results weren't
very good.  There were lots of cracks, and mmissing triangles, as the polys were
cleaned.

New methos freezes on two airports during base triangulation, and crashes on four.
I think the quality of the generated airports overcomes the slight regression.

I also added some debug switches so I don't have to keep rebuilding from source
to debug crashes.  --dump-rwy=xxx --dump-pvmt=xxx, --dump-feat=xxx and --dum-base=1
can be used to create shapefiles to debug the particular polys before clipping.
Currently, there needs to be a cp_debug directory to place the shapefiles into.
Probably need better debug infrastructure going forward...

NOTE: I turned off runway shoulder generation in this build.  Polygon snapping for runways,
helipads, and shoulders not implemented yet.  This may help on the failing airports.
This is next on my todo list.
2012-03-25 23:54:17 +02:00
Christian Schmitt
0788bf0fcb Runway VASI support 2012-03-25 23:54:17 +02:00
Christian Schmitt
9f57a49382 Correctly output the numbers of built features 2012-03-25 23:54:17 +02:00
Christian Schmitt
5fabae1dab Bring some order into runway approach lights code 2012-03-25 23:54:16 +02:00
Christian Schmitt
2d490d7230 Fix Calvert approach lights only being created for the
reciprocal side of a runway.
2012-03-25 23:54:16 +02:00
Peter Sadrozinski
071d98b3bc Lot's pf success on the quest to a full file parse.
Just three airports crashed, and no hangs.  One of the crashes is still NZSP
I don't know if I'll fix this soon.  It's the south pole problem with stuff
crossing the IDL.
- Added dome debug support for generating shapefiles from TGPolygon.
  This allows directly creating shapefiles instead of chopping a poly, then
  having to run poly2ogr on it.  The API is flexible, allowing multiple
  datafiles, and layers open simutaneously, and the features in the shapefiles
  have a description field that can be set.
- Added a restart-id= which allows a bash script to check the exit value of genapts,
  and automatically restart on the airport after the one that crashed.
  I've included an example script I have used.
- Stability fixes:
  1) actually, this is both stability, and graphical fix.  Some airport linear
     features and polygon contours were using bezier nodes for straight lines.
     When the control point lies just outside the line, the parser would attempt to
     draw a 'hook'  unfortunately, some of my calcs return NAN, and sometimes you just
     get crazy looking polys to attempt to clip - not good.
     Fix is to check cubic and quadratic nodes to see if they should really be linear.
     Substitute linear segments where apropriate.
  2) Along the same line as 1, There are some really short bezier segments, that were
     getting subdivided into the hard coded 8 segments.  Now, if the approximately linear
     distance of the curve is less than 4 meters, the curve is broken into 1/2 meter segments.
     Likewise, if the curve is greater than 800 meters, the curve is broken into 100 meter
     segments.
  3) Sometimes, during clipping, degenerate ontours are created.  Although these are cleaned
     before triangulation, there were still issues with generating the accumulation poly with
     the union operator, causing a crash.  I now simplify, and reduce degeneracy on all polys
     before clipping against the accumulator.
- Extra special bonus - successful completeion of an airport is printed in green :)
2012-03-25 23:54:16 +02:00
Christian Schmitt
a40b72b15b Only generate helipad lights if the apt.dat entry says so 2012-03-25 23:54:16 +02:00
Peter Sadrozinski
2dac4a87e5 stability check
- ran through the last commit, and only 10 airports crashed / locked up.
- EICL, SSPK, and LFBT fix was to simplify the base polygon during cleaning
  reduce_degeneracy() could also be used to fix the issue
  2 polygons clipped against each other shared a vertex.  This causes the
  resulting contour to have a duplicate point with different line segments.
  Luckily, clipper's polygon simplification cleans this up by adding a
  hole contour.  In the above airports, triangulation suceeded, but I'm
  not 100% convinced it will work for all cases.  reduce_degeneracy() will,
  at the expense of modified geometry (very noticible)
- EGLW and SWCH (I think - can't read my own writing) were fixed by expanding
  the user defined boundary by 2 meters for the base, and 5 meters for the
  clearing.  These 2 airports had the user defined boundary touching the exact
  airport layout.  When the base was diffed with the accumulation buffer, the
  resulting polygon was NIL.
  Starting a whole new stability test from the beginning to check for
  regressions.  Down to 5 airports with isses left.
2012-03-25 23:54:16 +02:00
Peter Sadrozinski
ff352fad28 remove_dups() cleanup function would miss 2D dups with different elevations.
- created a new function that will take the higher elevated dup
(as most are ar -9999.0 at initialization.  Use the one with real elevation data)

Fixes UMNB
2012-03-25 23:54:16 +02:00
Peter Sadrozinski
9f96783df6 another stability checkpoint
- found a bug in the polygon library: remove_small_cycles.
  If the cycle wrapped around the end of the point list, it went undetected.
  I created a new detection method, that is slower, but handles this case
  FIXES DNAK
- Added a new polygon cleaner function remove_spikes
  triangulation library doesn't like when segments for close to 0 degree
  angles.  When such an angle is seen (<.1 degree), the point is removed
  FIXES LFKJ (linear features) and YBAF (pavements and base polys)
- I also modified the runway shoulder code to use 11+ meter width.
  I was having problens with polys very close to this leaving a gap.
  The code needs revisiting, since I now see z-fighting betwen the shoulder
  and grass border.

From this point on, all my checkins need to get past the previous checkins
airport.  I am now parsing past LFSB
2012-03-25 23:54:16 +02:00