1
0
Fork 0
fgdata/gui/dialogs
Florent Rougon 9037441778 Fix bearing calculation in the GPS Settings dialog
Magnetic declination being "the direction of the horizontal component of
the magnetic field measured clockwise from north" according to
MagneticField(1), it must be substracted, not added, from true bearings
in order to obtain the corresponding magnetic bearings.

Example illustrating the bug:

  Start at  KSFO, open Equipment -> GPS Settings, enter KHTH as the
  destination and click on "Search". Before the bug fix, the dialog
  gives a bearing of 85, whereas the correct magnetic bearing is 58.

  Digging a bit further, the true bearings/azimuths for the shortest
  path (geodesic line) from KSFO to KHTH are approx. 71.5 at KSFO and
  73.8 at KHTH. This can be verified with two independent libraries
  (GeographicLib and PROJ.4):

    % echo "37d37'08N 122d22'30W 38d32'45N 118d38'00W" | \
      GeodSolve -i
    71.44943076 73.75785283 343987.398
    % echo "37d37'08N 122d22'30W 38d32'45N 118d38'00W" | \
      geod +ellps=WGS84 -I -f '%0.3f'
    71.449  -106.242        343987.398

  (-106.242 + 180 = 73.758: -106.242 is the "back azimuth" at KHTH for
  this path)

  The bearing of 85 given by the code in gui/dialogs/gps.xml before
  this commit is indeed 71.5 + magnetic declination at the starting
  point (KSFO), whereas it should be 71.5 - magnetic declination.

  Another, more experimental way:

  Start FlightGear with:

     fgfs --aircraft=ufo --disable-real-weather-fetch \
     '--metar=KSFO 070956Z 36000KT 10SM FEW023 11/07 A2977 RMK AO2 SLP080 T01060067' \
     --lat=37.61867421 --lon=-122.37500761 --heading=71.45931

   (just in case wind influences the ufo, I have no idea whether this is
   the case or not...)

   During your flight, progressively increase your heading (as seen in
   the HUD, i.e., true heading) so that it smoothly changes from 71.5 at
   KSFO to 73.8 at KHTH. You should arrive pretty close to KHTH, whereas
   the initial heading of 85 given by the GPS Settings dialog is way too
   high, be it interpreted as a magnetic heading (which was visibly the
   intention---it would be nice to write that in the dialog BTW) or as a
   true heading (in which case the result is even further from the
   correct value).
2015-12-08 22:46:47 +01:00
..
images canvas.gui: Basic demo showing how to use windows and widgets. 2014-03-19 23:51:34 +01:00
about.xml GUI clean up from Michael HABARTA. Part 1 2015-03-14 22:33:05 +00:00
AIcarrier.xml Whoops! 2012-07-21 09:34:00 +01:00
air.xml use <key>Esc</key> instead of <keynum>27</keynum> 2005-11-05 18:42:28 +00:00
aircraft.xml use <key>Esc</key> instead of <keynum>27</keynum> 2005-11-05 18:42:28 +00:00
airports.xml Airports dialog: Don't implement backend logic in UI 2015-03-30 17:13:40 +02:00
atc-ai.xml Fix ai-traffic GUI checkbox 2012-07-05 19:37:43 +02:00
atc-dialog.xml Issue 859: ATC dialog cannot be closed. 2013-04-20 22:32:48 +02:00
atc-freq-display.xml use <enabled>false</enabled> flag for widgets that shouldn't be drawn 2008-08-05 05:28:27 +00:00
atc-freq-search.xml Update atc-frequency dialogs for revised command interface. 2011-12-27 22:56:48 +00:00
autopilot.xml Minor changes various dialogs to make generally consistent: 2010-12-27 20:19:31 +00:00
button-config.xml Menu bar changes to expose Joystick Configuration dialog, and minor 2012-09-03 22:22:09 +01:00
chat-menu.xml remove runway complementation (airportinfo() returns both sides now) 2008-09-23 20:12:48 +00:00
chat.xml - remove all key shortcuts ("Enter" for the default widget remains, of course) 2009-01-29 19:50:24 +00:00
chat_full.xml Close dialogs with Esc-key 2013-12-02 21:32:05 +01:00
checklist.xml Checklists: Fix bug where first checklist has multiple pages 2015-06-06 07:02:13 +02:00
cockpit-view.xml GUI clean up from Michael HABARTA. Part 1 2015-03-14 22:33:05 +00:00
devel-extensions.xml Lots lots more MapStructure changes 2014-05-25 14:27:11 -05:00
doc-browser.xml Documentation browser dialog (for files in /Docs - Thanks to Hooray) 2012-09-20 00:04:11 +02:00
earthview.xml Improvements and bugfixes for orbital rendering 2015-03-29 13:16:19 +03:00
environment-settings.xml GUI Cleanup from Michael HABARTA. Part 2 2015-03-14 23:03:31 +00:00
exit.xml - make dialog non-modal (doesn't buy us much and can cause annoying lockups) 2008-06-12 23:04:42 +00:00
fgcom.xml GUI Cleanup from Michael HABARTA. Part 2 2015-03-14 23:03:31 +00:00
file-select.xml Directory dialog 2011-08-21 15:00:45 +02:00
flight-recorder-load.xml Add menu bindings/dialog to save/load flight recorder tapes. 2012-11-10 22:35:11 +01:00
flight-recorder-save.xml Add menu bindings/dialog to save/load flight recorder tapes. 2012-11-10 22:35:11 +01:00
formation.xml Minor changes various dialogs to make generally consistent: 2010-12-27 20:19:31 +00:00
fps.xml New option to display frame latency. 2011-03-28 00:24:32 +02:00
frame-latency.xml New option to display frame latency. 2011-03-28 00:24:32 +02:00
gps.xml Fix bearing calculation in the GPS Settings dialog 2015-12-08 22:46:47 +01:00
hud.xml GUI Cleanup from Michael HABARTA. Part 2 2015-03-14 23:03:31 +00:00
input-config.xml GUI Cleanup from Michael HABARTA. Part 2 2015-03-14 23:03:31 +00:00
instrument-failures.xml GUI Cleanup from Michael HABARTA. Part 2 2015-03-14 23:03:31 +00:00
instruments.xml GUI Cleanup from Michael HABARTA. Part 2 2015-03-14 23:03:31 +00:00
jetways-adjust.xml Ryan Miller: Get rid of no-op jetway XML files. 2011-06-18 01:33:57 +02:00
jetways.xml GUI Cleanup from Michael HABARTA. Part 2 2015-03-14 23:03:31 +00:00
joystick-config.xml GUI Cleanup from Michael HABARTA. Part 3/3 2015-05-03 17:13:50 +01:00
joystick-info.xml set padding; no wrapping 2009-01-28 21:03:34 +00:00
lag-adjust.xml little adjustements for the mp patch 2015-06-09 21:12:48 +02:00
local_weather.xml Thorsten Renk: local weather 1.18 2011-07-03 23:39:01 +02:00
local_weather_config.xml Adapted local weather package and menu to new submodule structure. 2011-06-13 22:27:44 +02:00
local_weather_tiles.xml Tentative improvements to AW gust modeling 2015-11-16 17:41:57 +02:00
local_weather_winds.xml GUI Cleanup from Michael HABARTA. Part 3/3 2015-05-03 17:13:50 +01:00
location-in-air.xml GUI Cleanup from Michael HABARTA. Part 3/3 2015-05-03 17:13:50 +01:00
location-of-tower.xml GUI Cleanup from Michael HABARTA. Part 3/3 2015-05-03 17:13:50 +01:00
logging.xml use <key>Esc</key> instead of <keynum>27</keynum> 2005-11-05 18:42:28 +00:00
lso-view.xml Modified Landing Signal Officer View - locks to the selected MP aircraft 2009-06-02 09:14:09 +00:00
map-canvas.xml Fix resizing behaviour broken by b4d166 (bug #1750) 2015-05-10 15:38:25 +01:00
map.xml Fix resizing behaviour broken by b4d166 (bug #1750) 2015-05-10 15:38:25 +01:00
marker-adjust.xml Bug fix. 2011-04-01 16:40:34 +01:00
message.xml use <enabled>false</enabled> flag for widgets that shouldn't be drawn 2008-08-05 05:28:27 +00:00
model-cockpit-view.xml Add model cockpit view dialog. 2010-10-12 23:17:35 +01:00
model-view-select.xml Fix for #1185 2013-09-30 13:53:10 -05:00
model-view.xml only open popup if there's something to choose from 2009-01-31 20:10:47 +00:00
multiplayer.xml GUI Cleanup from Michael HABARTA. Part 3/3 2015-05-03 17:13:50 +01:00
nasal-console.xml Add Nasal output to the console. 2013-02-08 19:42:25 +00:00
NTPS_target_task.xml - use <hrule/> and <vrule/> without dummy children 2007-03-26 15:25:27 +00:00
overlay-select.xml Issue 840: resize dialog, so no liveries are trapped outside the dialog with no scrollbar. 2012-11-24 16:32:04 +01:00
pilot_offset.xml Minor changes various dialogs to make generally consistent: 2010-12-27 20:19:31 +00:00
property-browser.xml make dialog resizable with Ctrl-dragging 2009-01-10 21:59:27 +00:00
pushback.xml Set pushback force to 0 when the pushback dialog is closed 2011-02-19 22:00:13 +01:00
radios.xml GUI Cleanup from Michael HABARTA. Part 3/3 2015-05-03 17:13:50 +01:00
random-failures.xml GUI Cleanup from Michael HABARTA. Part 3/3 2015-05-03 17:13:50 +01:00
rembrandt-buffers.xml Add shadow map to the list of available rendering buffers 2012-06-25 09:39:23 +02:00
rembrandt.xml GUI Cleanup from Michael HABARTA. Part 3/3 2015-05-03 17:13:50 +01:00
rendering.xml GUI Cleanup from Michael HABARTA. Part 3/3 2015-05-03 17:13:50 +01:00
replay.xml Ignore unnamed views in replay dialog 2015-07-24 18:30:40 +01:00
route-manager.xml Fix resizing behaviour broken by b4d166 (bug #1750) 2015-05-10 15:38:25 +01:00
scenario.xml GUI Cleanup from Michael HABARTA. Part 3/3 2015-05-03 17:13:50 +01:00
scenery_loading.xml Scenery Loading popup message 2004-07-22 02:59:59 +00:00
seaport.xml Switch GUI to use new reposition command. 2014-03-05 16:46:10 +00:00
shaders-lightfield.xml Agriculture de-tiling effect for ALS terrain rendering 2014-05-05 14:27:33 +03:00
shaders.xml Remove intermediate quality settings from the ubershader. Fix a texture. 2014-01-15 23:30:03 +01:00
sound.xml GUI Cleanup from Michael HABARTA. Part 3/3 2015-05-03 17:13:50 +01:00
static-lod.xml Workaround for "AI Models invisible" 2015-07-09 10:15:40 +02:00
stereoscopic-view-options.xml GUI Cleanup from Michael HABARTA. Part 3/3 2015-05-03 17:13:50 +01:00
stopwatch.xml GUI Cleanup from Michael HABARTA. Part 3/3 2015-05-03 17:13:50 +01:00
system-failures.xml GUI Cleanup from Michael HABARTA. Part 3/3 2015-05-03 17:13:50 +01:00
tanker.xml Air-to-air refueling enhancements 2013-02-24 22:34:11 +00:00
terrasync.xml GUI Cleanup from Michael HABARTA. Part 3/3 2015-05-03 17:13:50 +01:00
timeofday.xml Improve keyboard control for replay system. 2011-10-03 20:27:19 +02:00
tutorial.xml tutorial submodule, part #2: adapt script/GUI to load module on demand 2011-06-05 21:37:58 +02:00
view.xml Updated UI to configure tooltips, mouse input 2013-10-25 17:22:12 +01:00
weather-configuration.xml GUI Cleanup from Michael HABARTA. Part 3/3 2015-05-03 17:13:50 +01:00
weather.xml Make METAR string editable in GUI. Fix bug 1764 2015-06-03 20:14:28 +01:00
winds.xml use <key>Esc</key> instead of <keynum>27</keynum> 2005-11-05 18:42:28 +00:00