1
0
Fork 0
Commit graph

571 commits

Author SHA1 Message Date
curt
2c193be0ca Syd Adams:
- 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...

I'm attaching the panel.cxx file for testing...
2006-09-05 20:28:48 +00:00
mfranz
6a6eb2c00b fix log message 2006-08-10 11:12:39 +00:00
mfranz
6a832d0d07 remove temporary fix 2006-07-30 08:08:51 +00:00
mfranz
8a482acf8f SGMiscf isn't known yet: add workaround 2006-07-27 17:12:37 +00:00
frohlich
cdb725528d Clean up scenery center handling. It is set now less often. 2006-07-27 16:36:22 +00:00
mfranz
a6c8610682 make old HUD code work with 8 px font size 2006-07-24 16:02:56 +00:00
ehofman
a4265a3b0a Use one standard define for enableing of the Special Purpose FDM code. 2006-07-17 17:58:53 +00:00
mfranz
ef2bc6227a set blend mode back to make 2D panels opaque when used with transparent HUDs 2006-06-17 19:09:38 +00:00
mfranz
fb1b1d98d3 remove lon/lat string representation generating functions; this is now
done in Main/fg_props.cxx and available via /position/{long,lat}itude-string
2006-06-17 16:40:51 +00:00
mfranz
890fa81c7e - remove unused classes lat_label and lon_label (it's the instr_label
that makes the lon/lat labels)
2006-06-16 19:29:34 +00:00
fredb
c5a7267206 Compile again on Win32 platforms 2006-06-16 10:17:06 +00:00
mfranz
038e047e8f - move FloatToInt() function to simgear/math/fastmath.hxx, renamed to
float_to_int() for consistency reasons
- remove hud_opts.hxx
2006-06-16 09:31:34 +00:00
mfranz
d336553d75 - make function table and lookup function
- make unnamed elements explicitly "[unnamed]"
2006-06-15 18:09:15 +00:00
mfranz
ed7ee6b534 - fix two bugs
- remove yet more unused code
- cosmetics
2006-06-15 16:03:27 +00:00
mfranz
7327e35020 remove the rest of the static variables (except one); cleanup 2006-06-15 00:21:06 +00:00
mfranz
4e8a89c9c0 remove readCard() and let the hud_card class read its properties 2006-06-14 23:27:55 +00:00
mfranz
9e2de090b4 remove readCard and let the gauge_instr class read its own properties 2006-06-14 20:39:10 +00:00
mfranz
b32aa5086a remove readRunway() and let the runway_instr class read the properties in
the constructor
2006-06-14 18:41:36 +00:00
mfranz
d1a9512c91 remove readTBI() and let the fgTBI_instr class read its properties 2006-06-14 16:57:38 +00:00
mfranz
ddda2c68d5 - remove hud.cxx/readLabel and let the instr_label read its properties
- remove unused copy constructor
- fix potential crash bug
2006-06-14 16:23:44 +00:00
mfranz
812275cf15 remove readLadder(const SGPropertyNode *) and make the HudLadder
constructor read its properties on its own
2006-06-14 12:49:27 +00:00
mfranz
471fecd72c indentation, trailing spaces, ... (cosmetics only); doesn't make
the coding style fully consistent yet, but it's good enough for code changes
(mixed tab/space indents, 4 space tabs etc. are a royal pain)
2006-06-14 10:30:10 +00:00
mfranz
e545c563d5 remove assignment operators: they aren't used now and won't in the future 2006-06-13 15:00:31 +00:00
mfranz
0b0c681775 indentation, trailing spaces, alignment, ... (to make further work easier) 2006-06-13 14:48:19 +00:00
mfranz
b674037a3c - fix more cases of scale tick aliasing to get smooth scale movements
- remove trailing spaces, fix indentation, unify coding style, ...
2006-06-12 23:27:55 +00:00
mfranz
365546444c fix ugly aliasing effects in moving scales (caused by integer calculation
of tick coords)
2006-06-12 22:27:10 +00:00
mfranz
9edd0a1ea4 - remove trailing spaces
- fix indentation, alignment and other formal stuff
2006-06-12 21:34:47 +00:00
mfranz
dee302354f the special line width doesn't make much sense, as it's only applied to the
arrow head marks. It was probably thought for all lines, but as those are
wide enough, I just comment that out for now.
2006-06-10 15:25:48 +00:00
mfranz
14addaab07 treat colors like the other parameters: only copy them from the palette
color group /sim/hud/palette/color[*]/ to the active group /sim/hud/color/
if they really exist. (Parameters like <antialiased> can be set in the
active group and be left alone, or set by each <palette> color group.)
2006-06-10 09:22:27 +00:00
mfranz
925e1578cd - remove lots of traling spaces
- fix indendation and alignment
2006-06-09 21:29:40 +00:00
mfranz
265e411791 - add transparency option
- comment out date/time ... this needs to be added to the HUDs that need it
2006-06-09 20:37:16 +00:00
mfranz
20076aa2b9 - remove obsolete definition
- make sure HUD is only initialized once
2006-06-09 10:53:48 +00:00
mfranz
782e6b82f0 - copy preset colors from <palette> to /sim/hud/color
- listen to color, alpha, alpha-clamping
- fix blend mode
2006-06-08 17:14:59 +00:00
mfranz
8369cc75f5 - don't hide HUD only because the color index is invalid
- initialize color components
2006-06-07 21:41:32 +00:00
mfranz
fe3bdf0837 boy, what a load of ... 2006-06-07 21:35:11 +00:00
mfranz
d2791fdc9d whoops ... compile (this silly #define will be removed very soon) 2006-06-07 21:28:33 +00:00
mfranz
e841b65a5a remove obsolete constants 2006-06-07 21:09:38 +00:00
mfranz
1ccacef184 - drop hardcoded color/brightness values
- let listener class watch and maintain HUD color properties, which is
  more effective and more flexible.
2006-06-07 18:01:19 +00:00
mfranz
95da0171a0 bark if the requested font isn't a texture font. A more graceful recovery
doesn't buy us much, as the font is only set at initialization time and not
changeable later. Better tell the user immediately that he goofed.
2006-06-06 19:25:33 +00:00
mfranz
675ff6fbc8 restore old default; this should probably be configurable ... 2006-06-06 18:36:34 +00:00
mfranz
15dbbbf143 - use global fontcache
- make font/size configurable
2006-06-06 15:34:18 +00:00
mfranz
db86d15c5f use global fontcache. This hast the nice side effect that panels can now
use *any* texture (*.txf) font, not just "typewriter" and "led".
2006-06-06 12:52:45 +00:00
mfranz
2b2b4fa8a3 make headers include headers they depend on, don't rely on the c(xx)
file to do that. (This is a requirement for header precompiling.)
2006-04-17 12:59:35 +00:00
mfranz
1aa274e7cb make sure node pointers remain valid 2006-03-23 15:13:19 +00:00
mfranz
c9813d1b5d new FSF address 2006-02-21 01:16:04 +00:00
fredb
36e4045810 Add missing include files needed by the new math code under windows 2006-02-18 13:58:09 +00:00
ehofman
bcb193f38b Add support for emissive layers. 2006-02-16 18:59:48 +00:00
mfranz
9968dfd814 cosmetics 2006-02-02 00:47:30 +00:00
mfranz
beff0cef60 better use zero sensitive area to detect a missing (or inoperable) button,
because a missing <button> default to 0, which makes a lot of sense
2006-02-02 00:00:27 +00:00
mfranz
1c27be1cb4 panel_io.cxx: if an action doesn't have a button, fire its bindings
immediately and then throw it away; this is useful for initialization
    purposes (see dme.xml)

cockpit.cxx: warnings--; typos--
2006-02-01 23:52:36 +00:00
mfranz
c5f1ffaf64 fix 2D compass 2006-02-01 20:54:17 +00:00
daveluff
3d5afec340 Fix the crashes on mini-panel and panel-reload with the KLN89, by removing the multiple inheritance and using an empty shell instrument to forward draw commands from the panel to the complex gps subsystem. 2006-01-13 22:07:50 +00:00
curt
249a1264ff Remove the old hardcode fps display. This is now replaced with a nasal/gui
display that can be dragged around the screen to an unobtrusive location.
2005-12-15 22:18:06 +00:00
daveluff
a3890d1253 Add support for a special-instrument xml attribute, which triggers loading of a know c++ hard-coded instrument. This has some ugliness that will need removing at some point. In particular, panel reload is broken for panels that include a special-instrument, since this triggers subsystem reload which is a fatal error. Note that this *only* affects panels that use a special-instrument - all other panels are unaffected 2005-11-30 01:21:45 +00:00
mfranz
571939e58d replace hard-coded HUD config dialog with NewGUI dialog 2005-11-09 10:47:40 +00:00
ehofman
029dda3297 In the process of changing, adding and removing files the last few years
there was the situation where four directories contained jst two files,
of which three directories were aircraft related, and one directory contained
test code from Curt that might be better of in SimGear anyhow.

This is just a patch to move a bunch of files to new locations. In case of
local changes to any of them you can do the following:

move replay.[ch]xx from src/Replay to src/Aircraft
move control.[ch]xx from src/Control to src/Aircraft
move ssgEntityArray.[ch]xx from src/Objects to simgear/screen

In addition it has been decided only to use .[ch]xx files in all directories
unless it's contained within an FDM specific directory, in which case the
author is free to do whatever (s)he wants.

In this repspect the following files have been renamed in src/Multiplayer:

tiny_xdr.[ch]pp has become tiny_xdr.[ch]xx
multiplaymgr.[ch]pp has become multiplaymgr.[ch]xx
2005-11-01 13:41:49 +00:00
ehofman
62a359cc4a Alex Romosan:
* Use "const string&" rather than "string" in function calls when appropriate.
* Use "const Point3D&" instead of "Pint3D" in function calls when appropriate.
* Improved course calculation in calc_gc_course_dist()
* Safer thread handling code.

Vassilii Khachaturov:

Dont use "const Point3D&" for return types unless you're absolutely sure.

Erik Hofman:

* Use SGD_(2)PI(_[24]) as defined in simgear/constants.h rather than
  calculating it by hand every time.
2005-10-25 13:49:55 +00:00
curt
ae928dde80 Why not just use the provided constructor, then we know for sure what the
values will be initialized to.
2005-10-16 11:11:06 +00:00
ehofman
2631cf9cc5 Ladislav Michnovic:
Using new gcc 4.0 I have some serios warnings about uninitialized
variables, that are used. I created a patch, but I have no idea if it
is possible to do it my way. Can you check this out please?


Erik: I've modified the patch slightly based on the contents of an older
      version of hitlist.cxx. I think this is correct now.
2005-10-16 09:05:40 +00:00
ehofman
f057fd0d48 Martin Spott: Use standardized Sun directive. 2005-10-06 11:08:26 +00:00
ehofman
a760dcdf13 Harald JOHNSEN:
- replay.cxx :
  corrected a bug, now reinitialize the recording data when replay is
  deactivated

- fgclouds.cxx :
  cloud layers and weather condition are saved when choosing a weather scenario,
  added a new scenario 'none' so we can switch back to standard flightgear
  weather

- navradio.cxx :
  force a search() on init to initialize some variables, preventing a nearly
  infinite loop  when delta-time == 0 on the first update()

- electrical.cxx :
  uninitialized variable in apply_load() for FG_EXTERNAL supplier

- panel.cxx, panelnode.cxx :
  added a property "depth-test" for 2.5D panels so that they update the depth
  buffer and are no more visible from the outside of the aircraft when the
  aircraft uses textures without an alpha channel

- panel.cxx :
  moved the computation of the instruments diffuse color outside the
  texturelayer code since this is constant during a frame, this is a big speedup
  for 2D panels
2005-08-22 17:49:50 +00:00
ehofman
7b824755ee Mathias Frhlich:
I have prepared a patch that:
- Introduces a FGTileMgr::scenery_available method which asks the tilemanager
  if scenery for a given range around a lat/lon pair is already loaded and make
  use of that method at some -9999 meter checks.
- Introduces a FGScenery::get_elevation_m method which queries the altitude at
  a given position. In constrast to the groundcache functions this is the best
  choice if you ask for one *single* altitude value. Make use of that thing in
  AI/ATC classes and for the current views ground level. At the current views
  part the groundcache is reused if possible.
- The computation of the 'current groundlevel' is no longer done on the
  tilemanagers update since the required functions are now better seperated.

Alltogether it eliminates somehow redundant terrain level computations which
are now superseeded by that more finegrained functions and the existence of
the groundcache. Additionally it introduces an api to commonly required
functions which was very complex to do prevously.
2005-08-14 12:57:12 +00:00
ehofman
6d5e37f674 MacOS-X fix. 2005-07-27 07:59:59 +00:00
mfranz
550352c0b6 keep panel and gui bindings nicely separated; useful for debugging,
especially now that the property path is shown in nasal error messages
2005-06-24 14:07:15 +00:00
mfranz
ee7b882dd9 - delete bindings in the *destructor* (must have been an editing accident)
- create copies of bindings in /sim/bindings/, because FGBindings doesn't
  do that any more  (is there a better way to find the first free child?)
2005-06-20 18:52:54 +00:00
curt
222446df29 Replace the data/Airports/basic.dat.gz and data/Airports/runways.dat.gz with
a single apt.dat.gz file which is in the native X-Plane format.

To do this I wrote a front end loader than builds the airport and runway
list.  Some of the changes I needed to make had a cascading effect, so there
are minor naming changes scattered throughout the code.
2004-12-22 23:57:07 +00:00
ehofman
93e6ebf116 Fix a property path. 2004-12-19 14:32:39 +00:00
curt
75747d3516 A couple more straggling instrumentation clean ups. 2004-12-05 01:04:32 +00:00
curt
634e79353f Roy Vegard Ovesen:
I've finished the emigration of the radiostack, and I've also removed it
completely. It turned out that the comm radio is completely implemented in
the ATC subsystem. I've changed the affected ATC files to point
to /instrumentation/com, but I guess that the maintainer of the ATC code
should decide wether to make it configureable, and how.

I also had to change some files in Network and Main. The changes in network
should be obvious, but the changes in Main were a bit suspect. The files
included radiostack.hxx, but they weren't directly depending on
radiostack-hxx. They were depending on other files that were included by
radiostack.hxx. I got it to compile, but I'm not sure if I included the
correct directly depending file.

For the data directory I changed every occurrence of /radios/
with /instrumentation/ with this simple one-liner that I found on the net:

find -name '*.xml' -type f | xargs perl -pi -e
's/\/radios\//\/instrumentation\//g'

Instead of me sending all the files that got changed by this I suggest that
you execute the one-liner yourself. Of course I can not guarantee that this
will work perfectly, but I considered hand editing to be not an option (I'm
lazy). I don't want to test every aircraft to see if everything still works,
I think it's better to wait and see if anyone complaints about broken nav
radios/instruments.
2004-12-03 21:21:16 +00:00
ehofman
fee003e8cc Melchior FRANZ:
I understand that the new hud/runway feature is still very experimental,
and that the search criteria for the active runway don't necessarily make
much sense. (We are searching for a runway on /sim/presets/airport-id
that matches the current wind direction best, and not the tuned in ILS
runway or something!)

Anyway: the new hud code completely denies the possibility of
globals->get_runways()->search() not finding a runway and returning false.
There's always a runway found at KSFO, but not so at e.g. LOXL, in which
case we are handing garbage over to sg_geodesy.cxx and find ourselves
caught in an endless loop in geo_direct_wgs_84().
2004-11-30 12:14:17 +00:00
ehofman
b859e77072 MacOS X fix. 2004-11-20 12:47:42 +00:00
curt
1c2c76709e Roy Ovesen: remove src files from Cockpit and move them over to Instrumentation. 2004-11-19 23:10:44 +00:00
curt
e9b70e3ab8 Changes by Roy Ovesen to begin migrating the avionics out of the Cockpit
directory and over to the Instrumentation directory and make them modular
in the sense of being able to pick and choose what you include with any
particular aircraft.
2004-11-19 23:01:34 +00:00
curt
d05121ef46 Fix my mailing address by replacing it with my web page. 2004-11-19 22:10:41 +00:00
curt
62df58d4f8 I have added Aaron Wilson's virtual 3d runway projection to the HUD.
Aaron says:

I just got the virtual runway hud projection working on all views and
2D & 3D HUDs.  It is working awesome(see below).  I have attached every
file that was modified (hud.hxx, hud.cxx, and the default.xml for the hud)
and every file that was added (hud_rwy.cxx and runwayinstr.xml).

Just a quick overview of how the instrument works.

The virtual runway is projected by getting the "cockpit view" of the
runway in 3D and projecting the points on to the 2D HUD.  Therefore, the
virtual runway will be displayed the same in every view.  For example,
you can land an aircraft from the "Tower View" by flying the HUD.  Also
if you're in "Cockpit View" and it is centered then the virtual runway
lines will perfectly outline the actual runway.  I am getting the active
runway via the wind like done in the ATC classes, which may need changed.
Also, I made the assumption the view 0, in view manager, is always the
cockpit view, which may need changed as well.

The runway configuration file will allow you to specify a center offset
(x,y) and a bounding box (width,height).  You can also configure the line
stipple pattern for the outside and the center line.  For instance, if
you wanted a 0xFAFA pattern, then specify 64250 as the value.  If you
want a solid line, you can specify -1 or 65535 (0xFFFF) and zero will
turn the line off.  It also draws a runway indication arrow when the
runway is not in the HUD or it can be drawn all the time if arrow_always
is true.  The arrow will point in the direction of the runway (2D) by
rotating around the center  at a radius of arrow_radius.  If you wish to
turn the arrow off, you must set the arrow_scale <=0.  The arrow really
should be 3D arrow that points to the runway (or points in the direction
of the aircraft-to-runway vector).
2004-11-19 18:31:02 +00:00
curt
4214cd6c10 Migrate FlightGear code to use "#include SG_GL*" defined in
"#include <simgear/compiler.h>".
2004-11-18 19:53:00 +00:00
ehofman
dbbad3cdf2 Frederic:
compilation without ENABLE_SP_FMDS defined gave me a lot of link errors. It appeared that symbol used by ADA was still in use in the HUD.

There is also a typo from Curt in instrument_mgr.cxx where he #include "kr_87.cxx" instead of "kr_87.hxx"
2004-10-20 08:15:55 +00:00
ehofman
8b53b86aa0 A first stab at an ACMS (Aircraft Condition Monitoring System) Special Purpose support FDM. Move the ADA FDM into the Special Purpose directory and make the SP FDM's a configure option. 2004-10-19 11:10:20 +00:00
curt
8f5cac1403 Move the kr_87 code over to the instrumentation directory. 2004-10-18 19:56:24 +00:00
ehofman
de47d1a7d8 Revert to CVS as of 5000 seconds ago. 2004-09-19 17:59:40 +00:00
ehofman
cbdeb3be16 Remove unnecessary inclusions of sg.h ans ssg.h 2004-09-19 16:47:00 +00:00
ehofman
409dee5a9d Remove unnecessary inclusions of sg.h ans ssg.h 2004-09-19 16:33:38 +00:00
ehofman
5c18572c64 Melchior FRANZ:
All necessary elements for an ADF gauge had been migrated from
Cockpit/kr_87.cxx to Instrumentation/adf.cxx. Migrating the sound
related elements was apparently planned, but not done yet. This
intermediate state broke the ident morse sound: it couldn't get
turned off and it always indicated "SF", regardless of the tuned-in
frequency. The following patches continue the migration:


adf-radio.diff     => Base/Aircraft/Instruments/adf-radio.xml:
---------------------------------------------------------------
* sets maximum volume to 1 (rather than 2); Not only is 1
  loud enough (and 2 unpleasantly noisy), it also prevents
  the knob from being turned to non-existant positions.  :-)
* fixes wrong use of /instrumentation/adf/ident
* the voice/ident selector(?) remains unchanged, but as it's
  not switched to "IDENT", there'll be no ident sound by default
  this is consistent with other sounds and DME.


radiostack.diff    => src/Cockpit/radiostack.[ch]xx:
---------------------------------------------------------------
* comment out use of FGKR_87 class. kr_87.[ch]xx is now no
  longer used. kr-87adf.xml would no longer work, either, but
  isn't used anywhere, anyway. Future adf radios have to use
  the adf instrument, using xml/Nasal for specific hardware
  implementation details.


adf.diff           => src/Instrumentation/adf.[ch]xx:
---------------------------------------------------------------
* adds ident morse sound capability using two new input
  properties:
  - /instrumentation/adf/volume-norm  (double)
  - /instrumentation/adf/ident-audible  (bool)
2004-08-19 11:54:57 +00:00
curt
258cd292c6 When searching for nav records ignore stations > 300nm away. 2004-06-20 18:58:44 +00:00
curt
0fa47dbbdc Change the fps toggle property name a bit and add a toggle switch in the
gui/dialog/rendering box.
2004-06-14 16:38:44 +00:00
curt
1fa0f4157c Make the onscreen fps display toggleable via a boolean property. 2004-06-14 16:25:32 +00:00
curt
756f05501b Oops, fix a bug (introduced recently) that could cause the glide slope
indicator to read incorrectly for many approaches.
2004-06-10 19:51:27 +00:00
curt
6c8f7fab01 DME units report a distance based on the assumption that the ground station
will delay it's reply by 50ms.  The ground station can change it's reply delay
to trick the airborn dme unit into reporting a distance that is offset from
the true distance by some constant value.  In FG we model this by subtracting
a fixed distance from the actual distance.

It is thus possible in our implimentation for the displayed distance to become
negative.  This patch clamp DME distance to a minimum value of 0.00 so it can
never go negative.
2004-06-09 20:21:18 +00:00
curt
225298a09e Often, the elevation of an ILS component is not listed in our nav database.
A good elevation is critical for proper glide slope modeling.  This patch
assigns the average field elevation to any ILS component that doesn't have
a valid elevation.

Also, for an ILS approach, use the GS transmitter elevation for glide slope
calculations rather than the localizer elevation, in some cases this can
make a big difference.
2004-06-09 03:13:13 +00:00
curt
d1944b338b Remove some left over debugging output. 2004-05-28 21:47:11 +00:00
curt
197cef01d3 One more ... 2004-05-28 05:31:11 +00:00
curt
6ec9e2dcdc Oops, and another similar one. 2004-05-28 05:29:04 +00:00
curt
90c5f1f22d Fix a compile error I missed in the first round. 2004-05-28 05:27:40 +00:00
curt
b2b33f7582 This set of changes impliments the following:
- FG now directly supports Robin's native nav database file format.
- His latest data now separates out dme, gs, loc, and marker beacon
  transmitters rather than lumping them all into a single "ILS" record.
- These new data structure changes prompted me to do some code restructuring
  so that internally these different types of navaids are all kept as
  separate lists and searched and handled separately.
- This structural change had a cascading affect on any code that
  references or uses the nav databases.  I've gone and "touched" a lot of
  nav related code in a lot of places.
- As an added bonus, the new data (and code) adds DME bias so these will
  all now read as they do in real life.

- Added Navaids/navdb.cxx and Navaids/navdb.hxx which provide a front
  end loaders for the nav data.
- Added Navaids/navrecord.hxx which is a new "generic" nav data record.
- Removed Navaids/ils.hxx, Navaids/ilslist.cxx, Navaids/ilslist.hxx,
  Navaids/mkrbeacons.cxx, and Navaids/mkrbeacons.hxx which are all now
  depricated.
2004-05-28 05:24:54 +00:00
curt
78e6d35998 Move navaids and fixes out of "global" name space into the FGGlobals
structure.
2004-05-26 18:15:19 +00:00
curt
df472fe0f5 Changes to go along with small interface changes in simgear/sound/libsgsound
(which is now written on top of OpenAL.)
2004-04-24 19:28:12 +00:00
andy
941f99308d Oops. A change to an upstream header seems to have remove glu.h, which
these files require.  Dunno why my build didn't pick up the transitive
dependency.
2004-04-06 03:51:11 +00:00
curt
2acdd02879 Clean up various compiler warnings that have crept into the code. This
by no means get's them all, but it's a start.
2004-04-01 15:27:53 +00:00
curt
2845a75753 Jim Wilson:
Add FGPredictor class to xmlauto.  Add support for horizontal navigation based
on flight track as opposed to heading.  Add crosstrack-error support to nav.
Simplify error adjust calculation for horizontal nav (better interception).
Fixed potential divide by zero that was producing nan issues in the xmlauto
code.
2004-03-19 03:23:28 +00:00
curt
78155104e8 I found a meter/feet conversion problem with DME elevations. These changes
should resolve the problem.
2004-03-14 22:58:58 +00:00
ehofman
3143e44faa Use floor() insstead of floorf() 2004-02-23 09:03:41 +00:00
ehofman
32a17bf442 Remove truncf() all together. 2004-02-20 07:54:26 +00:00
curt
29b1f376f7 Fix altitude/agl hold display. 2004-02-05 23:49:18 +00:00
curt
da5ea10d5d Curt Olson:
Autopilot overhaul.
2004-01-31 19:47:45 +00:00
ehofman
d3865a9bf9 Check for the precense of truncf rather than hard-wire it in 2004-01-27 09:31:27 +00:00
ehofman
8c129e8470 Make it possible to show the DME in the HUD 2004-01-26 20:24:29 +00:00
ehofman
4fb5e61162 MSVC fixes 2004-01-26 20:06:03 +00:00
ehofman
64cad6a288 Fixes to the kr_87 radio 2004-01-24 10:05:54 +00:00
ehofman
74d163b51b Rather define our own truncf implementation for BSD alikes 2004-01-23 18:27:55 +00:00
ehofman
44108678f7 BSD doesn't have truncf(), it does have floorf() however 2004-01-23 18:05:05 +00:00
ehofman
02cf3373d5 Use fgGetBool to assign a boolean variable 2004-01-23 09:46:56 +00:00
ehofman
6ba351cfc6 Make it possible to truncate the result of a number-value text chunk calculation rather than rounding it by specifying <truncate>true</truncate> inside the chunk. 2004-01-22 18:42:42 +00:00
ehofman
8e5a884428 Add support for an offset for number-value typed text chunks 2004-01-13 18:28:46 +00:00
curt
25fddbf476 Add the current true heading to the tuned nav station into the property tree. 2003-12-02 15:56:56 +00:00
curt
d3181fb437 Andy Ross:
A set of changes to impliment Nasal support in FlightGear.  The nasal
interpreter is now part of SimGear.
2003-11-25 21:08:36 +00:00
ehofman
e322c70f52 Depreciate NetworkOLK. A big thanks goes to Oliver Delise for implementing it in the first place. 2003-11-13 14:42:47 +00:00
ehofman
980012e168 Move FGEventMgr and FGSubsystemMgr over to SimGear, add SGEventMgr to FlightGear's globals structre and some small code cleanups 2003-09-24 17:20:55 +00:00
ehofman
a33ad90ed7 Convert fgLIGHT to FGLight and make it FGSubsystem compatible. Let the subsystem manager handle it and let FGLight::update() handle the repositioning of the sun and the moon. 2003-09-20 09:38:32 +00:00
ehofman
0f6e4e1c74 Don't just disable depth buffer writes but instead disable the depth test all together 2003-09-16 16:27:01 +00:00
ehofman
174852f01e Try to prevent z-buffer problems for video cards with a 16-bit depth buffer 2003-09-16 14:31:14 +00:00
ehofman
44fda9805b Enable back face culling for cockpit instruments, disable depth buffer writes for 2d instruments but enable depth buffer writes for the magnetic compass. Does anyone care to create a 3d magnetic compass? 2003-09-16 10:02:32 +00:00
ehofman
830ce9108c Disable depth buffer writes for 2D insturments. This should prevent z-buffer fighting 2003-08-16 11:35:04 +00:00
curt
0179cab894 Norman Vine:
Attached patch gets rid of all mention of GLUT from the cockpit directory.
2003-08-12 15:57:17 +00:00
curt
bcb10efa50 Remove several unneeded glut dependencies. Note, this doesn't signal an
immediate end to glut, only that I'm going through and cleaning up (and
taking inventory of the actual glut dependencies in case I want to investigate
SDL.)
2003-08-11 21:50:22 +00:00
curt
d805b8166b Fix several mispellings of servicable->serviceable. 2003-07-30 00:43:25 +00:00
ehofman
f2a2b21661 Small patch to expose the localizer property (e.g., true for ILS localizer) 2003-07-18 08:22:54 +00:00
ehofman
3179cb441a Make it possible to either select the 2d or the 3d HUD 2003-07-14 13:57:11 +00:00
curt
85de2452a3 A couple fixes so the nav/ils heading hold will work again. 2003-07-07 21:19:46 +00:00
david
ba8b2bfca3 Rename some existing variables/methods in the navcomm module for
clarity:

  nav_radial => nav_target_radial (same as selected, except for a LOC)
  nav_heading => nav_reciprocal_radial
  nav_magvar => nav_twist (it's not always the same as magvar)
  nav_heading_needle_deflection => nav_cdi_deflection
  nav_gs_needle_deflection => nav_gs_deflection

Added nav_radial back in, but now it shows the current radial from the
VOR, as one would expect.  This value also appears in the
/radios/nav[*]/radials/actual-deg property.
2003-07-04 19:13:03 +00:00
david
fa4d245555 Change a spelling. 2003-07-03 17:13:03 +00:00
david
9eef30ff6e Fix the property /radios/nav[*]/radials/actual-deg to show the radial
that the aircraft is on.
2003-07-03 17:10:32 +00:00
ehofman
a1968ecb95 Jim Wilson:
This patch exposes the nav_id--Navaid (VOR/ILS) IDs--in the property tree for use in EFIS displays.  Both the string and individual integer (char) values are published.


Erik Hofman:
I have converted all sprintf() functions in navcom.cxx into snprintf() for some extra securety.
2003-07-03 08:51:19 +00:00
curt
3c7bdc31d9 Cosmetic changes for new code moved into simgear to make the naming scheme
better follow simgear conventions.
2003-05-13 03:18:42 +00:00
curt
56db994994 Moved src/Model/loader.[ch]xx and src/Model/model.[ch]xx to
simgear/scene/model/
2003-05-09 20:40:59 +00:00
curt
51c04e9e4c - Added "SG" prefix to sound classes that recently moved to SimGear.
- Cleaned up some minor compiler warnings.
- Moved src/Model/placement.[ch]xx over into simgear/scene/model/
2003-05-09 19:39:48 +00:00
ehofman
5ecfcca7e4 Extract the sound code from FlightGear and move it to SimGear 2003-05-09 18:44:33 +00:00
curt
2119db35c3 This is step "1" of probably "many" in the process of separating out the
scene management code and organizing it within simgear.  My strategy is
to identify the code I want to move, and break it's direct flightgear
dependencies.  Then it will be free to move over into the simgear package.

- Moved some property specific code into simgear/props/
- Split out the condition code from fgfs/src/Main/fg_props and put it
  in it's own source file in simgear/props/
- Created a scene subdirectory for scenery, model, and material property
  related code.
- Moved location.[ch]xx into simgear/scene/model/
- The location and condition code had dependencies on flightgear's global
  state (all the globals-> stuff, the flightgear property tree, etc.)  SimGear
  code can't depend on it so that data has to be passed as parameters to the
  functions/methods/constructors.
- This need to pass data as function parameters had a dramatic cascading
  effect throughout the FlightGear code.
2003-05-06 23:46:24 +00:00
ehofman
d53b612e2a Move the texture loader to SimGear 2003-04-09 20:28:42 +00:00
curt
67ad32267f Sorry, left in some debugging statements, now removed. 2003-03-31 01:35:26 +00:00
curt
5df9811576 I found 3 problems with the GS modeling in flightgear (all my fault originally
I believe.) :-)

- The height of the navaid was not being properly converted to meters
  before being used in our internal calculations.  This caused the GS
  to be placed too high.

- I was using the wrong trig function to calculate the current approach
  angle of the aircraft.  The distance to the GS source is the euclidean
  point to point distance and represents the hypotenuse (not the ground
  distance) so I need to use asin() rather than atan() to calculate the
  angle.

- I was calculating distance directly to the GS source, rather than
  taking into consideration that the GS transmitter projects a plane,
  so I need to take the distance to the line where that plane intersectso
  the ground.  Previously, the way I modeled my distance calculation, the
  GS transmitter effectively formed a 3 degree cone from the source.  The GS
  transmitter is usually placed a 100 meters or so off the runway edge so
  the cone model could never bring you in to the touch down point precisely.

With these changes, the GS will bring you in precisely to the touchdown
point as defined in the default.ils.gz file (it wouldn't before.)  The only
issue that remains is that it will bring you in to the elevation defined
in the ILS database, which doesn't necessarily match the DEM/SRTM terrain
at that point.  Still on average, this will be a big improvement until we
can do a better job of getting the runway end elevations nailed correctly.
2003-03-31 01:29:23 +00:00
ehofman
729a3b9af7 Cache some nodes 2003-03-30 16:49:48 +00:00
ehofman
1f8da4224c Change the log level of somme messages which can harldy be called allerts 2003-03-30 13:30:25 +00:00
ehofman
cf7839a67b Second update in attempt to create an aircraft selection dialog
New panels are loaded now
  New 3D model gets loaded
  Reinitialize more subsystems
  Add reinit() to FGFX, sound gets reinitialized

  Still a lot needs to be done though.
2003-03-30 12:49:05 +00:00
ehofman
4b62426109 Move current_panel to globals 2003-03-30 12:46:08 +00:00
curt
fcf6021f76 Add a property which specifies if the current nav station has a glideslope. 2003-03-29 03:19:03 +00:00
curt
49cace7a21 Fixed intermittant marker beacon audio. 2003-03-29 03:18:17 +00:00
ehofman
ef37b45dc7 Frederic Bouvier's assorted set of MSVC fixes 2003-03-23 09:59:46 +00:00
curt
3ade4d02e6 Removed SG_USING_STD(for_each) to make MSVC happy(er). :-) 2003-03-21 21:09:21 +00:00
curt
4184882757 Add missing #include <algorithm> which provides a prototype for for_each() 2003-03-21 19:41:04 +00:00
ehofman
4c55a5aeb4 Andy wrote:
This is just a port of an old 3D HUD patch to the new view code.
This pans the HUD with the view, by pasting it onto a quad fixed in front of the viewer.  It also fixes the awful, arbitrary scaling problems the HUD code has.  The old HUD only looks right when viewed at 1024x768 and 55 degree FOV.  This works the scale out magically so that it looks right in all views.  It also redefines the "<compression-factor>" tag in the ladder to (1) mean compression instead of expansion and (2) have non-psychopathic units (now "1" means 1 degree per degree).  Fix this in your existing HUD ladder files before reporting bugs.  It's definitely a cosmetic win -- the velocity vector points at the right thing and the horizon lines up properly.

Norman wrote:

I have created a modified version of Andy's patch that implements the 3D HUD as the 'normal' and the 2D HUD as the 'minimal' HUD.   < i > and < shift I > keys
2003-03-21 15:02:23 +00:00