1
0
Fork 0
Commit graph

429 commits

Author SHA1 Message Date
Tim Moore
b5c46a8d59 Merge branch 'ehofman/sound' 2009-12-20 11:11:16 +01:00
Tim Moore
6324d5a03d Change int to unsigned in sound device traversal 2009-12-07 06:59:04 +01:00
ehofman
3abb7afa45 List all available playback devices under '/sim/sound/devcies' 2009-11-29 15:57:17 +01:00
ehofman
ef4814599d * Fix --disable-sound
* Add a new command line option: --sound-device=""
  This makes OpenAL use the sepcified audio device instead of the default
  output device. (Look for playback devices when calling openal-info of alcinfo)
2009-11-29 15:57:02 +01:00
Tim Moore
ad9366ed99 Merge branch 'ehofman/jsbsim' 2009-11-26 23:31:59 +01:00
Tim Moore
ef152ee411 Merge branches 'durk/scenery' and 'ehofman/fog' 2009-11-06 23:39:17 +01:00
ehofman
290bef5749 MSVC fix 2009-10-26 22:12:10 +01:00
durk
904a99714e Two patches:
1) Fix for the "use custom scenery airport data" property.
2) Make it a little harder for stupid people to make money behind our backs.
2009-10-24 19:53:03 +02:00
ehofman
f9445874a0 Don't make the SoundManager a memebr of the subsystem manager; It needs to be initialized very early and destroyed as late as possible. That doesn't work as a subsystem meber onless some sort of priority scheme gets implemented. Get rid of auto_ptr which doesn work for the samples either. 2009-10-24 19:51:39 +02:00
Tim Moore
21122fa03e Merge branches 'jmt/brakes' and 'jmt/dump' 2009-10-12 11:05:36 +02:00
ehofman
b64259b295 allow disabling sound completely (note: openal gets initialized but shuts down a bit later leaving the soundmanager to handle only very specific commands). At this time by specifying '--prop:/sim/sound/enabled=false', not sure why '--disable-sound' doesn't work properly 2009-10-06 10:23:15 +02:00
ehofman
446b200edc Add the Sound Manager before any other subsystem that uses it. This makes sure the SoundMgr is available at construction time which makes the code much cleaner. Call the update_last() after any other class 2009-10-06 10:23:03 +02:00
ehofman
86f462933d Initial commit of the new sound system, expect more updates to follow 2009-10-06 10:22:09 +02:00
jmt
4d67c69462 A generic, configurable autobrake system. Not fully features yet, but works quite nicely in the 777, including RTO modes and auto-disengage on pilot input. 2009-09-21 22:51:40 +02:00
jmt
14a09673b9 ATIS overhaul by John Denker, adapted to trunk by me.
8:: AWOS is available at AWOS locations.  (Previously only ATIS was
   implemented.)

 9:: ATIS phraseology now more nearly conforms to international
   standard METAR pattern, and therefore to usual FAA practice.(*)

Items marked with a (*) are fully implemented in the /text/ of the
ATIS message, but the voiced version of the message is degraded by
limitations of the FGFS built-in text-to-speech system.

 10:: ATIS now reports sky condition.(*)

 11:: ATIS now reports multiple layers of clouds, not just the lowest
 layer.(*)

 12:: ATIS now takes field elevation into account when calculating
   sky condition and ceiling.

 13:: ATIS now reports dewpoint.(*)

 14:: ATIS now can handle negative quantities (temperature and dewpoint).(*)

 15:: ATIS can now report report fractional-mile visibility.(*)

 16:: ATIS now uses magnetic (not true) wind directions, as it should.

 17:: ATIS generates correct runway number and suffix (nine right,
   one one left).

 18:: ATIS can be received on nav frequencies, not just comm.

 19:: Nothing bad happens if the same ATIS is tuned up on more than
   one receiver.

 20:: ATIS can be updated at times other than at the top of the hour.

 21:: ATIS listens for an "attention" signal, and responds to changes
   in the weather by issuing a new ATIS message (somewhat like a
   "special observation").

 22:: ATIS volume now responds to radio volume setting.

 23:: Area-related services (i.e. approach radar) are handled
   more-nearly consistently with radio-frequency related services.

 24:: ATIS sequence-letter generation has been fixed.

 25:: ATIS messages are now in the property tree, so they can be read
   e.g. via the http interface.
2009-09-18 20:18:54 +02:00
ehofman
ea4a3ee1df Make FGIO a proper subsystem and add a reinit method for the generic protocol. This should allow for easy runtime reloading of the configuration file. 2009-09-09 08:56:31 +02:00
Tim Moore
b588a92b7f adapt to changes in sg_exception interface
sg_location now uses C strings. Also, change uses of sg_throwable to more
specific exceptions like sg_io_exception.
2009-06-16 11:46:47 +02:00
frohlich
28996902a1 Adapt to simgears changes.
The season is already checked by the properties.

Modified Files:
	src/Main/fg_init.cxx
2009-06-03 00:18:54 +02:00
mfranz
095c710c0e leak fixes 2009-05-18 12:24:16 +02:00
torsten
7e3531ef5c Implementation of ridge lift from Patrice Poly based on an algorithm of Ian Forster-Lewis 2009-05-02 00:44:20 +02:00
frohlich
a99ea1c7b5 Port over remaining Point3D usage to the more type and unit safe SG* classes.
Remove leftover headers from plib/sg.

Modified Files:
 	src/AIModel/AIBase.cxx
 	src/AIModel/AIFlightPlanCreateCruise.cxx
 	src/ATCDCL/AIEntity.cxx src/ATCDCL/AIEntity.hxx
 	src/ATCDCL/AIGAVFRTraffic.cxx src/ATCDCL/AIGAVFRTraffic.hxx
 	src/ATCDCL/AILocalTraffic.cxx src/ATCDCL/AILocalTraffic.hxx
 	src/ATCDCL/AIMgr.cxx src/ATCDCL/ATC.hxx
 	src/ATCDCL/ATCDialog.cxx src/ATCDCL/ATCProjection.cxx
 	src/ATCDCL/ATCProjection.hxx src/ATCDCL/ATCutils.cxx
 	src/ATCDCL/ATCutils.hxx src/ATCDCL/approach.cxx
 	src/ATCDCL/commlist.cxx src/ATCDCL/ground.cxx
	src/ATCDCL/ground.hxx src/ATCDCL/tower.cxx
 	src/ATCDCL/tower.hxx src/Airports/calc_loc.cxx
 	src/Airports/dynamics.cxx src/Airports/groundnetwork.cxx
 	src/Airports/parking.cxx src/Airports/runwayprefs.cxx
 	src/Airports/simple.cxx src/Cockpit/cockpit.cxx
 	src/Cockpit/hud.hxx src/Cockpit/hud_card.cxx
 	src/Cockpit/hud_rwy.cxx src/Environment/environment.cxx
 	src/FDM/UFO.cxx src/FDM/SP/MagicCarpet.cxx src/GUI/dialog.hxx
 	src/Instrumentation/HUD/HUD.hxx
 	src/Instrumentation/HUD/HUD_runway.cxx
 	src/Instrumentation/KLN89/kln89.cxx src/Main/fg_init.cxx
 	src/Main/viewer.cxx src/Main/viewmgr.cxx
 	src/Model/panelnode.cxx src/MultiPlayer/mpmessages.hxx
 	src/Scenery/tilemgr.cxx src/Traffic/SchedFlight.cxx
 	src/Traffic/TrafficMgr.cxx
2009-03-18 08:00:08 +01:00
mfranz
79ad3d44b8 create $FG_HOME/Export/ 2009-01-12 13:03:40 +01:00
jmt
f1b10eddfa FGAirportList is gone. Everything should work as before, especially the
AirportList dialog. (It would now be possible to trivially implement a
VOR or NDB named search, if anyone wants such a thing).
2008-12-27 13:20:08 +00:00
jmt
0f4f044a94 Kill off many Point3D includes, and a couple of uses in the HUD code.
Requires a SimGear update to get some new SGGeodesy helpers.
2008-12-26 12:28:05 +00:00
jmt
988de9dbca Remove all name and spatial queries from FGNavList. All remaining queries are
by frequency (which makes sense), and use the FGPositioned spatial data if
required. As a result, the marker beacon list is gone (since beacons are only
searched spatially). In the process, clean up various minor things - most
notably, all the 'airport-related' navaids (ILS, GS, LOC, and the beacons) now
store a FGRunway* instead of an airport id string. This is more precise, and
saves string allocations.
2008-12-25 23:11:43 +00:00
jmt
059f2e6a8e Convert the only remaining user of FGFixList to use an FGPositioned query,
and hence remove the query code from fix-list. The only remaining code deals
with parsing fix.dat.
2008-12-23 14:41:58 +00:00
timoore
5f7441f778 Restore camera properties on reInit
From Tatsuhiro Nishioka
2008-11-25 22:50:20 +00:00
mfranz
76b609738f set /sim/rendering/particles as global particle switch 2008-10-17 21:25:03 +00:00
mfranz
b6a354980d make isatty() available for stdout/stderr (hope it works on MS Windows) 2008-10-01 15:03:53 +00:00
fredb
9ebb9128c8 MINGW patch by Csaba Halasz, reworked by me to avoid breaking MSVC or Cygwin build 2008-09-28 08:27:32 +00:00
ehofman
fe020badf0 James Turner:
By way of example, here's a patch to make the position init code (in fg_init.cxx) cleaner, partly thanks to the FGPositioned changes. It reduces the file size by 200 lines - virtually all of which was copy-and-paste. Once the remaining class (FGAirport) is converted to inherit FGPositioned, all the future patches should be like this - touching one or a few files at most.

This factors the start-offset logic out into a helper, which also does the final property setting (which has to happen on both the /preset and 'real' values). Using the accessors in FGPositioned, and the offset helper, a couple of cases become trivial (fix and nav) and others become much simpler.
2008-09-13 08:06:15 +00:00
ehofman
bb2b03c7e3 James Turner:
Convert FGNavRecord to inherit FGPositioned. This is much more self-contained than the FGRunway change, since FGNavRecord already had good encapsulation of its state. However, it's a large diff due to moving around two nasty pieces of code - the 'align navaid with extended runway centerline' logic and the 'penalise transmitters at the opposite runway end' logic.

In general things are more readable because I've replaced the Navaid type enum, and the use of Robin's integer type codes, with   switches on the FGPositioned::Type code - no more trying to recall that '6' is an outer marker in Robin's data. The creation code path is also pushed down from navdb into navrecord itself.
2008-09-12 08:46:15 +00:00
ehofman
aa78341698 James Turner:
Convert FGRunway to be heap-based, and inherit FGPositioned. This is a large, ugly change, since FGRunway was essentially a plain struct, with no accessors or abstraction. This change adds various helpers and accessors to FGRunway, but doesn't change many places to use them - that will be a follow up series of patches. It's still a large patch, but outside of FGAirport and FGRunway, mostly mechanical search-and-replace.

An interesting part of this change is that reciprocal runways now exist as independent objects, rather than being created on the fly by the search methods. This simplifies some pieces of code that search for and iterate runways. For users who only want one 'end' of a runway, the new 'isReciprocal' predicate allows them to ignore the 'other' end. Current the only user of this is the 'ground-radar' ATC feature. If we had data on which runways are truly 'single-ended', it would now be trivial to use this in the airport loader to *not* create the reciprocal.
2008-09-11 08:38:09 +00:00
ehofman
3b486e1aee James Turner:
Here's part 2 - converting FGFix (the simplest one) to be both heap-based and inherit FGPositioned. One minor benefit from this is replacing some dangerous code in FGFixList which used to return the address of an iterator member ('&it->second'). To keep the diff a sensible size, I'm not updating the callers to use the richer FGPositioned types - i.e replacing separate lat/lon handling with SGGeod. I will make those cleanups, but in future patches.
2008-09-10 08:54:49 +00:00
durk
301054204e James Turner: Improved runway management code:
- Runways are now part of an airport, instead of a separate list
 - Runways are no longer represented as a boring struct, but as a class
   of their own.
 -Improved runway access to unify various runway access methods.
2008-08-14 18:13:39 +00:00
ehofman
429f2530de James Turner:
* experimental clean-up / reduction on two of the FG headers:
   (I'm going to await feedback on the developers list before doing more of
    these, to avoiding going over files multiple times, but in principle it
    seems pretty straightforward.)

 * final fixes for SG_USING_STD removal
2008-07-29 08:27:48 +00:00
ehofman
667e64e1eb - remove the SG_GLxxxx_H #defines, since OSG provides its own versions
- this exposed a bizarre issue on Mac where dragging in <AGL/agl.h> in
   extensions.hxx was pulling in all of Carbon to the global namespace
   - very scary. As a result, I now need to explicitly include CoreFoundation
   in fg_init.cxx.
 - change SG_USING_STD(x) to using std::x
2008-07-27 16:25:13 +00:00
fredb
41f7fc256c Remove unused variables 2008-07-27 09:45:33 +00:00
ehofman
46ae218672 remove all the FX and XMESA cruft relating to Glide support. 2008-07-27 07:54:13 +00:00
fredb
25bda87015 Balloon and MagicCarpet already moved to SP_FDM 2008-07-25 21:56:49 +00:00
ehofman
d9bfd5a425 This should apply, and everything should build cleanly, in isolation from the
SimGear change. It changes all the SG_xxxx to be the 'real' includes, and gets
rid of many #ifdef SG_HAVE_STD_INCLUDES. As an added bonus, rather than
replacing 'SG_USING_NAMESPACE(std)' with 'using namespace std', I just fixed
the small number of places to use std:: explicitly. So we're no longer polluting
the global namespace with the entire contents of std, in many cases.

There is one more 'mechanical' change to come - getting rid of SG_USING_STD(X),
but I want to keep that separate from everything else. (There's another
mechnical change, replacing <math.h> with <cmath> and so on *everywhere*, but
one step at a time)
2008-07-25 18:38:29 +00:00
ehofman
eccddb3dfd Attached patches remove BORLANDC, and hence SG_MATH_EXCEPTION_CLASH and SG_INCOM
PLETE_FUNCTIONAL from SimGear and FlightGear.

As a result, SG_HAVE_STD_INCLUDES is now *always* set, so I will get the boring
fixes for that done, but separately. I'm still auditing the other things in comp
ilers.h - there's a lot that can die now BORLAND is gone.
2008-07-25 10:39:53 +00:00
ehofman
c8a9fd2bd4 Some Mac / __APPLE___ cleanups:
- remove the OSX_BUNDLE crap *I* introduced years ago - we're always a a bun
dle on Mac now.

    - fix up the default fg-root on Mac to be FlightGear.app/Contents/Resources/
data - i.e the location used by the macflightgear.org distro, and indeed the obv
ious 'correct' location. Not sure why I didn't use that in the first place, back
 in the day.

    - remove the CPSForegroundEnable hack. For one thing, we're a bundle and don
't need it, and for another, osgViewer on Mac does the same logic using a newer,
 public API rather than a hack into the OS.

    - remove the strange logic for doing fgOSInit 'early' (in bootstrap rather t
han main) when running from the command line on Mac; again this is obsolete, and
 no one seems to know why it was ever necessary. I guess it was an interaction w
ith SDL when running without a bundle.

    - (not Mac related) remove obsolete code bracketed by ENABLE_PLIB_JOYSTICK a
nd USE_GLIDE (neither of which are ever set, even from config.h that I can see)
in main.cxx
2008-07-25 08:39:28 +00:00
ehofman
6c4061bdc5 Remove the remaining macintosh (not MacOS-X) and MWERKS workarounds. 2008-07-25 07:29:20 +00:00
mfranz
1ace68e836 don't run the help browser from a property that a user could have
changed to something evil, but rather make sure that the browser
string can be trusted. (TODO: change system() to vfork()/execvp() ?)
2008-07-09 19:35:53 +00:00
mfranz
9f571a0f00 remove depreciated gui_local.[ch]xx:
- drop unused parts (MouseQuat/GuiQuat)
- move "old-reinit-dialog" fgcommand to fg_command.cxx under new name
  "reset" for now. (May later get merged with fgcommand "reinit".)
- move reInit() to fg_init.cxx: This was used by Shift-Esc and
  Menu->File-Reset (via fgcommand "old-reinit-dialog"). We have already
  a similar function fgReInitSubsystems() in fg_init.cxx, so these two
  functions will probably get merged later.)
2008-07-09 12:22:33 +00:00
mfranz
889f3926f2 - make sure /sim/fg-current can't get preset and write protected, so
it's reliable at Nasal init time.
- make sure the cwd buffer is terminated
2008-06-22 11:29:32 +00:00
mfranz
afc5225272 - allow users to set fg-home dir via FG_HOME environment variable, but
- don't allow to do that from any XML file. This is to prevent malign
  code from writing a new fg-home in ~/.fgfs/autosave.xml or other files
  in ~/.fgfs/.
2008-06-13 10:52:47 +00:00
timoore
32e9505eed Clean up header file use of iostream and "using" declarations
Replace include <iostream> with istream, ostream and/or iosfwd as
appropriate.

Remove using namespace std and using std::foo from header files.
2008-06-02 21:09:51 +00:00
durk
4e24fba0d5 Merging David Luff's AI/ATC code with AIModels. Part 1:
- Move Dave's original code to a new directory (ATCDCL) so we can recycle
    the original ATC directory for generic ATC functions.
2008-05-12 10:38:04 +00:00