1
0
Fork 0
Commit graph

1011 commits

Author SHA1 Message Date
Peter Sadrozinski
feeaf602b7 added seperate-segments option to ogr-decode.
- generates an intermediate file for the whole linestring, but as seperate poly/texcoord pairs
- construct generates the union ofthe polys for the main clip routine
- intersection ot the original segment with the clipped mask gives the clipped segment
  This cuts ~75% of clipping time for really complex tiles.  8 tiles for Madeira went from
  4:45:00 to 1:04:00
2012-10-06 22:10:05 +02:00
Peter Sadrozinski
465fccc6a0 checkpoint - madeira builds fine with individual line segments 2012-10-06 22:10:05 +02:00
Christian Schmitt
df4e685c84 Remove fans/strips routines. We don't create fans anymore 2012-10-06 22:10:04 +02:00
Christian Schmitt
05e1670b56 Construct log output: some changes 2012-10-06 22:10:04 +02:00
Peter Sadrozinski
7e55efbb03 Optimize and cleanup
- fix really bad facelist generation.
- add a face area list in superpoly - each triangle area was calculated twice
- cleanup contruct_bucket - calls a function for each step.
  TODO : move groups of operations into their own files
         i.e. load, clip, elevation, shared edges, and output
2012-10-06 22:10:04 +02:00
Peter Sadrozinski
30573aa811 - Point nodes are now generated. Testing Madeira with tranisition shader enbled shows rocky cliffs, so I think thy are correct.
- some small optimizations made by storing triangle nodes in addition to triangle coordinates in TGSuperpoly.  More can be done, here.
- Brute force methos of generating alist of faces for each nodes that the face has is completely brute force.  Looking at original method, I think I can make it work, which should be a significant speedup.
2012-10-06 22:10:04 +02:00
Peter Sadrozinski
80ac1b38f5 - fixed malloc crash caused by - array index.
- fixed exception in find_point_inside.

NOTE: second fix can cause some gaps, as the polygon cleaning can result in a smaller poly than the original.  Need to clean polys after diff, before adding the result to the union.

I'm now able to build all of
adeira - and tile matchine looks good.  Some gaps visible when roads are cleaned incorrectly.
2012-10-06 22:10:04 +02:00
Peter Sadrozinski
22a8d28857 handle multiple tile construction in a single fgfs-construct run 2012-10-06 22:10:04 +02:00
Christian Schmitt
aa3abbe418 Some cosmetics for construct output 2012-10-06 22:10:04 +02:00
Peter Sadrozinski
7e1257ed8a - fixed t-junctions in roads - I was adding intermediate nodes after adding verticies from
neighboring tiles, but before adding the nodes from the result of clipping.
2012-10-06 22:10:04 +02:00
Peter Sadrozinski
ffc9db1b82 Checkpoint 2
- fixed tile matching using add_intermediate_nodes
- source code rearrangement phase 1 - remove a lot of libraries that are not used by other apps
- move some of the Buildtiles libraries that are used by other apps (and libs) into terragear lib directory
- debug message overhal - to show some progress.
TODO - not implemented yet
- caculate face nodes and save in superpoly (where the faces are stored)
- calculate node normals, and store in tg_nodes (where the nodes are stored)
TODO - bugs
- find_intermediate_nodes isn't working for a lot of roads - still many t-juntions making visible gaps
- flatten ocean nosed is also creating gaps
- there's a grey poly on madeira - need to investigate
2012-10-06 22:10:03 +02:00
Peter Sadrozinski
e6ac493395 checkpoint1
- all polys triangulated individually
- shared edge loading should be working, but there are still issues.
2012-10-06 22:04:44 +02:00
Christian Schmitt
3f996495c6 Issue 888: Fix for master branch: Correctly calculate the bucket center and radius.
The previous routine lead to offsets in the verts and thus to problems in the transition shaders.
2012-09-30 22:37:54 +02:00
Peter Morgan
4c975a0537 Doxygen and code documentation
Small patch to add some documentation
2012-09-26 18:11:36 +02:00
Christian Schmitt
fb6cee3bb0 Tweak PAPI/VASI object creation, add missing object types 2012-09-21 20:19:47 +02:00
Peter Sadrozinski
4cacaeb7f8 fix path construction when copying multiple objects in DoCustomObjects() 2012-09-21 10:23:56 -04:00
Christian Schmitt
133c0ef91b Improve buoys calculation for water runways 2012-09-19 10:53:28 +02:00
Christian Schmitt
42e4cefab3 Linear features: alternating green/amber lights were still missing.
Support for line light types is complete now.
2012-09-17 11:49:47 +02:00
Christian Schmitt
473992e684 Helipad shoulder support 2012-09-16 22:15:45 +02:00
Christian Schmitt
d81f2c36e1 Add an area around the helipad if the size is not square 2012-09-16 22:15:44 +02:00
Christian Schmitt
ccfde6914a Linear features: Yellow hold lights are unidirectional to the right of the line direction.
Implement this by creating a directional normal for these types.
2012-09-14 12:41:16 +02:00
Christian Schmitt
e8e1123db1 Helipads: correct light colour to yellow as in the spec, reduce amount
of circle lights and add edge lights with 5m spacing
2012-09-13 13:53:22 +02:00
Christian Schmitt
d83f1c265c Add textured lines to ogr-decode help output 2012-09-12 12:56:52 +02:00
Christian Schmitt
0957f0ccc8 Fix runway edge lights calculation. 2012-09-11 10:45:29 +02:00
Christian Schmitt
8f0d5130f5 Initialize variables 2012-09-07 15:03:31 +02:00
Christian Schmitt
356cdd17d4 Fix helipad generation and simplify the routine.
Add edge lights to the corners
2012-09-07 14:52:51 +02:00
Christian Schmitt
4808d2a2e5 Set default threads number to 1 and add switches to enable multithreading:
"--threads" enables autodetection of available cores
"--threads=x" sets a custom threads value

Update help test and remove duplicate dem option
2012-09-05 11:26:11 +02:00
Christian Schmitt
d80a4c2df5 activate external threshold light bar function and clean up 2012-09-02 12:52:35 +02:00
Christian Schmitt
7df8533e8e Remove individual threshold bar lights routines from the ALS functions 2012-09-02 12:52:35 +02:00
Christian Schmitt
e118d8ec3b Adapt threshold lights routine to displaced threshold generation
move threshold bar creation here and make the routine generic for
all ALS that use threshold bars
2012-09-02 12:52:30 +02:00
Christian Schmitt
25d93d37eb Create centerlines lights over the reciprocal displaced thresholds, too 2012-09-01 12:00:01 +02:00
Christian Schmitt
b0bb0ab9a0 Change edge lights routine to work with displaced thresholds as well 2012-09-01 11:57:28 +02:00
Christian Schmitt
7774de4939 Adapt to SG changes 2012-08-26 22:22:40 +02:00
Christian Schmitt
a35008f061 Use gen_corners function for the vector calculation as well 2012-08-16 13:03:51 +02:00
Christian Schmitt
90795f9d05 Fix the runway centerline, threshold and edge lights. They still used calculations in ft,
which were no longer compatible and led to wrong results.
Also, apply some more of the FAA specs on the edge lights now.
2012-08-15 21:22:13 +02:00
Christian Schmitt
84e88858b1 Further tweak the displaced threshold routine for short variants.
Explicitly fixes EDCJ but many more, too
2012-08-12 12:44:15 +02:00
Christian Schmitt
9918956c45 Fix displaced threshold calculation and convert measurements to meters 2012-08-12 09:52:54 +02:00
Christian Schmitt
9604ec8fad genapts850: fix a bug that can lead to the parser reading beyond one airport definition
and thus create another airport instead.
2012-08-09 18:31:47 +02:00
Christian Schmitt
4293c00b73 genapts850: make sure we do not hang forever in a parse loop
when there are actually no airports to parse within the bounding box
2012-08-06 19:41:36 +02:00
Christian Schmitt
abece63b5d Put default max_slope value for airports back to 2%. We have a command line option to increase this, if necessary 2012-08-06 12:58:11 +02:00
Christian Schmitt
c7a18cb501 Cleanup the genapts850 lights routine and move duplicate code into
a seperate function
2012-08-01 11:08:31 +02:00
Christian Schmitt
3f91f11115 genapts scheduler: fix a buffer overflow. 512 bytes should be enough for everyone :) 2012-07-09 13:03:53 +02:00
Christian Schmitt
7d919e2329 bug #792: second try to fix the windows copy issue 2012-07-09 11:05:17 +02:00
Christian Schmitt
2a7c1bc7fe Bugfix: issue #792 should be fixed by this (hopefully) 2012-07-08 18:32:32 +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
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
Peter Sadrozinski
1090e602c2 Stability checkpoint
- When adding intermediate nodes, keep linear feature nodes list seperate from the rest, as they are
  seperate accumulation buffers.
- Revert expand poly by 5cm.  It broke more airports than it fixed :(
- Going back to GPC as well.

Feature Fixes
- finally got around to the last segment in closed linear features.
  I think I am feature complete now.

Remaining issues.
- I still see terrain holes between the base and clearing polys when an airport traverses a tile
  boundary.  I'm not sure where to start here, as genapt doesn't really know about the tile boundary.
  (Is the clearing part of the tile construction? - need to look into this)
)
2012-03-25 23:54:16 +02:00
Peter Sadrozinski
372cbdf38f Added tgPolygonExpand() to grow / shrink polygons using clipper library.
- used to expand pavement polygons so they overlap slightly (5cm)
  This prevents slivers being formed between pavements when designers
  add their own taxiway shoulders, and try to line them up instead of
  placing the boundary 'under' the taxiway.
- also useed to create the default airport base.  This allows the base
  to follow the taxiways better - allowing concave boundaries, instead
  of the previous convex hull.

Memory leaks squashed.  Fixed several memory leaks reported by valgrind.
- GenApt850 can now run forever (or at least until it segfaults)

Very long linear segments in linear features are now broken up to
avoid triangulation errors

Added back some clipper boolean operations (diff and union).  These can
be used instead of the GPC functions by using tgPolyGonDiffClipper and
tgPolygonUnionClipper.  GPC had crashed in a few airports when clipping
linear features.  Using the clipper routines don't crash.  More investigation
is needed.  It may be something about the polygons being clipped more that
the clipping action itself.  In these problem airports, there are some
linear features extending far from the airport.
( I had thought those issues were fixed :( )

More warning cleanups.
2012-03-25 23:54:16 +02:00
Peter Sadrozinski
00afd0cb17 - I forgor to include my preliminary support to allow triangleJRS to return
success / failure.  I have some local changes to the lib to support it, but
  they aren't verified.  Checking in the support, that always returns success.
- allow clipper and GPC libraries to be included together.
  I need clipper for expanding polys, but I'm still using GPC for clipping.
2012-03-25 23:54:15 +02:00
Peter Sadrozinski
37a46c4075 Stability checkpoint for genapt850
- break up and expand shoulder polys, so they overlap runways.
  This keeps cracks from forming between the shoulder and runway
  do to roundoff error
- Add verbose option to polygon_tesselate functions to aid in debugging
  can set at runtime to produce triangulation output for just 1 poly.
- add remove_small_cycles to poly cleanup routines before triangulation
- more warnings cleanup in ClosePoly.cxx
- add more output in normal execution path, as some airports can go for
  hours without printing any status.  Hard to tell if it's locked up
2012-03-25 23:54:15 +02:00
PSadrozinski
27c31404ca Compile warnings cleanup round 1 2012-03-25 23:54:15 +02:00
PSadrozinski
de5dbfd6a5 Bring in textured roads, streams, and railroads.
- use ogr-decode with new option --texture-lines to generate polygons
  with texture info
- possible fix for triangulation errors when triangulating each poly by
  itself.
  (It's worked for me, but more testing needed)
- Still using GPC for clipping.  CLIPPER adds time, and looks to have
  more errors.  More testing needed here as well.
  Simply edit the #define in polygon.h to choose clipping library.

Major TODOs:
1) There is 1 tile (with the most heavy OSM data) that blows up, and I get huge
   road textured polys all over the place.  Must be an overrun somewhere.
2) Lake / Ocean smoothing.  The current algorithm handles all nodes at once.  I'm
   going to need to modify for the new structure
3) neighbor tile matching.  This actually doesn't look so bad without it implemented.
   The old method would add points in the triangulator.  If a point was added on the
   tile boundary, a t-junction would be created.  Points are no longer added in triangulation,
   so the polygon splitting in ogr-decode should make the points equal on each side of
   the tile boundary.  (I haven't seen any t-junctions, at least)
4) cleanup - this is a bit of a mess.  I really want to refactor to make the code more understandable.
2012-03-25 23:54:15 +02:00
PSadrozinski
a6058dff58 - brought in clipper (alternative to gpc)
- moved poly_extra from genapts to polygon library (add intermediate nodes)
- change TGPolyList to arrays of superpolys and texparams in preperation for
generating tex coordinates for line data
2012-03-25 23:54:15 +02:00
PSadrozinski
bc3ecf8fe9 - Add --texture-line option to ogr-decode to generated polygons with texture parameters
- change cout to SG_LOG so we can turn down the verbosity
2012-03-25 23:54:15 +02:00
PSadrozinski
f2af9db3c8 ran uncrustify on Polygon Library files. Makes it much more readable.
ran a test with all tools (decode, genapts and construct) succesfuly.
2012-03-25 23:54:15 +02:00
PSadrozinski
9add3fdaae moving texparams header from genapt to poly library. Need it for new construct. 2012-03-25 23:54:15 +02:00
Christian Schmitt
18b2c8a51a Correctly position the PAPI lights around the center and enable
left/right-handed PAPI versions
2012-03-25 23:54:15 +02:00
PSadrozinski
b583e8d0f0 use polygon-offset effect to render linear features 2012-03-25 23:54:14 +02:00
PSadrozinski
deaebbeb4d conditionaly compile native clipper lib poly optimizations 2012-03-25 23:54:14 +02:00
Christian Schmitt
f77da29398 forgot to add length extend calculation to the new gen_wgs84_area
function. Also fixed the runway area functions accordingly.
2012-03-25 23:54:14 +02:00
Christian Schmitt
f7ca9005ce Double the char value in the signs parser to prevent an
out of bounds segfault.
2012-03-25 23:54:14 +02:00
Maxime Guillaud
fd597739ea Increase ARRAY_SIZE_1 (previous value was too low and genapts would crash processing ENAL).
Add some code to catch this issue and abort with a helpful error message next time.
2012-03-25 23:54:14 +02:00
PSadrozinski
881c4e131b fix for FIndAirport to handle heliports 2012-03-25 23:54:14 +02:00
Christian Schmitt
16ff1e89cc Add runway shoulders support.
This was harder than expected as the shoulders were often partially
covered by runway polygons. This was caused by inaccuracies introduced
by the calculation of dimensions from the runway center.

Now we create shoulders if set in apt.dat. If no shoulders are set,
a 1m broad stripe is added to concrete and asphalt runways to make
the blending runway-airport surface more visually appealing.
2012-03-25 23:54:14 +02:00
Christian Schmitt
09352611d5 Add a second gen_wgs84_area function as preparation for shoulders.
This function uses the 2 runway end points as supplied by apt.dat,
which eliminates some inaccuracies that occur when calculating with
only one center point.
2012-03-25 23:54:14 +02:00
PSadrozinski
b24bcbb1ee Remove OSG capabilities and libraries. 2012-03-25 23:54:10 +02:00
Christian Schmitt
a5a14e2330 Initialize variables and remove unused ones 2012-03-25 23:53:50 +02:00
PSadrozinski
dfb4ece77e fixed 2 crashes.
- experimental : I haven't seen that this change has any detrimental effectt, and it avoids a
   crash in triangle library if I don't split long edges before diffing the accumulator to
   generate base_poly.  Side effect could be t-junctions, but preliminary look at KATL seemed to give
   the same (poor) effect - sometimes there are vertical gaps between the airport base and the terrain.
 - Bad data on a few airports - Linear feature definition followed immediately by a
   termination node - can't have a single point for linear feature definition, so I discard it.
2012-03-25 23:53:49 +02:00
PSadrozinski
06d0d8bdd9 added support for --start-idx so I can restart after a failed airport. 2012-03-25 23:53:49 +02:00
Christian Schmitt
a377f11dad Fix a segfault related to water runways 2012-03-25 23:53:49 +02:00
Christian Schmitt
ea0fd7d9dd Do not error out on correct runway surface 2012-03-25 23:53:49 +02:00
Christian Schmitt
fcdeaae2fd Remove a duplicate function and fix a segfault when using the
--airport option.
2012-03-25 23:53:49 +02:00
PSadrozinski
595a190dd3 - min/max lat/lon command line options - can try to parse entire apt.dat
- lot's of cout -> SG_LOG changes so genapt produces minimal output
2012-03-25 23:53:49 +02:00
PSadrozinski
db1a734b19 Add an optimization to BuildBtg - the accumulator is kept in the native
clipping library format, so it doesn't have to be converted / reconverted
between clipping and TGPolygon types for each operation - shaves about
12 seconds from KATL build.
2012-03-25 23:53:49 +02:00
PSadrozinski
59b534616f Fix for using clipper library
- it doesn't fix my donut problem - still need to fix degenerate nodes.
2012-03-25 23:53:49 +02:00
Christian Schmitt
33d88b8c27 Write out the taxiway sign headings 2012-03-25 23:53:49 +02:00
Christian Schmitt
812dd638af Rework the runway designation code. All put into one function.
This does now support literal runway names like "07" instead of "7".
Also support upcoming "XX" designation which marks a runway as
non-numbered. Testing needed.
2012-03-25 23:53:49 +02:00
Christian Schmitt
10260917f8 adapt the help output a bit 2012-03-25 23:53:48 +02:00
PSadrozinski
2e07528da3 Added support for clipper library
- still some issues, but it 'mostly' works
   (change #define in src/lib/polygon to select clipper library)
 - added performance statistics
2012-03-25 23:53:48 +02:00
PSadrozinski
4fb1944964 Adding Clipper library (experimental) 2012-03-25 23:53:48 +02:00
Christian Schmitt
dc3449a860 Remove texture coordinates length calculations from certain places.
The width calculation is corrected now and should fix distorted
runway textures.
Hopefully we can get rid of this width mumbo-jumbo soon, too.
It has to stay for now as I found no solution.
2012-03-25 23:53:48 +02:00
PSadrozinski
1663620e35 command line option --airport working. Tested with full apt.dat 2012-03-25 23:53:48 +02:00
PSadrozinski
3ba27cd481 Added Airport boundary support.
- needs testing on lots of airports.  I'm uncomfortable with expanding
  concave polys by 20 meters.  I really need to find a safe polygon expander.
2012-03-25 23:53:48 +02:00
Christian Schmitt
33c92f60f6 Fix a boundary size bug. All boundaries with < 2 nodes are discarded now 2012-03-25 23:53:48 +02:00
Christian Schmitt
8ebbb39893 generate simple runway including threshold 2012-03-25 23:53:48 +02:00
Christian Schmitt
c551e81136 add water runways. The corresponding buoys will follow into fgdata :) 2012-03-25 23:53:48 +02:00
Christian Schmitt
ec6b862730 ...and also remove bug work-around scripts 2012-03-25 23:53:48 +02:00
Christian Schmitt
ec3aa2a623 Now that the important stuff is ported, remove old files
that are no longer needed
2012-03-25 23:53:48 +02:00
PSadrozinski
051497bede Added taxiway/runway sign link creation 2012-03-25 23:53:48 +02:00
Christian Schmitt
e9a266fdf1 Helipads are also back, including some light 2012-03-25 23:53:42 +02:00
Christian Schmitt
1990ce6806 The size of the runway base should depend on the runway width 2012-03-25 23:53:32 +02:00
Christian Schmitt
504f5ef46c Refactor the runway code and exclude some math functions
from the class for general use
2012-03-25 23:53:28 +02:00
PSadrozinski
fdb37b36c7 added linked objects for beacon and windsock support.
taxiway signs pending...
2012-03-25 23:53:18 +02:00
Christian Schmitt
b146149877 Port airport light objects support 2012-03-25 23:53:09 +02:00
Christian Schmitt
155d405ee2 Again, lower the light nodes above the terrain. This needs to be tested 2012-03-25 23:53:05 +02:00
PSadrozinski
81ec458cd7 lights are much better, but not perfect 2012-03-25 23:53:05 +02:00
PSadrozinski
39ea640499 cleanup airport.cxx and simple fix in linear features 2012-03-25 23:53:05 +02:00
PSadrozinski
4df32f7aed First stab at taxiway lights 2012-03-25 23:53:05 +02:00
Christian Schmitt
ce08e218f6 Port runway lights over to the new framework 2012-03-25 23:53:00 +02:00
Christian Schmitt
6a6052f2f5 Fix overrun generation, broken by last commit 2012-03-25 23:52:53 +02:00
Christian Schmitt
d573b38430 Simplify runway code a bit. 2012-03-25 23:52:53 +02:00
PSadrozinski
6f7df8da5e infrastructure for lights 2012-03-25 23:52:53 +02:00
PSadrozinski
5e1ed20e4d Fix Linear feature when angles is close to 180 or 0 degrees.
- it doesn't hang anymore, but it generates artifacts.  more study needed
2012-03-25 23:52:53 +02:00
Christian Schmitt
b0a1f38ccb Make runway textures work 2012-03-25 23:52:47 +02:00
Christian Schmitt
761a71ba7b Bring both 850 work (new taxiways and new runways) together. 2012-03-25 23:52:43 +02:00
PSadrozinski
ecbfc64b14 Added per linear feature width capability, so double lines are twice as wide, etc... 2012-03-25 23:52:43 +02:00
PSadrozinski
6dcf165438 linear features now have their own function to calc tex coords,
and the runway function scales.
Now, U should always be 1 width, and length is offset from minv.
This allows 1 polygons texture to start where the previous finished,
making it appear the texture flows continuously
2012-03-25 23:52:43 +02:00
PSadrozinski
c941c02c13 rams cp 2 - better, but not perfect 2012-03-25 23:52:43 +02:00
PSadrozinski
a547a9ba00 near feature checkpoint 1
- cut in to the terrain
- using asphalt texture, need a test texture to check texcoords
- need offset - it's hardcoded for pavement features, so centerlines are off
2012-03-25 23:52:43 +02:00
PSadrozinski
47b1b05ac7 Checkpoint : Linear features build their own superpoly_list on Finish() with
correct texture and heading for each quad.  Still need to clip them against
their own accum during build btg
2012-03-25 23:52:43 +02:00
PSadrozinski
7d729633c1 Texturing works 2012-03-25 23:52:43 +02:00
PSadrozinski
ef486df526 Adding initial genapts 850 support 2012-03-25 23:52:38 +02:00
Christian Schmitt
324e6fc30f Make size of runway base depend on its width 2012-03-25 23:52:31 +02:00
Christian Schmitt
6ce3e16d4b Take care of simple runways, too 2012-03-25 23:52:31 +02:00
Christian Schmitt
c43ebccb7a Lower the light nodes above the terrain. This needs to be tested 2012-03-25 23:52:31 +02:00
Christian Schmitt
b1264d5134 Support different runway edge light intensities 2012-03-25 23:52:31 +02:00
Christian Schmitt
dfd63f3fd8 water runway support 2012-03-25 23:52:31 +02:00
Christian Schmitt
d1aece0be3 Helipad lights support 2012-03-25 23:52:31 +02:00
Christian Schmitt
fa10efa1d0 Possibility to create runways without a designation (empty threshold) 2012-03-25 23:52:31 +02:00
Christian Schmitt
7c8b6781f3 Make helipads work 2012-03-25 23:52:27 +02:00
Christian Schmitt
b6c1b2c609 Add UK runway markings support. While at it, put most of the markings
logic into the markings function.
2012-03-25 23:52:10 +02:00
Christian Schmitt
ca7a097f9c clean up runway parameter calcs 2012-03-25 23:52:10 +02:00
Christian Schmitt
2eb8428a59 Read and create airport light objects like PAPIs and calculate their light vectors. 2012-03-25 23:52:10 +02:00
Christian Schmitt
785c4afcda Move the whole genapts over to the metric system.
Now we calculate with metric values internally, however, the
fixed feet values in the source will have to be converted or
be used with SG_FEET_TO_METER for now.
2012-03-25 23:52:10 +02:00
Christian Schmitt
2fff6d803e Work on supporting 850 light definitions.
This is still WIP, but lots of stuff already working.
2012-03-25 23:52:09 +02:00
Christian Schmitt
0bffde0f2d Make stopways work again, too 2012-03-25 23:52:09 +02:00
Christian Schmitt
66fc88c666 Implement individual runway markings for both ends.
Simplified code a lot, removed runway-specific files with
a lot of duplicate code. Put marking logic into
functions.
2012-03-25 23:52:09 +02:00
Christian Schmitt
8ac29ac8a8 Implement two runway end designations for precision runway 2012-03-25 23:52:00 +02:00
Christian Schmitt
0e83e180fc Introduce 2nd variable for other runway end designation.
Some cleanup, too.
2012-03-25 23:51:38 +02:00
Christian Schmitt
83144f66a3 get runway center calculation right 2012-03-25 23:51:38 +02:00
Christian Schmitt
0dddd26b91 first work on reading apt.dat 8.50 2012-03-25 23:50:22 +02:00
PSadrozinski
1eae25d17a removing automake files - just updating cmake build files from now 2012-03-25 23:37:26 +02:00
Maxime Guillaud
e37fc96f4d Proper handling of lowercase filenames by hgtchop. 2012-02-27 13:37:29 +01:00
Maxime Guillaud
e4c19fefee Increase buffer size for the client-server messages and consistently use MAXBUF. 2012-02-27 13:37:08 +01:00
Martin Spott
74ae44ed47 Adjust to process/materials 2011-11-22 15:37:43 +01:00
Martin Spott
ef2dbe235c Update to common practice 2011-11-22 15:24:47 +01:00
Frederic Bouvier
90ed31b46b Additionnal Win64 dependency 2011-11-10 20:07:37 +01:00
James Turner
7fb875b44b Fix release build issues with raw2ascii under cmake 2011-11-05 16:00:40 +00:00
James Turner
324ce8acd7 Fixes to config.h generation, detect rint() 2011-11-02 19:09:30 +00:00
James Turner
4914cb0645 Fix skipping of files when scanning polygons, to match previous behaviour. 2011-10-27 17:53:18 +01:00
Christian Schmitt
a7054d72b3 Better do not try to use btg.gz files as polygon source 2011-10-27 10:15:27 +02:00
Christian Schmitt
1c47d095b7 remove unused variables and functions 2011-10-27 09:04:08 +02:00
Frederic Bouvier
1a1e984577 Build fgfs-master and tgvpf under Windows 2011-10-26 22:48:14 +02:00
Frederic Bouvier
9a8635a4a3 Build poly2ogr under Windows 2011-10-26 22:22:23 +02:00
Frederic Bouvier
e8e4d885c5 Build under Windows 2011-10-26 22:19:01 +02:00
James Turner
afe4be595f Modernise the terrafit file handling code. 2011-10-26 20:29:59 +01:00
Christian Schmitt
17dbaffadd Remove all plib deps completely. TG is now plib-free :) 2011-10-25 16:20:31 +02:00
James Turner
881d83d245 Further de-PLIB-ification. 2011-10-25 12:03:04 +01:00
Christian Schmitt
d8d3be6fb1 Change SG linking order and add more tools to the cmake build system
that compile now. Also change .gitignore files to include some new
binary names
2011-10-25 01:11:31 +02:00
Christian Schmitt
89ca2ae1e4 Add cmake install targets 2011-10-24 18:07:35 +02:00
James Turner
17b15a1824 Use detected GDAL include path. 2011-10-24 13:46:15 +02:00
James Turner
e59d2d3e47 Use new SimGear helpers to simplify some code. 2011-10-24 13:46:15 +02:00
James Turner
99562cfde6 CMake support for GDAL / building OGR decode. 2011-10-24 13:46:15 +02:00
James Turner
4e39bff58a Linux fixes for Cmake support. 2011-10-24 13:46:15 +02:00