1
0
Fork 0
Commit graph

846 commits

Author SHA1 Message Date
James Turner
41759b15d6 Work on the NavDisplay instrument. 2011-10-04 08:58:09 +01:00
ThorstenB
56912c17c5 adf: fix "in-range" node
"in-range" should also be false when no station is available
2011-10-02 13:24:12 +02:00
James Turner
563614f36c Expose route-manager WP mirror nodes on the API 2011-09-19 11:38:35 +01:00
James Turner
af6ed2ff3a Expose departure+arrival airport + runway on route-manager. 2011-09-19 11:38:35 +01:00
James Turner
28c8e6fe1c Initial hacking on nav-display instrument, derived from the wxradar code 2011-09-19 11:38:35 +01:00
Torsten Dreyer
43109feb0c Some more refactoring of the radios
- wrap the ident-generating code into a class
- move dme-in-range property into dme.cxx
- move dme-ident generation into dme.cxx
- support ident-button and volume for dme idents
- use globals.get_aircraft_position instead of properties
- some minor cleanup
2011-09-15 21:28:30 +02:00
Torsten Dreyer
9cef27f5ca Refactor morse and beacon as singleton 2011-09-13 20:12:52 +02:00
ThorstenB
cc020fe9df Avoid excessive load when no navaids are in range
When no navaid is found, '_ref_navaid_id_node->setStringValue("")' results
in a listener firing, which requests another navaid update when no navaid
is available.
=> Resulted in FGPositioned::findClosest being called in every update loop,
when no navaid was within range.
2011-08-24 23:17:05 +02:00
ThorstenB
0b04bf9cdd #393: Vertical speed indicator affected by sim speed up
VSI showed incorrect values with sim speed-up factors != 1.
Time dt must be corrected by sim speed up factor.
2011-08-06 12:54:21 +02:00
James Turner
6c52a5ac85 Fixes for include-file flattening - condition.hxx no longer pulls in props or props_io 2011-07-30 10:47:28 +01:00
Torsten Dreyer
eab9a65ebc Fix some gcc warnings 2011-07-17 19:31:28 +02:00
ThorstenB
4fd1e219a4 #348 related: More places where missing files were not reported properly
Whenever resolving a (relative) path to an absolute path with
'resolve_maybe_aircraft_path', check if the result is empty and report original
(relative) path as missing. Otherwise no or a meaningless message is
issued ("File '' not found.").
2011-07-03 13:06:41 +02:00
ThorstenB
b2c03e4efc #178: improve normalization issue (avoid loops altogether)
thanks to Torsten
2011-06-26 19:05:28 +02:00
ThorstenB
68dec9af2d #178 related: avoid sim from freezing when FDM goes wild 2011-06-26 16:18:36 +02:00
James Turner
2b967608a0 Expose FGPositioned data via property tree, and make comm-stations a real FGPositioned subclass. 2011-06-01 17:45:22 +01:00
James Turner
b357dd7ac3 Remove remaining use of fabsf() from the code, avoid an OSG header issue on OS-X. 2011-05-22 16:30:18 +01:00
ThorstenB
f82caf49a3 Fix #109: Seg faults caused by wxradar with ARC display mode (aerostar700)
Fixes an ugly issue with OSG overwriting memory/stack. wxradar triggered
the issue in display mode "ARC" - since it configured a display mask (12
vertices) but all vertices were immediately removed again ("_vertices->clear()").
Issue is fixed, mask now working - however the mask wasn't even properly
aligned for the display (probably never worked since OSG port). The display
mask is only really required for weather display - so disabling for now.
2011-05-22 11:02:15 +02:00
James Turner
59fe23dcb3 Change occurrences of fabsf to fabs - part of tracking down an osg/Math issue on Mac with XCode4 2011-05-21 13:41:43 +01:00
Torsten Dreyer
76ea9a7968 Remove unused class SGEnviro
This class and their source files visual_enviro.[h|c]xx were
unused since OSG transition. It's only functionality was to
keep a variable for the enable-state of rendering of precipitation.
This has now been moved to SGPrecipitation.
This patch also removes all references to this class and
visual_enviro.hxx. Wxradar needs a new implementation for cloud
echoes which probably should be part of fgclouds.

See also SimGear commit 4e6159aa07f2817c09fad72db64d713e47f6f3da
2011-05-06 14:12:17 +02:00
ThorstenB
e42a8f597c Automatic tower positioning
New "auto-position" switch to always use closest tower for tower-view.
Exposes new "/sim/airport/closest-airport-id" property.
Display closest airport on groundradar by default.
2011-04-18 22:54:33 +02:00
ThorstenB
badec14d27 Cut&paste voiceplayer into a separate module.
GPWS and TCAS are now completely separate - but use the same voice player.
2011-03-09 23:49:25 +01:00
ThorstenB
59f2328551 Used tied property list. 2011-03-09 23:10:55 +01:00
ThorstenB
18ada05d41 Fix navreceiver to make DME work with ILS signals.
Property "dme-in-range" should also work with ILS signals, which include
a DME. The nav database (dme_list) doesn't have separate entries for
"ILS-DME" (unlike for "VOR-DME"), so searching a DME by frequency didn't
work for ILS.
=> "instrumentation/nav[*]/dme-in-range" can now be used to enable/disable
cockpit DME displays.
2011-03-09 22:04:03 +01:00
Torsten Dreyer
1050a35d92 prepare for subsystem_mgr.hxx no longer including props.hxx
subsystem_mgr.hxx will soon no longer include props.hxx since it
does not (need to) know about properties at all.
2011-02-27 12:53:47 +01:00
ThorstenB
645ef8036a TCAS clean-up.
Change default voice samples.
2011-02-25 21:12:35 +01:00
ThorstenB
27a0ff5442 Added tracker stage to TCAS.
Added relative/absolte altitude display mode to wxradar.
2011-02-25 21:12:35 +01:00
ThorstenB
b6eba5ce65 New TCAS display mode for wxradar.
- new mode to display traffic in TCAS-style
- select symbols according to TCAS-threat level
2011-02-25 21:12:35 +01:00
ThorstenB
bdd931aed9 Introduce new TCAS instrument
- implements a TCAS II v7.0
2011-02-25 21:12:35 +01:00
ThorstenB
dd7c88b8cb Make voiceplayer independent
- former mk-viii voiceplayer is now an independent FGVoicePlayer
- voiceplayer still sits in mk-viii module for now
- add option to configure location/prefix of voice samples
- add pause/resume to voiceplayer
2011-02-25 21:12:34 +01:00
ThorstenB
6cd0e5aac4 Merge remote branch 'origin/releases/2.2.0' into next 2011-02-19 12:00:43 +01:00
ThorstenB
118d8fbca5 #84: John Denker: Set correct file modes
Sources shouldn't be executable.
2011-02-19 11:55:43 +01:00
ThorstenB
3c3f3a096e John Denker: move branch cut and apply clamps
fixed un-normalized outputs
2011-02-16 19:53:10 +01:00
John Denker
214919da20 More accurate, more symmetrical computation of tangent vector. 2011-02-16 19:44:23 +01:00
John Denker
02f42b8816 fix up some comments 2011-02-16 19:44:14 +01:00
John Denker
54fb3b64d0 Implement gs-direct-deg property.
Useful when posing aircraft for pictures, not quite on glideslope.
2011-02-16 19:34:38 +01:00
ThorstenB
133cfbfa7f Fixed several compiler warnings
uninitialized or unused variables, init sequence, ...
2011-02-02 22:05:54 +01:00
Frederic Bouvier
a853af5b0e Reported by cppcheck: fix an incorrect usage of iterators 2011-01-30 21:17:20 +01:00
ThorstenB
67978f92e5 Proposed fix for #251: Waypoint handling
Do not consider destination/runway waypoints as done, when these
are far away - even if the course is off by > 90 degrees.
2011-01-30 18:18:41 +01:00
ThorstenB
f68f300bb3 Proposed fix for #251: Waypoint handling
Do not consider destination/runway waypoints as done, when these
are far away - even if the course is off by > 90 degrees.
2011-01-30 18:05:53 +01:00
ThorstenB
d365689d5c Fix crash in GPS module.
Fixes crash on exit (during property untie). Also potential run-time crash.
2011-01-22 00:03:07 +01:00
ThorstenB
f32656b2a5 Fix crash in GPS module.
Fixes crash on exit (during property untie). Also potential run-time crash.
2011-01-21 23:44:23 +01:00
ThorstenB
99ee9a1bbb GPWS: avoid "altitude_callout_voice != NULL" assertion
Properly remember which active alerts were already voiced.
Added NULL-pointer safety check
2011-01-21 20:20:22 +01:00
ThorstenB
fab1284f83 GPWS: avoid "altitude_callout_voice != NULL" assertion
Properly remember which active alerts were already voiced.
Added NULL-pointer safety check
2011-01-21 19:55:42 +01:00
John Denker
f025c65c60 Fix ADF bugs ... including still driving the needle when power off.
ADF bug fixes from John Denker.  Changes from current behaviour are:
* Include the power button in the electrical checks
* Raise the required input voltage from 1V to 8V
* Don't reset the heading to 90 degrees when out of range or no power
  (heading is now only reset to 90 in ANT or TEST mode)
2011-01-18 22:12:29 +00:00
Dave Luff
8691d2fe54 Revert "Minor edit."
This reverts commit 6596f62dd0.
I think I was wrong!
2011-01-16 20:20:55 +00:00
Dave Luff
6596f62dd0 Minor edit.
I don't think these 2 lines are required - true is set as the default value above.
2011-01-15 14:27:08 +00:00
John Denker
3dd75394af Fix ADF bugs ... including still driving the needle when power off.
ADF bug fixes from John Denker.  Changes from current behaviour are:
* Include the power button in the electrical checks
* Raise the required input voltage from 1V to 8V
* Don't reset the heading to 90 degrees when out of range or no power
  (heading is now only reset to 90 in ANT or TEST mode)
2011-01-15 13:32:01 +00:00
Dave Luff
d6fceb3fbc Remove conditional compilation of ATCDCL
This patch removes the conditional compilation of ATCDCL, compiling both
the old and new ATC systems.  The old system only provides ATIS, AWOS and
some dialog lookups, and hence should not conflict with the new system.
2010-12-28 18:23:40 +00:00
Torsten Dreyer
ded664e89e bugfix: set signal-quality-norm to zero if off or unserviceable 2010-12-23 22:16:55 +01:00
James Turner
0931fe332e Guard against NaN SGGeods in FGPositioned spatial queries, and in the GPS lat/lon reading code. 2010-12-19 16:18:12 +00:00
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