1
0
Fork 0
Commit graph

846 commits

Author SHA1 Message Date
James Turner
099d6475fd CMake update for new KLN89 file. 2010-12-19 15:45:36 +00:00
James Turner
a91ec5f9f9 Initial work on CMake build files, with considerable help from Olaf Flebbe. 2010-12-19 15:06:04 +00:00
ThorstenB
2302f04095 fix NAV receiver vs GPS bugs
Allow switching off slaved-to-gps (resynch NAV radio/update all NAV outputs)
Allow tuning NAV stations and keep DME alive when slaved to GPS
Clear station ID and heading when loosing NAV signal
2010-12-11 12:37:39 +01:00
Dave Luff
d73a3cd207 KLN89: Move units configuration out of dclgps and into KLN89 2010-12-09 23:34:37 +00:00
Dave Luff
2102c3c9ff KLN89: Add initial implemenation of ALT pages.
The user can now set the KLN89 baro pressure setting, but this is
not currently used since currently the unit performs no VNAV calcs.
2010-12-09 22:31:34 +00:00
Dave Luff
d450900e0b KLN89: Fix a tiny UI bug - don't draw the indicator bar on the DTO page 2010-12-08 19:03:54 +00:00
Dave Luff
9eca656a98 KLN89: Remove several bugs related to OBS mode 2010-12-07 17:34:30 +00:00
Dave Luff
e6aea6dcde KLN89: Allow user to set default first char of waypoint as per real life unit. 2010-12-06 22:50:37 +00:00
Dave Luff
59a22860ff Merge branch 'next' of gitorious.org:fg/flightgear into next 2010-12-05 23:41:59 +00:00
Dave Luff
f234f76287 KLN89: Add user-adjustable minimum brightness setting. 2010-12-05 23:40:05 +00:00
ThorstenB
138449f4bd Avoid exceptions in route manager module.
Avoid segfaults in gps when route manager doesn't throw exceptions.
Minor fix when removing waypoints by negative index.
2010-12-05 21:26:51 +01:00
ThorstenB
ebbd5bfd05 fix bug #177: crash caused by route manager/gps/navradio
Uninitialized variables were sources for NaN values.
Once NaNs are passed to Nasal (through (tied) properties), these cause
a crash. Nasal cannot handle NaNs - it interprets these as pointer values...
2010-12-05 20:35:21 +01:00
Dave Luff
7a0c2c2e8a KLN89: Move some KLN89 specific configuration from dclgps to kln89 2010-12-05 17:36:32 +00:00
Dave Luff
d1601ff8b2 KLN89: Fix ARINC 424 loader for airports with parallel runways.
To load approach data into the KLN89, drop an ARINC 424 format file
named "rnav.dat" into the data/Navaids directory.  The loader has
been tested on the 424-18 data revision, so may need tweaking for
the latest data.  Currently about 97% of the listed US non-precision
approaches are loaded, the majority of the failures appear to be due
to 1-digit runway code offsets between the flightgear airport data
and the ARINC data due to magnetic variation changes.
2010-12-05 10:57:36 +00:00
Dave Luff
316f68cbf1 KLN89: Remove hardwired instrument approach, and add initial support for loading non-precision approaches from ARINC 424 format data. Currently fails on airports with multiple parallel runways. 2010-12-04 16:55:26 +00:00
James Turner
a9a1734f1e Fix bug 191, uninitialised HUD color. 2010-12-02 00:41:29 +00:00
ThorstenB
7a2e1be5bf GPWS: change default source to match all FDMs
Provide another built-in altitude source to hook a radio-altimeter instrument
2010-12-01 22:57:35 +01:00
Csaba Halasz
c5c895dae2 Merge commit 'refs/merge-requests/14' of git://gitorious.org/fg/flightgear into next 2010-11-30 00:42:34 +01:00
Csaba Halasz
674a295896 Merge commit 'refs/merge-requests/13' of git://gitorious.org/fg/flightgear into next 2010-11-30 00:26:22 +01:00
Torsten Dreyer
f33d26d51c Warning fix: unused variables 2010-11-26 16:14:43 +01:00
Dave Luff
7ac304398b KLN89: Small improvement to flightplan page: dash out invalid distances when entering a new waypoint 2010-11-23 18:03:13 +00:00
Dave Luff
438cb4a462 KLN89: Jump to the next position in the flightplan after waypoint entry, as per the real-life unit 2010-11-23 16:29:53 +00:00
Dave Luff
3ac2f000d2 KLN89: Fix small bug in FPL pages due to comparison against a negative quantity with unsigned variables 2010-11-23 16:29:21 +00:00
Dave Luff
c171c44653 KLN89: Allow CLR to abort flightplan waypoint entry at the waypoint review page, as per the real-life unit 2010-11-23 12:21:25 +00:00
Dave Luff
c6276f5845 KLN89: Fix both incorrect behaviour and a segfault when deleting a partially-entered waypoint in the flightplan pages 2010-11-23 10:51:37 +00:00
Dave Luff
c30c183999 KLN89: Fix some bugs in the flightplan page text entry. Basically, draw the text entry string instead of the dummy waypoint ID. 2010-11-23 10:15:10 +00:00
Dave Luff
dbd3e7077d KLN89: Change to more meaningful function names, and always clear the buffer after drawing. 2010-11-22 22:21:09 +00:00
Dave Luff
cd420dadf7 KLN89: Fix clipping bug affecting the KLN89 map page. Pixels and lines must be clipped when being put into the buffer, since the clip region may change before the buffer is rendered. Also, the wrong DrawPixel function was called from the oldDrawLine function. 2010-11-22 21:34:24 +00:00
Dave Luff
0b941b759a KLN89: Round properly when converting map points to pixel locations 2010-11-21 20:46:14 +00:00
Dave Luff
95f244b741 KLN89: Update obsolete email address 2010-11-21 17:14:15 +00:00
Dave Luff
34cbe3623b KLN89: Update obsolete email address 2010-11-21 17:13:41 +00:00
Dave Luff
650483f1d3 KLN89: Cleanup - fix broken indentation and email address, and replace tabs with spaces 2010-11-21 17:05:33 +00:00
Dave Luff
35e63ca406 Fix copy-and-paste error which resulted in right inner knob having left inner knob function whilst setting ID in flightplan pages 2010-11-21 15:56:15 +00:00
Dave Luff
19d94f21e2 Clean up indentation and then replace tabs with spaces 2010-11-21 14:16:43 +00:00
Dave Luff
80badf9fc5 Clarify comments 2010-11-21 09:59:49 +00:00
Vivian Meazza
6ac7271d80 Add oitput to property tree.
Signed-off-by: Vivian Meazza <vivian.meazza@lineone.net>
2010-11-19 09:55:36 +00:00
Vivian Meazza
a68b07e67a Add Alignment settable at runtime, and add movement-induced errors.
Signed-off-by: Vivian Meazza <vivian.meazza@lineone.net>
2010-11-18 23:48:58 +00:00
Vivian Meazza
f51f15eb50 Merge branch 'next' of D:\Git_New\flightgear into next 2010-11-14 22:24:00 +00:00
Frederic Bouvier
3209a4db09 MSVC: ensure that HAVE_VERSION_H always has a value 2010-11-14 15:33:08 +01:00
James Turner
1dbe833579 Use updated version.h if available.
Add single fallback header if version.h is missing.
2010-11-13 18:58:55 +00:00
Christian Schmitt
0a5e86f4e6 remove old .cvsignore files 2010-11-11 01:16:29 +01:00
Vivian Meazza
8ec60b663d Merge branch 'next' of D:\Git_New\flightgear into next 2010-10-29 20:59:01 +01:00
ThorstenB
7dd2cf19e8 Fixed some compiler warnings.
Please the compiler (gods).
2010-10-29 21:14:09 +02:00
James Turner
d1a4590721 Goodbye old HUD - and the archeology it depended upon in cockpit.cxx 2010-10-29 08:47:58 +01:00
Vivian Meazza
02fb83c774 Merge branch 'next' of D:\Git_New\flightgear into next 2010-10-28 17:35:03 +01:00
Vivian Meazza
0840b188d2 Re-interpret gyro wander under g-forces
Signed-off-by: Vivian Meazza <vivian.meazza@lineone.net>
2010-10-28 17:32:22 +01:00
James Turner
0320010d95 Make use of view[0] in HUD-runway lazy. 2010-10-28 13:54:01 +01:00
James Turner
984900d84d Make v2 HUD a top-level subsystem, so it can be reinit()ed correctly. 2010-10-24 07:10:02 +01:00
James Turner
3464eef711 Make the v2 HUD support reinit(), so HUDs can be reloaded at runtime. 2010-10-22 19:11:24 +01:00
James Turner
d573cb43a0 Move three more subsystems into the init + update scheme - fixes some crashes found by papillion. 2010-10-22 16:44:37 +01:00
James Turner
308fd1b112 Automake build fixes for airways commit. 2010-10-20 11:48:06 +01:00
James Turner
dd2eec7bd8 Airways/procedures code - add new data structures to store waypoints and
procedures, and routing algorithms, and modify the GPS, route manager and
WaypointList to use the new objects.
2010-10-20 09:02:02 +01:00
Tim Moore
f901dac2ac replace GLU functions with OSG functionality 2010-10-08 23:48:01 +02:00
Thorsten Brehm
a1137ed940 Another GPWS fix: terrain clearance filter must be reset on reset/reposition.
Queue of recent altitude samples must be cleared on reset/reposition to avoid nuisance alerts...
2010-10-05 22:34:23 +02:00
Thorsten Brehm
9be636555c Fixed navradio when shutting down/restarting nav receiver.
"nav-loc" and "has_gs" properties were not updated when nav receiver was rebooted.

Shutting down the nav receiver clears all nav outputs (including "nav-loc" and "has_gs").
=> When nav receiver is powered again, all outputs must be updated.
=> "nav-loc" and "has_gs" are only updated when active nav station changes.
=> old nav station must be cleared on shutdown to enforce update on nav reboot...
2010-10-05 22:34:08 +02:00
Thorsten Brehm
e7b58d48e3 Fix wxradar to use path resolution
make it work with the new "multiple aircraft dir" feature
2010-10-02 00:40:24 +02:00
James Turner
1afd4e602e Get rid of FGGeneral; expose equivlanet values via properties. 2010-10-01 09:33:31 +01:00
Thorsten Brehm
c7423cbcea - Fixed mk-viii sound sample loader: missing "/".
- Fixed triggering of debug assertion "altitude_callout_voice != NULL" when
  altitude callouts were delayed by higher priority warnings.
- Fixed performance bug: MK_VIII::IOHandler::TerrainClearanceFilter::update
  sucked CPU time (top #12 in profiler), due to complex "moving average"
  calculation on a queue of hundreds/thousands of altitude samples.
  Also, pausing the sim caused this queue to grow excessively (by one sample
  per update loop) => resuming the sim after pausing it for a long time
  resulted in the TerrainClearanceFilter sucking even more CPU time...
  => Number of altitude samples is now limited to 5 samples/sim-time-second
  (still more than enough to calculate a stable average).
2010-09-30 23:18:13 +02:00
James Turner
d5e0bc3b89 Thorsten Brehm:
* Fixed segfault when GPWS finds a matching airport but no suitable runway.
* Fixed several sim deadlocks when GPWS alerts trigger at "strange"
heights (e.g. initial alert height is -5ft or 1e-29...).
* Avoid repitition of GPWS alerts below 30ft, i.e. avoid excessive
repitition when plane becomes airborne at bumpy landings.
2010-09-20 09:06:30 +01:00
James Turner
8330449c5f Pass current-dir into XMLSound
(and update to revised SGSoundSample ctor)
2010-09-06 09:28:28 +01:00
James Turner
ae50c054a9 Fix crashes (activating the route-manager) with a default GPS. 2010-08-16 17:10:12 +01:00
James Turner
57cb0a809b Fix bug 150 (airports not found in GPS search)
Overhaul and simplify the GPS search logic based
on experience and testing with the API. Also fix
search-by-name, which was broken.
2010-08-14 19:16:28 +01:00
James Turner
71fbacc6dc Thorsten Brehm: GPWS: Fixed permanent blocking of lower prio warnings
Only block callouts which were actually issued to the pilot. When
multiple callouts trigger at the same time, allow lower prio warnings
to be issued once the higher prio ones are resolved.
=> Gear/flap warnings are now working reliably (no longer blocked
permanently when altitude callouts are enabled).
2010-08-14 10:23:13 +01:00
Torsten Dreyer
bc31bdbbbb use simgear::strutils::rpad() instead of strncpy() 2010-08-12 13:03:26 +02:00
James Turner
cc7a9d4727 Make even more implict includes explicit. 2010-08-07 13:00:33 +01:00
James Turner
c61a14afdd Once again, I forgot that we bind() subsystems *before* init(). 2010-08-01 23:50:52 +01:00
James Turner
7aba4333a2 Reset - instruments can be re-inited now (reloads XML files) 2010-08-01 19:04:31 +01:00
James Turner
d9236f33b2 Remove use of simgear/screen/extensions.h. 2010-07-31 15:15:40 +01:00
Durk Talsma
314f3c5718 Properly compile kln89 code without reliance on ATCDCL. 2010-07-31 13:35:22 +02:00
James Turner
cba5066a6b Thorsten: EGPWS fixes!
* Fix issue #139, uninitialized variable causing sim deadlock in MK_VIII::Mode5Handler::get_soft_bias
* Fix more uninitialized variables sometimes causing warnings not to work.
* Fix some warnings only working on a single approach (missing reset).
* EGPWS self-test can now be triggered more than once (missing reset).
* Implement configuration options for attitude and altitude input selection.
2010-07-30 09:20:36 +01:00
James Turner
ab495d1370 Add --fg-aircraft option, and aircraft dir path list. Partial support in places that load files, for respecting the setting.
Add helper to look for an aircraft branch path in multiple candidate locations.
Update the main subsystems to use the helper, and hence load from any aircraft dir.
2010-07-28 22:03:10 +01:00
James Turner
d1852430bf Make various implicit includes (via PLIB) explicit. 2010-07-28 10:25:42 +01:00
James Turner
9604908a8d Remove all (2) uses of simgear/math/vector.h from FlightGear. 2010-07-23 13:26:07 +01:00
James Turner
37054a4960 Include of aircraft.hxx that slipped under the radar, oops. 2010-07-02 01:03:10 +01:00
James Turner
01e0156b5d Remove current_aircraft global, fgAIRCRAFT struct, and dead code for reading aircraft dirs. 2010-07-01 22:33:51 +01:00
James Turner
a0588272dc Merge branch 'topics/mainloop' into next 2010-06-26 15:30:00 +01:00
James Turner
85be9be1e0 Initial work on FDM shell, and removal of cur_fdm_state 2010-06-26 10:31:22 +01:00
Erik Hofman
de3afcce99 gcc issues 'format not a string literal and no format arguments' when running -Werror, trick gcc into thinking everything is alright. 2010-06-26 09:36:48 +02:00
Mathias Froehlich
721566a6e7 Fix some more unitialized value warnings. 2010-05-29 17:17:49 +02:00
Tim Moore
664bb77d95 Merge branch 'jmt/gps' into next 2010-05-05 12:02:16 +02:00
jmt
1222e9b094 Fix a crash if startup fails before the navradio is inited. 2010-05-05 12:02:07 +02:00
Tim Moore
0447581255 Merge branch 'jmt/gps' into next 2010-04-19 09:56:39 +02:00
torsten
0750d8a6d4 gps warning fix (xxx will be initialized after yyy) 2010-04-19 09:56:32 +02:00
Tim Moore
ebdeb3eed3 Merge branch 'jmt/gps' into next
Conflicts:
	src/Instrumentation/navradio.cxx
2010-03-28 15:32:59 +02:00
fredb
1c7278b474 Initialise member variable 2010-03-28 15:26:43 +02:00
jmt
e4c4a3a412 MapWidget for the GUI, initial commit. 2010-03-28 15:25:47 +02:00
jmt
ee8437431a Expose a flag indicating if the GPS is driving the AP (to give clearer user feedback when that is the case) 2010-03-28 15:21:05 +02:00
Tim Moore
1aff92ce49 Merge to get true base of James' recent gps changes 2010-03-28 15:20:09 +02:00
Tim Moore
70ebde4488 Merge branch 'jmt/gps' into next
Conflicts:
	src/Instrumentation/gps.cxx
2010-03-28 00:34:51 +01:00
jmt
4e24fbbb91 GPS: enable switching to OBS/DTO mode with no valid scratch - use active waypoint. 2010-03-28 00:33:44 +01:00
jmt
40e383451b GPS: add NS and EW velocity computation, which some real-world devices display. 2010-03-28 00:33:29 +01:00
jmt
4265b2e241 GPS: make slaved-to-gps read course from the GPS *when active*, via a listener. 2010-03-28 00:33:13 +01:00
jmt
0be2e03d7e GPS: fix bugs where GPS overwrites NAV1 course, including --nav1 command line 2010-03-28 00:32:34 +01:00
Tim Moore
37d3cf7fbb Merge branch 'syd/ias-limit' into next 2010-03-27 19:06:53 +01:00
jmt
5695395dd5 Add Mach/TAS computation to the airspeed indicator. 2010-03-27 19:06:42 +01:00
Tim Moore
7cde2e800b Merge branch 'syd/ias-limit' into next 2010-03-20 18:45:52 +01:00
jmt
432da86c7b Read airspeed-indicator overspeed limit values from instrument configuration, as Syd intended. 2010-03-20 18:45:43 +01:00
Tim Moore
a357aad365 Merge branch 'syd/ias-limit' into next 2010-03-16 15:12:46 +01:00
jmt
b1855b34c6 Syd Adams: only define overspeed-indicator properties when enabled. 2010-03-16 15:12:38 +01:00
jmt
65ad38ccae Airspeed indicator: add default values for overspeed, and rename the
enable property to 'has-overspeed-indicator'.
2010-03-16 15:12:26 +01:00
Tim Moore
dd7a5dd32d Merge branch 'syd/ias-limit' into next 2010-03-11 08:58:45 +01:00
jmt
45a446dfaf Syd Adams:
add ias-limit (brarber-pole) computation to airpseed-indicator
    expose selected DME frequency on the DME instrument
2010-03-11 08:58:23 +01:00
Tim Moore
7ee645aa20 Merge branch 'timoore/getpath-rebase' into next 2010-03-09 11:25:18 +01:00
Tim Moore
7ff80d11a0 changes for SGPropertyNode::getPath return type
It's now a std::string.
2010-03-09 11:24:45 +01:00
Tim Moore
fa7d9ed549 Merge branch 'jmt/gps' 2010-03-09 11:20:04 +01:00
Tim Moore
2a0fcea8a5 Merge branch 'vivian/tachy' into next 2010-03-09 10:39:30 +01:00
torsten
cb81aa9f65 one more gcc warning fix: xxx will be initialized after yyy 2010-03-09 10:39:02 +01:00
Tim Moore
37d0cfd6be Merge branch 'vivian/tachy' into next 2010-02-26 08:47:41 +01:00
V Meazza
f112fc4638 Revised bugfix for tachymetric gunsight 2010-02-26 08:46:15 +01:00
Tim Moore
4a14f8c107 Merge branch 'jmt/navradio' into next 2010-02-17 07:29:44 +01:00
jmt
3fb898643e Bugfix: don't crash on localizers with no associated runway (due to inconsistent nav.dat/apt.dat). Reported by Jacob Burbach. 2010-02-17 07:29:30 +01:00
Tim Moore
f9bbf802e9 Merge branch 'jmt/gps' into next 2010-02-14 00:27:41 +01:00
jmt
5ed73d063c Bugfix: ensure GPS WP1 Mag-bearing is normalised to [0..360] 2010-02-14 00:27:30 +01:00
Tim Moore
4027a92f88 Only draw tachymetric sight if appropriate inputs exist
This avoids triggering asserts for missing inputs.
2010-02-11 00:13:04 +01:00
Meazza@.(none)
aa8bccf93e Add Tachymetric Gunsight
Signed-off-by:  <V Meazza>
2010-02-10 16:19:06 +01:00
Tim Moore
988a6771aa Merge branch 'durk/atcdcl-cond'
Conflicts:
	src/ATC/trafficcontrol.cxx
	src/Main/Makefile.am
2010-02-10 00:45:06 +01:00
Tim Moore
992b7ca8f4 Merge branch 'jmt/navradio' 2010-02-10 00:41:52 +01:00
jmt
49e477f6a7 Bugfix: ensure navradio nav-loc and has-gs properties clear to false when no valid station is tuned / radio is u/s. 2010-01-31 15:11:25 +01:00
Tim Moore
6044d929d4 eliminate some SGPropertyNode_ptr variables in classes
These were temporary variables that were being deleted explicitly, leading to
various corruption.
2010-01-26 17:19:17 +01:00
durk
546d3e265d And this time, fix it more properly. :-) 2010-01-21 06:25:31 +01:00
durk
16dd34839f Replacement code for ATCDCL functions are in ATC/atcutils.[ch]xx. Thanks to Alex Buzin for reporting. 2010-01-21 06:25:19 +01:00
Tim Moore
13ec36af42 Merge branch 'jmt/gps' 2010-01-17 10:52:48 +01:00
ehofman
8da2f1a31b Use SGPropertyNode_ptr wherever possible 2010-01-17 00:03:06 +01:00
Tim Moore
c1bb4aec97 Merge branch 'vivian/trainz' 2010-01-17 00:02:51 +01:00
jmt
10d4799058 GPS: improve reliability (at the expense of some in-development features) for pending release.
- default to an invalid altitude in routes, instead of cruise altitude (temporarily)
- only set an altitude on the autopilot, if valid
- only add departure airport/runway to the route, if not airborne
2010-01-16 16:00:15 +01:00
jmt
21f1fcd17a GPS:
- relaxed overflight sequencing threshold
 - default to linear CDI deviation in the configuration
2010-01-16 16:00:15 +01:00
Tim Moore
cf9a520a9f Merge branch 'curt/navradio'
Conflicts:
	src/Instrumentation/navradio.cxx
2010-01-13 07:37:44 +01:00
Tim Moore
3836abcf4b Merge branches 'jmt/spatial', 'jmt/ref_ptr', 'jmt/navradio' and 'jmt/gps' 2010-01-12 00:09:19 +01:00
durk
d8ae90801a Some additional changes to ensure that FlightGear at least compiles after configuring with --disable-atcdcl. Some substitution code is added in ATC/atcutils.cxx and ATC/atcutils.hxx. Note that the new code doesn't run properly yet. Instead, it is just meant to identify which parts need replacement. Getting that to work will be the next step. 2010-01-05 22:21:49 +01:00
torsten
149c6acc85 purge gcc warnings:
- xxx will be initialized after yyy
- age_factor may be used uninitialized
2010-01-03 10:35:33 +01:00
jmt
38e76a175e Navradio: constructor cleanup, tie/untie helper, and a new 'operable' property to make it clear when the radio is functioning. 2009-12-27 10:03:08 +01:00
jmt
7a007d9638 OSG ref_ptr fix: use .get() explicitly. 2009-12-27 09:32:18 +01:00
jmt
8cfdfb21a5 GPS / route-manager: only drive autopilot true-heading in LEG mode, for compatibility with the old behaviour. 2009-12-23 09:40:58 +01:00
jmt
053d405a5c GPS: make 'loadRouteWaypoint' robust about bad scratch/index values. 2009-12-22 07:44:24 +01:00
jmt
d3d17d9ec0 Fix GPS SGPropertyNode tie() handling, as suggested by John Denker. 2009-12-22 07:42:14 +01:00
jmt
45d0e14cad JSD: Make false courses work for more than one instance of navradio. 2009-12-22 07:41:30 +01:00
Csaba Halasz
41752bab57 Fix NaNs in TACAN::update 2009-12-22 07:16:44 +01:00
Tim Moore
b5c46a8d59 Merge branch 'ehofman/sound' 2009-12-20 11:11:16 +01:00
James Turner
34bbc6d974 Rewrite the spatial index to use a sparse octree on the cartesian coordinates of items.
* Fixes errors selecting 'nearest' items, including duplicates
* Stable behaviour around the poles and dateline
* Decently efficient, even for 'everything within 500nm' queries
2009-12-19 23:13:17 +01:00
curt
ea281051d8 Compute glide slope target rate of climb in fpm as well as fps. 2009-12-18 07:10:13 +01:00
jmt
35cb89626e As discussed on the mailing list, make the 'nearest' GPS command use scratch lat/lon as the search origin if they are valid. 2009-12-12 00:11:41 +01:00
Tim Moore
582a95f0cb small cleanup to vivian's patch 2009-12-09 09:23:20 +01:00
Tim Moore
3922c12163 Vivian Meazza: AI escorts 2009-12-09 09:04:23 +01:00
ehofman
fde1a925fe Change of thoughts since it makes life easier:
/sim/sound/working		enable/disable the use of OpenAL
/sin/sound/enabled		master mute/unmute
2009-11-30 22:45:23 +01:00
Tim Moore
6fcd9f967b Merge branch 'luff/kln89' 2009-11-27 06:41:43 +01:00
Tim Moore
e503591af4 Merge branch 'jmt/gps'
Conflicts:
	src/Instrumentation/gps.cxx
2009-11-27 06:40:47 +01:00
jmt
33058511de Dave Perry:
Allows using a nasal filter to smoothly park the gs needle when out
of range or frequency changes to a station w/o gs.
2009-11-15 01:31:42 +01:00
daveluff
e1af876a65 Enable correct DTO waypoint selection 2009-11-07 08:56:55 +01:00
daveluff
eb382545c5 Allow all approaches to be selected at airports with more than 3 approaches 2009-11-07 08:56:36 +01:00
Csaba Halasz
52c1061e24 Re-apply the reciprocal patch from cvs rev 1.3 and correct an order of magnitude regression in HeadingIndicatorFG 2009-11-07 07:53:49 +01:00
torsten
58f303e464 Ron Jensen:
This little patch makes the KT-70 read 888-8888 when in self-test mode.
This is the correct behavior, the current behavior, where it reads the
flight level and squawk code in self-test is incorrect.
2009-11-06 23:46:02 +01:00
daveluff
24b57ada09 Allow the DIR page to be exited properly using the inner knob 2009-11-04 23:15:48 +01:00
daveluff
00d9abef42 Make the comments about switching to the DIR page more useful 2009-11-04 23:15:41 +01:00
jmt
53b16caec0 Check for an empty search query in GPS searches, and fix test code. 2009-10-27 22:22:03 +01:00
daveluff
f696c541be Remove the unecessary distinction between waypoints of the core approach and waypoints of the missed approach procedure 2009-10-27 22:21:52 +01:00
daveluff
0112b24540 Expand SIAP idents as found in FAA ARINC dataset to the full approach name as shown on the approach chart and possibly the GPS 2009-10-24 23:48:54 +02:00
ehofman
430fbe99fa Use shared pointers for any reference to SGSoundSample 2009-10-24 19:52:09 +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
jmt
57d8dca176 Fix for an uninitialised value, reported by Dave Luff. 2009-10-22 23:21:34 +02:00
jmt
9495c2efdf Route tweaks, especially in-flight activation and deactivation
* Don't require a valid departure and destination airport
* Handle in-air route activation cleanly
* Handle end-of-route situation cleanly
2009-10-22 23:21:25 +02:00
jmt
08039f1fa5 Tweak permitted indices for GPS route insert commands. 2009-10-21 16:28:14 +02:00
jmt
2a86384da7 GPS commands to edit the route manager route. 2009-10-21 16:28:01 +02:00
jmt
332e7fc59b GPS data validity clean-up; it was a mess, now it's more robust. Thanks to Dave Luff for reporting. 2009-10-19 23:56:51 +02:00
daveluff
a2401ea94b Add a hardwired instrument approach for testing. This will be removed and read from file shortly 2009-10-18 17:56:17 +02:00
daveluff
882f5b4deb My non-precision approach model had been one or more IAFs and then a common core approach from the IF. In fact, there can be one or more initial approach routes from the IAFs to the IF, then the core approach. Replace the IAFs with initial approach routes. NOTE it is assumed in the code that there is a unique IAF per initial approach route. 2009-10-17 23:54:26 +02:00
daveluff
a01bee3817 Change one of the default flight plans to something more convenient for development. These will eventually all be removed from the code and read from preferences anyway. 2009-10-17 23:54:14 +02:00
daveluff
8de8a734a2 Fix a crash where there is only 1 IAF in an approach 2009-10-17 23:54:05 +02:00
jmt
afb1e7ffe9 Further GPS and route manager behavioural fixes
* When the nav-radio is slaved, calculated radial/target-hdg-deg
 (needed by some autopilot logic)
* Handle editing (including deletion) of route waypoints correctly,
 including deleting the active waypoint
* Add a signal to the route manager when the last wpt is reached, and
 use it in the GPS to revert to OBS mode.
* Change the altitude handling to use the specified cruise altitude
* Fix a bug where autopilot/locks/altitude was treated as a boolean
2009-10-16 11:24:36 +02:00
ehofman
a9b3fc7a56 move some of the sound postion and orientation calculations over to the sample class which also makes the main code nice and clean 2009-10-16 11:24:10 +02:00
jmt
879531ce63 Make the GPS drive the autopilot directly (if configured), also update external course (OBS) source, and init at the current airport. 2009-10-14 00:42:37 +02:00
jmt
5aa51e5780 Ensure we always create a GPS instrument. 2009-10-14 00:42:37 +02:00
jmt
d4cc5f9c44 Change default airport search to exclude seaports and heliports, for the moment. 2009-10-14 00:42:36 +02:00
Tim Moore
40639d38a8 Merge branches 'jmt/xmlauto', 'luff/kln89' and 'curt/radial' 2009-10-12 11:03:35 +02:00
jmt
bde366e0e3 Make GPS slaved mode on the navradio slightly more robust. Not done yet. 2009-10-12 07:55:51 +02:00
ehofman
c56113d0dd add the option to tie a SampleGroup to the listener position and orientation 2009-10-08 10:38:05 +02:00
jmt
72d9c254f4 Numerical robustness for the GPS code, when dt or last_speed_kts is zero. 2009-10-07 08:26:00 +02:00
Tim Moore
696007e503 include header for auto_ptr 2009-10-06 11:20:19 +02:00
jmt
d784810430 Land the GPS/route-manager re-write. Many things are better, many other things will be better, some things are no doubt broken. Please be patient and report problems on the mailing list. 2009-10-06 10:44:01 +02:00
ehofman
86f462933d Initial commit of the new sound system, expect more updates to follow 2009-10-06 10:22:09 +02:00
Tim Moore
4023bdaf26 Merge branch 'jmt/navradio'
The previous merge claimed to have merged this branch; it didn't because
I had reset the branch to someplace weird.
2009-10-01 23:50:21 +02:00
Tim Moore
8b10bb12f5 Merge branches 'jmt/navradio', 'jmt/cleanup' and 'torsten/gps-fix' 2009-10-01 15:17:24 +02:00
curt
28b847da09 Smooth out the time-to-intercept radial computation so it's a bit more useful. 2009-10-01 00:16:30 +02:00
daveluff
57d5e18074 Remove the GPSPage base class, that only KLN89Page was derived from. 2009-09-28 23:56:23 +02:00
torsten
27d68533d7 Catch a possible NAN at insanely low but greater than zero speeds 2009-09-22 22:48:14 +02:00
jmt
59895306a5 Remove <plib/sg> includes. 2009-09-20 16:46:32 +02:00
jmt
956ecf1cf2 Remove use of plig/sg from render-area-2d. 2009-09-20 00:20:17 +02:00
jmt
0c8c8380b1 Break viewmgr.hxx dependency on on viewer.hxx. 2009-09-20 00:20:17 +02:00
jmt
a683b5e0ed NavRadio: By way of an experiment, make false courses/lobes disable-able via a property. 2009-09-17 22:55:18 +02:00
jmt
5947f3fcd5 NavRadio DME in-range flag, and audio code improvements. By John Denker, adapted to current trunk by me. 2009-09-17 22:53:15 +02:00
jmt
bf830f681d One more divide by zero fix from Torsten. 2009-09-17 22:48:10 +02:00
jmt
ebf5dcb828 Work around the penaltyForNav broken-ness, by ensuring GS behaves sanely even if non-matches LOC and GS transmitters are selected. Which happens. Yuck. 2009-09-17 22:47:57 +02:00
jmt
c1598361ca navradio: fix crash spotted by Torsten, when nav range is unspecified. 2009-09-17 22:47:45 +02:00
jmt
a650cf4239 Fix the has-gs flag when switching to a VOR (thanks Torsten), and expose GS validity via a new gs-in-range boolean prop, as suggested by John Denker. 2009-09-17 22:47:32 +02:00
jmt
3c48943e81 Various LOC/GS improvements from John Denker, adapted to trunk by me (hopefully not introducing too many bugs along the way). Includes:
- false LOC courses and GS lobes
 - LOC sensitivity based on runway dimensions
 - GS cutoff based on range
 - More accurate GS deviation computation, making final approach more stable
2009-09-12 15:47:52 +02:00
jmt
5f16e4da60 Add clamped degrees deviation for glideslope. 2009-09-12 15:47:52 +02:00
jmt
77a8b4db30 Add normalised heading deflection property to navradio. 2009-09-09 23:42:21 +02:00
jmt
6fa1b3dfd0 Add normalised glideslope deviation property to nav-radio. 2009-09-09 08:56:32 +02:00
jmt
e2f0d1960e Further re-factoring of nav-radio code, again no functionality changed should occur. Radio reception / GPS slaving / Glideslope handling and CDI updating are all separate functions now. 2009-09-09 08:56:32 +02:00
frohlich
ccb9e64caf Avoid division by zero.
Modified Files:
	src/Instrumentation/dme.cxx
2009-09-09 08:56:31 +02:00
frohlich
8676c2bbd8 Replace the SGVec*::sg() methods with the equivalent SGVec*::data() calls.
Modified Files:
	src/Traffic/Schedule.cxx src/Sound/fg_fx.cxx src/Main/main.cxx
	src/Instrumentation/navradio.cxx
	src/AIModel/AIFlightPlanCreateCruise.cxx
2009-09-09 08:56:30 +02:00
jmt
80a6317ab6 Re-structure the nav-radio code, in preparation for cleaner GPS-slave separation. No functionality changes (hopefully). 2009-09-09 08:56:30 +02:00
Tim Moore
67c7d8642a fix warnings in Instrumentation
Mostly signed comparisons and order of initializers in constructors
2009-08-24 18:02:15 +02:00
torsten
b3ceb9a2fd warning fixes 2009-08-23 21:43:10 +02:00
torsten
8d98e4cd49 warning fixes 2009-08-23 21:43:10 +02:00
daveluff
443f3f3654 Fix the rendering of the KLN89 on the 2D panel that was broken during the move to osg. This is an interim step with the aim being to eventually use render-to-texture. 2009-07-27 23:52:32 +02:00
Tim Moore
ddb6551a91 SGRawValue::DefaultValue is now a function 2009-07-17 11:47:11 +02:00
timoore
4cc3084256 SGPropertyNode::Type moves to simgear::props namespace 2009-07-16 12:10:47 +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
fredb
40586c77fd X-Plane 850 airport file format parsing. 810 is still supported and may be mixed with new format.
Ground radar updated to display new pavements.
2009-06-15 10:29:45 +02:00
fredb
73fbc05a6b Projection matrix and texture size should be coherent 2009-06-15 10:29:44 +02:00
fredb
3b024e3dab Suppress warnings 2009-06-15 10:29:44 +02:00
mfranz
cc29182283 Dave LUFF: bugfixes; leave dlg with crsr button; heading info; cleanup
"General cleanup: Fix several potential segfaults, ensure delete
approach dialog can be exited with the crsr button, implement heading
information in DTO mode, make the comments more useful, and remove old
debugging comments."
2009-06-03 00:18:56 +02:00
mfranz
5a200cb5f4 Dave LUFF: Fix buffer overrun with longer runways 2009-06-03 00:18:56 +02:00
frohlich
8a6bad9c59 Avoid division by zero.
Modified Files:
	src/Instrumentation/inst_vertical_speed_indicator.cxx
2009-06-03 00:18:55 +02:00
timoore
0ce5f350ff Fix two sources of floating point exceptions
When a subsystem is updated, dt can be 0 if the program is paused. There
may be other subsystems that don't check that dt is non-zero.
2009-06-03 00:18:54 +02:00
mfranz
b07ad149ae turn a few #include paths from the "foo" form to <foo>
The quotes form is normally only used for headers with path relative
to the including file's path, though the standard doesn't strictly
mandate this. This is consistent with the rest of sg/fg, it makes the
code's intent clearer and helps to find headers. (And it's a few
milliseconds faster, too.)
2009-05-18 12:24:17 +02:00
mfranz
095c710c0e leak fixes 2009-05-18 12:24:16 +02:00
mfranz
744a23d0aa fix leaks; make destructors virtual 2009-05-18 12:24:16 +02:00
curt
6eec37b1f9 Don't compute radio station range when nav1 slaved to gps. 2009-04-15 23:19:30 +02:00
curt
d83286354c One more minor tweak on glideslope handling when slaved to gps. 2009-04-15 23:19:30 +02:00
curt
12c5a631f6 Better handling of glide slope and in range flags when slaved to external
GPS.
2009-04-15 23:19:30 +02:00
mfranz
0ec4bf22bf Ron JENSEN: fix division by zero problem (asin -> atan2; navradio.cxx) 2009-04-15 23:19:29 +02:00
mfranz
16dd71a044 wxradar: display transponder-id by default, fall back to callsign 2009-04-01 09:23:54 +02:00
mfranz
3cdd8fedf6 wxradar: read aircraft data from the property tree, rather than AIBase
This allows to display objects that are in /ai/models/, but not managed
by the AI manager, and it follows fgfs' design principle that subsystems
should communicate over the property tree (if possible). This is a tad
slower, but the radar is only updated once every second.
2009-03-18 08:00:09 +01: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
51b46283df Roy V. OVESEN: add support for heading bug 2009-03-18 08:00:08 +01:00
mfranz
845323eadd remove redundant checks (and one indentation level) 2009-03-18 08:00:08 +01:00
frohlich
f9f9350b96 Adapt to SGTimeStamp changes.
Modified Files:
	configure.ac src/Cockpit/panel.cxx src/FDM/Makefile.am
	src/FDM/flight.hxx src/FDM/ExternalNet/ExternalNet.hxx
	src/Instrumentation/marker_beacon.cxx src/Main/Makefile.am
	src/Main/fg_init.cxx src/Main/main.cxx
	src/MultiPlayer/multiplaymgr.cxx src/Time/fg_timer.cxx
	utils/GPSsmooth/MIDG_main.cxx utils/GPSsmooth/UGear_main.cxx
	utils/GPSsmooth/gps_main.cxx
2009-03-18 08:00:08 +01:00
mfranz
0e72224559 add <label-offset> param for adjusting number labels in scales 2009-03-18 08:00:07 +01:00
mfranz
d3b2b9f1e3 allow to change/reload HUD by setting path in /sim/path/path[1] 2009-03-18 08:00:07 +01:00
torsten
43880b201c Make hardcoded error values configurable.
This patch introduces the optional elements
<config>
   <spin-thresh>0.8</spin-thresh>
   <max-roll-error-deg>40</max-roll-error-deg>
   <max-pitch-error-deg>12</max-pitch-error-deg>
</config>
under the corresponding /instrumentation/attitude-indicator element.
The values are initialized to the shown default values if omitted.
These are the values of the former hardcoded constants.
2009-03-11 23:14:34 +01:00
Tim Moore
1e71177e7c Merge branch 'topic/tape' into next 2009-02-06 15:44:51 +01:00
Tim Moore
3e37d81f1d HUD::Tape: avoid floating point exception 2009-02-06 15:44:07 +01:00
Tim Moore
0c5e9f46e7 Merge branch 'maint' into next 2009-01-26 09:49:07 +01:00
Tim Moore
738e06e845 _kollsman member not initialized
From Csaba Helasz
2009-01-26 09:37:46 +01:00
Tim Moore
270a4093a8 Merge branch 'maint' into next 2009-01-19 21:18:03 +01:00
Tim Moore
ec72392aa5 Fix regression in Vivian's last patch. 2009-01-19 21:12:25 +01:00
Tim Moore
9bb896dd20 Merge branch 'maint' into next 2009-01-18 23:22:06 +01:00
timoore
51b686a796 Division by zero fixes from Vivian Meazza. 2009-01-18 23:17:23 +01:00
Tim Moore
b8724644c6 Merge branch 'maint' into next 2009-01-14 11:42:26 +01:00
Tim Moore
c3d611f7f9 HUD::Ladder::draw was capturing the value of a freed temporary
Fix from Csaba Halász
2009-01-14 11:22:18 +01:00
mfranz
8c1b1f50a5 don't blindly overwrite user settings -- only initialize if necessary 2009-01-12 13:05:05 +01:00
jmt
c9e8112a81 Add various helper filters, to make use of type-ranges, and reduce the need
to down-cast in filter implementations.
2009-01-10 00:07:01 +01:00
Tim Moore
8ad7f4eb70 Merge branch 'maint' into next 2009-01-08 09:07:16 +01:00
timoore
17ccf72e44 Divide-by-zero fixes from Csaba Halász 2009-01-08 09:02:19 +01:00
Tim Moore
030742fa4a Merge branch 'rj/ttw' into next 2009-01-07 10:26:12 +01:00
jmt
0b9e224be9 Patch from Ron Jensen: make the TTW computation marginally less silly. 2009-01-07 10:25:26 +01:00
Tim Moore
18d1593c42 Merge branch 'jt/runway' into next 2009-01-04 00:14:09 +01:00
jmt
7345a044e0 Split runway and taxiway into separate classes, with a (new) common base.
This makes taxiways smaller (important since at present there are so many).
Restructure the apt.dat parsing code to use a helper class instead of one long
function, and to do less work when parsing the file.

Some of these ideas come from Yon Uriarte's patches - thanks Yon.
2009-01-04 00:08:12 +01:00
Tim Moore
0603aba9ae Merge branch 'tbm/graphics-bug' into next 2009-01-04 00:03:26 +01:00
timoore
74031287b4 Set BACKGROUND_BIT as camera node mask.
This prevents the dreaded black rectangle from appearing on systems
that don't have OpenGL frame buffer object support.
2009-01-03 23:56:39 +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
660d59a098 Another clean-up iteration: FGAirportList::search is gone, replaced by two
static FGAirport helpers. As a result, another global index goes away. Use
the helpers to avoid ugly FGPositioned down-casts in various places.

Also converts the environment/METAR code to deal with FGAirport pointers,
instead of string identifiers, and contains work-in-progress code to implement
the AirportList dialog using FGPositioned. This isn't enabled yet for various
reasons, but is the final piece to allow FGAirportList to be removed.
2008-12-26 15:26:42 +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
82bfb6a08d Clean out FGAirportList - not quite obsolete yet, but the spatial queries are
gone. This is good news, since the old query was implemented as a linear
search, sorted by Manhattan distance, and with a warning not to use the logic
at runtime. Various systems (such as the Mk-VIII) do query such data often,
eg every second.

Also gets Point3D out of Airports/simple.hxx, as a precursor to removing it
completely.
2008-12-26 11:15:00 +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
02d1b14c1a Finish conversion of FGRunway to a real class - all public members are gone. 2008-12-24 15:45:35 +00:00
jmt
7d5d756095 FGPositioned clean-ups - apply some desirable changes (such as making members
const) which were previously tricky but now easy. Make it possible not to
index certain types (used for taxiways) and exclude anonymous items from
the name index. Related to this, clean up FGRunway further - remove some public
members, and fix a dumb bug of mine, where we create reciprocal entries for
taxiways.

This should make startup (slightly) quicker, and shrinks FGRunway somewhat.
2008-12-24 14:48:30 +00:00
jmt
335584e29c Remove the FGIdentOrdering cruft from FGAirport; now handled by FGPositioned. 2008-12-24 04:58:36 +00:00
fredb
69b2c0b697 James Turner :
Here's a patch which refactors the 'plain' GPS code into a slightly
more manageable structure - i.e breaks the large update() method into
various sub-functions. I've tested the patch with B1900d, and things
seem to work as expected, but if anyone experiences GPS weirdness
after this is committed, of course please report it.

The motivation for this was helping me learn the code - I've planning
some changes in this area, and splitting up the logic will hopefully
make that task easier.
2008-12-09 08:10:33 +00:00
fredb
e2bf85e67e James Turner : this patch
- updates how filtering is done on the various FGPositioned query functions - both spatial and ident-based.
- updates the KLN-89b / DCLGPS code to use FGPositioned for all Navaid/Airport queries.

me:
Add few include directives in globals.cxx to avoid such MSVC warning messages :
deletion of pointer to incomplete type 'FGAirportList'; no destructor called
deletion of pointer to incomplete type 'FGNavList'; no destructor called
deletion of pointer to incomplete type 'FGTACANList'; no destructor called
deletion of pointer to incomplete type 'FGFixList'; no destructor called
2008-12-09 07:58:46 +00:00
timoore
aa716b350f Master reference gyro changes from Vivian Meazza. 2008-11-11 21:20:02 +00:00
curt
692afe0bcb Fix a bug where the search() function was not being called if power was false
or the unit was not serviceable.  This search() routine needs to run every
iteration no matter what the power or serviceable state.  If power is turned
off or the unit becomes unserviceable while a beacon sound is playing, the
search() routine still needs to be called so the sound effect can be properly
disabled.
2008-10-30 20:42:21 +00:00
ehofman
ee8f603969 Alasdair Campbell: fix the MK_VIII problems 2008-10-23 16:43:35 +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
curt
b423d0bc1d Torsten Dreyer:
Here is a little patch that changes the behaviour of the VOR CDI and OFF-flag
for indicators like the HSI when getting outside the range of the VOR
station.

Currently, when flying at a distance between the effective_range and twice the
effective_range of a VOR station, the in-range property is computed based on
a random value, causing the OFF Flag and the CDI bar to perform an ugly
jitter.

The attached patch introduces a new property signal-quality-norm which is
computed based on the distance to the station and the range. It is 1.0 when
the distance is less than the range and decreases by 1/x^2 for distances
greater than the range leading to a signal-quality-norm of 0.25 for distances
two times the range, 0.125 for three times the range and so on.
The in-range flag is tied to a signal-quality-norm greater than 0.2 (fixed
squelch).
The CDI and GS needle deflection is multiplied with the signal-quality-norm.

The benefit is:
- Ability to animate the OFF-Flag with a smooth transition.
- CDI and GS needle deflection shows correct values when in range
(signal-quality-norm=1.0) and show some wrong indication when the range is
exceeded
- CDI and GS needle start to move, even when the OFF flag is visible
- No more jitter for flag and needles

See the new SenecaII ki525a hsi as an example at
http://www.t3r.de/fg/navpatch.jpg
The numbers on the image are:
(1) the new property signal-quality-norm
(2) distance exceeds the effective-range by 30%
(3) NAV flag has a rotation animation bound to signal-quality-norm and is
partially visible
(4) CDI is partially deflected even with NAV flag shown

This implementation better matches reality - at least, how I observed it ;-)
2008-08-28 21:24:02 +00:00
ehofman
289f2f5f0d James Turner:
This is a little intrusive on the KLN89 code, but avoids the wasteful cloning of the airports, runways and navaids which current happens, and also combines the ugly string ordering code.
2008-08-22 11:22:22 +00:00
ehofman
a1426a812a James Turner:
Switches the MkVIII code to use the same 'closest airport' logic as everything
else, instead of its own special version.
2008-08-15 18:48:11 +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
mfranz
fa2387c05b - fix function argument order (top & bottom were swapped)
- drop wrong and superfluous rounding (sprintf() rounds already)
- remove redundant default values to property getters (default is 0 already)
2008-08-05 05:22:05 +00:00
ehofman
c4a38e10ec James Turner:
Attached patch + new file make FGNavRecord have a .cxx file, and a constructor w
hich allows all the parameters to be supplied. Along the way I also cleaned up t
he navrecord.hxx header, lots more header pollution has been killed.

Some long methods are no longer inline, but were all suspiciously long to meet c
ompiler inlining criteria (I'm not clear if the 'inline' keyword is advisory or
mandatory in this situation) - I don't expect this to affect performance in any
way whatsoever.

The constructor addition is to support some hacking I'm doing improving the star
tup performance of the navDB by lazily loading the data, and caching it in a mor
e efficient format than text. I'm submitting this change (and probably some othe
r small tweaks in the future) since they are worthwhile as cleanups regardless o
f how my current experiments work out.
2008-08-03 14:34:42 +00:00
mfranz
61812ef4b8 better use unset() for unsetting ... 2008-07-30 15:01:59 +00:00
mfranz
a0c2e5b97f disable clip planes after use (Doesn't seem to make a difference,
and is only a temporary measure, as it was planned to OSGify the
HUD and put it in the scenegraph etc.)
2008-07-30 14:52:01 +00:00
mfranz
7a3fe04275 s/clip/clipping/ 2008-07-29 15:48:11 +00:00
mfranz
7ba3d5cb53 - extract clipping code to HUD.cxx, allowing generic clipping
and separate ladder clipping
- fix acceleration node names
- draw 90/-90 bars if there's no zenith/nadir
2008-07-29 15:41:25 +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
mfranz
5cceb32c0a - read x/y/width/height as floats
- don't write bars past nadir/zenith (better MILSTD compliance)
- introduce tick-length/zero-bar-overlength/enable-dive-bar-angle
  configuration parameters
- simplification
2008-07-28 17:04:24 +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
967bf101ef Restore inclusion of GLU.h 2008-07-27 16:08:45 +00:00
fredb
3db0cf1659 Remove unneeded inclusions of windows.h, GL.h and GLU.H 2008-07-27 15:18:34 +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
mfranz
eb2a167331 attach listener after setting the default values (of course :-) 2008-06-02 11:44:02 +00:00
mfranz
47b9da740b - export font properties to the property tree again
- don't keep oodles of class member variables public (eek!)
- use ::hasValue() instead of ::getType() != SGPropertyNode::NONE
- consistency fixes and cosmetics
2008-06-02 09:32:37 +00:00
mfranz
4b245467c7 change default font values 2008-06-01 18:16:35 +00:00
mfranz
e0aeda5a51 Csaba HALASZ & Syd ADAMS: make radar font configurable
mf: move font color parts to the font listener
2008-06-01 18:08:01 +00:00
fredb
68124ca36d Remove unused variables 2008-06-01 14:59:20 +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
timoore
d28b509e5f autopilot filter deque fixes
Thanks to Vivian Meazza for debugging this. The output deque for
FGDigitalFilter was not being kept long enough for the
doubleExponential filter. Reads from output[1] could cause a crash.
2008-03-24 22:46:47 +00:00
timoore
fd492a297a model paging patch from Till Busch
From Till:
i started the project at the end of february with a simple idea: move all
3d-model loading to the DatabasePager-thread. my first attempts looked
promising, though they were a little too optimistic (or naive?). the patch
has evolved a lot since.

currently it does the following things:
1. revive SGModelLib, move functions for xml-model-loading there

2. replace all calls to sgLoad3dModel with calls to either
SGModelLib::loadModel() or SGModelLib::loadPagedModel()
almost all models will be loaded by the DatabasePager. the few exceptions are:
your own plane, shared models in scenery, random objects, AIBallistic models.

3. simplify mode-loading functions (avoid passing around fg_root)

4. avoid supurious MatrixTransform nodes in loaded models

5. fix some memory leaks
2008-03-22 09:31:06 +00:00
timoore
662ea715e8 For the agRadar, initialize property nodes with defaults.
Introduce a convenience member function in wxRadarBg for creating an
SGPropertyNode and initializing it in one step. Use this in
agRadar. This eliminates buggy behavior when the necessary radar
properties aren't defined.
2008-03-22 09:19:21 +00:00
timoore
7800918499 Small cleanup of terrain radar 2008-03-17 08:47:31 +00:00
timoore
c2040f30a2 ground radar from Vivian Mezza 2008-03-17 08:47:16 +00:00
mfranz
5253a271c7 The Concorde Maintainer:
- replace hardcoded name "inst-vertical-speed-indicator" by the one from
  the instrumentation config

mf: some indentation fixes, remove redundant block
2008-02-07 20:41:00 +00:00
timoore
00f8463ab4 Another round of memory leak fixes from Till Busch 2008-01-24 23:05:58 +00:00
frohlich
aed97e0dd4 Use a render target fallback that works in any case.
Avoids a crash on dri cards on linux.
2007-12-11 06:19:08 +00:00
timoore
743522fcd1 Add an option to FGTextureManager to create dynamic textures.
Dynamic textures shouldn't have their STATIC attribute set.
2007-12-07 09:14:16 +00:00
durk
f5e9e1898f Miscellaneous tweaks and Bugfixes. Mostly memory leaks ported from the plib
version
* Delete ai list objects in ~ATC/AIMgr.cxx:AIMgr::~AIMgr()
* Delete colors in GUI/new_gui.cxx: NewGui::~NewGui.cxx
* Delete memory allocated to the class member "route" in
  Instrumentation/gps.cxx
* Delete all globals (except a few "unsafe" ones that still cause segfaults
  and need further examination.
* Use an SGShared pointer for navaid memory allocation, so that pointers to
  individual navaid objects can be included safely in multiple navaid lists
2007-10-20 08:36:21 +00:00
mfranz
15139a42b6 - make FGAirport::search() more versatile, so that it can't only search
the next airport or airport with METAR station, but about any type of
  airport
- as a side effect this change makes it also 30 to 50% faster  :-)

In the long run this linear search shall be replaced with a spatial
algorithm (like octree), which will be a much bigger performance gain.
2007-10-05 21:54:52 +00:00