Adding some more intelligence to the AI system step 2: Added a system to
detect interfering taxi routes and added a "hold position" instruction to
make one of two conflicting aircraft wait until it's route is cleared again
andy [Thu, 14 Sep 2006 18:18:33 +0000 (18:18 +0000)]
Helicopter update from Maik:
More realistic calculation of vortices at the blades and therefore
real airfoil parameters can be used now (not to be mixed up with the
vortex ring state which is still not simulated), ground effect is now
continuous e. g. at buildings, calculating of the rotor in more than 4
directions, better documentation of the airfoil parameters.
- Well I finally licked it, the clipping works great now, in 16 and 32
bpp mode, on 2d and 3d panels.
- I tried glScissors, didnt work because clipping was done in screen
co-ordinates.
- Stencil buffer methods worked great for 2d panel, but messed up 3d
panels,(depth buffer problems I think), and only worked in 32 bpp mode.
- I then tried clip planes , and so far it appears to work with no
problem, and no framerate drop like I had with the stencil buffer
method...
andy [Mon, 28 Aug 2006 17:24:34 +0000 (17:24 +0000)]
Curt noticed a while back that YASim was producing alpha and sideslip
values that were angles between the aircraft's orientation and the
global velocity vector, not the airflow velocity. So the HUD velocity
vector was wrong when the wind was non-zero. Fix that.
durk [Sat, 26 Aug 2006 07:22:20 +0000 (07:22 +0000)]
Ground network distance tracking code. AIAircraft taxiing at airports
maintain a resonable distance from each other while taxiing on the same
route. The current code does not yet take crossing routes or aircraft
taxiing into opposite directions into account.
curt [Tue, 22 Aug 2006 00:58:25 +0000 (00:58 +0000)]
Tested and working under Linux. I have no way to test this under windows.
If there is a windows problem, look very carefully at the line termination
with a serial port monitor. It should be \r\n (CR-LF), not \n, not \r\r\n
or any other possible variant.
curt [Sun, 20 Aug 2006 23:38:38 +0000 (23:38 +0000)]
Make the vertical acceleration rate scale with vertical performance. The
default case for tankers should still be right about the same as where it was.
curt [Sun, 20 Aug 2006 23:37:13 +0000 (23:37 +0000)]
Add an initial implementation of the Garmin 400 series "Aviation In" data
format. I have a Garmin 295 to test with, but so far I haven't been able
to make this work (code should compile cleanly though.) I don't know if
I've made a mistake in the protocol or if my 295 just doesn't support this.
More work on this to come.
mfranz [Sun, 20 Aug 2006 15:27:26 +0000 (15:27 +0000)]
- make *all* class members start with underscore (not all but two)
- NEVER EVER use leading underscores for auto variables
- don't store values in auto variables for the next function call (not
even when they start with underscore :-) This fixed the TACAN
channel lookup, which was supposed to be done on channel changes only,
but was always done)
- only do frequency search if frequency has changed (this was apparently
planned, but not finished; leftover from adf.cxx?)
- don't use double as bool switch
- some minor cleanup
mfranz [Sat, 19 Aug 2006 07:30:52 +0000 (07:30 +0000)]
as the "Attempting to schedule tiles for bogus lon and lat = (-1000,0)"
bug happens now on a regular basis, and just ignoring it doesn't seem to
cause any harm, just return after it, rather than abort.
durk [Wed, 16 Aug 2006 09:58:26 +0000 (09:58 +0000)]
Bugfix of problem reported by Mathias Fröhlich: Ground network trace()
algorithm caused a program crash. Because there is always one waypoint more
than there are routes, the trace function should only pop_back the final route
entry at search depths of one or higher. I also added a lot of of additional
safeguarding code, due to the fact that the new trace algorithm was
apparently not as stable as I'd hoped it would be. ...
mfranz [Thu, 10 Aug 2006 11:21:15 +0000 (11:21 +0000)]
print the whole autosave.xml path, not just the filename. Unfortunately,
in the case of fg_init.cxx we'll only see that if the log-level is set
in preferences.xml, because command line options weren't even processed
at that time. :-/
andy [Tue, 8 Aug 2006 18:23:20 +0000 (18:23 +0000)]
Fix a few warnings while I'm in there. Melchior poitned out that my default
configure-generated Makefiles don't include -Wall and a few issues had crept
into the code.
andy [Tue, 8 Aug 2006 18:05:43 +0000 (18:05 +0000)]
Add a lift/drag vs. AoA graph option to the yasim tool, which
generates a data file of aerodynamic lift and drag (and L/D) against
AoA at a specified speed and altitude through a full circle. Wrote it
to track down the YF-23 superthrust issue, but it wasn't any help.
All the forces look fine.
andy [Tue, 8 Aug 2006 14:19:15 +0000 (14:19 +0000)]
Melchior sent me a property dump of the YF-23 in the wacky superthrust
state. The only really obvious problem was a giant negative engine
RPM, which happened because of a lack of clamping in the engine code
combined with the YF-23's ability to actually reach speeds near the
engines _vMax value. It's not clear to me that this will fix the
superthrust issue at high AoA's, but it's an obvious bug nonetheless.
andy [Mon, 7 Aug 2006 16:49:26 +0000 (16:49 +0000)]
Fixes from Maik Justus:
+ The wing compilation step was accidentally omitting regions that lie
between the tips and the first/last control object. That's a real
problem for wings that contain no controls, and a significant issue
for those that contain only a few. I'm stunned that this went
undetected for so long.
+ The Surface::flapLift() function was oddly returning 1.0 Newtons as
a minimum, instead of zero.
mfranz [Mon, 7 Aug 2006 15:19:22 +0000 (15:19 +0000)]
remove experimental and unused code (we read the splash screen style
from /sim/gui/style[0] since a while, not from the preferred style.
This allows overriding it from *-set.xml files.)
mfranz [Mon, 7 Aug 2006 15:11:46 +0000 (15:11 +0000)]
move GL_TEXTURE_LOD_BIAS_EXT one section up and document what it does
(this was the reason why the first two text lines on the splash screen
looked more blurry than the others). BTW: I played with other values
than -0.5, but this turned out to be the best already. It makes textures
sharper than 0, but not too sharp (and thus flickering).
mfranz [Wed, 2 Aug 2006 15:34:33 +0000 (15:34 +0000)]
throw out "zoomed" tapes. These drew 60% of the scale with bullets rather
than tick marks, and looser (zoomed) than the other 40%. Rationale:
- this was only used in *one* tape of *one* HUD ("custom")
- it's not in the MIL-STD!
- doesn't seem very useful
- relies on integer scale values, while we now have float values in the new HUD
This feature would have had to be rewritten anyway. If someone needs it and
can come forward with a (MIL-)STD description, then it can be added to the
existing tape generator again (using a value->screen-position mapper function).
Otherwise it's simply declared dead.
mfranz [Tue, 1 Aug 2006 15:31:15 +0000 (15:31 +0000)]
- make the alignment function a static HUD member (for namespace
encapsulation, but a real namespace would probably be better)
- extend alignment to optionally adjust x/y, and to return absolute
l/r/b/t coordinates (as opposed to plib's relative ones!)
- implement tape gaps as per Curt's order :-)
- shuffling stuff around for fun
- move HUDText constructor/methods to HUD.cxx
- add generic text adjustment and
- use it in the ladder: climb -> vert bar on the outside, numbers below line
dive -> vert bar on the inside, numbers above line
Spectacular improvement in traffic manager initialization and preparatory
work for ground based distance separation of AIAircraft.
Traffic manager initialization related changes:
- Schedules initialize "on the fly", instead of during initialization
- Invalid routes are no longer deleted, but marked as BOGUS and ignored
- Changed loading order from a distance based prioritization to a point-
score based prioritization, resulting in a much faster establisment of
AIAircraft near the user's plane.
Preparatory work for ground-based separation of Aircraft.
- The groundnetwork findShrortestRoute function not only returns a list
of waypoints, but also a list of taxi "segments" (a.k.a. taxiways).
- The taxiway list is stored in the Flightplan, and updated everytime
a new taxi leg is created.
Specify "clip planes" as a separate independent option (not implied from
the type option.) The clip area is and has always been hard coded, but at
some point we should make it configurable.
Add an option to get a realistic climb dive ladder without all the other
implications.
Fix the ladder so it "moves" around in the hud correctly based on alpha/beta
offset projected onto the horizon line so the horizon is always the horizon.
AI Modifications: 1) Added a patch that takes ground speed into consideration
using Curt's new speed adjustment code. 2) Separated the function
FlightPlanCreateCruise() into a new source file in preparation of a more
elaborate airway following scheme.
Fix a class of problem that could lead to needless extra time "jitter" in the flight dynamics
calculations. We run the FDM at 120hz and compute how many loops can fit into each FG loop.
Floating point rounding could lead to a situation where we could end up running
1, 3, 1, 3, 1, 3... loops of the FDM when in fact we want to run 2, 2, 2, 2, 2...
If we artificially inflate ml above by a tiny amount to get the
closest integer, then subtract the integer from the original
slightly smaller value, we can get a negative remainder.
Logically this should never happen, and we definitely don't want
to carry a negative remainder over to the next iteration, so
never let the remainder go below zero.
finally fix the text-in-box alignment (= Rocket Science[TM]!)
(This will be moved to HUD_instrument.cxx, where it will be available to
all draw_text() users.)
first stab at label box pointers. <option>top</option> on a <label> makes
such a box:
_____/\_____
| Booo |
|__________|
likewise with options bottom, left, right. The size can be set via option
<marker-offset> (analogous to <tape> offsets), which describes the distance
from the base to the peak. Default: 8 px
- don't use 10 pt font size for width calculations, when in fact we use
a 8 pt font (set 8 pt in preferences.xml, too)
- fix vertical alignment of digits in label and ladder (temporary
solution -- the whole font handling needs to be reviewd and fixed)
- simplify nadir and zenith (they always want to be horizontally centered
on the ladder lines, no?)
- simplify and abstract label box drawing (no need for stippled side lines)
- align text (more) correctly in label boxes
Re-implement the flight path marker (aka "velocity vector") so it's position
is computed from alpha and beta. Before the code U, V, & W body velocities
to compute alpha/beta. Why not just use the values directly.
- use Item::draw_circle() to draw circles (waypoint marker still to be done)
- move variable declaration near their first use (c++ style rather than c)
- rename (zenith|nadir|hat) to enable-(zenith|nadir|hat) and make them bool
(for consistency reasons)