Commit Graph

4852 Commits

Author SHA1 Message Date
Erik Hofman
61a8bd5cd3 _m128d ony holds two doubles instead of 4 (obviously). 2016-11-20 15:00:24 +01:00
Erik Hofman
ad6f3d2db2 Small updates 2016-11-20 14:59:43 +01:00
Torsten Dreyer
9088f41352 Use private udns context for each DNSClient 2016-11-20 12:35:43 +01:00
Erik Hofman
73f57bbbd8 Add a test utility 2016-11-19 15:57:05 +01:00
Erik Hofman
a8673356a2 Be more specific about the exact type 2016-11-19 15:56:06 +01:00
James Turner
5ecc1ab6f2 Simplify timing code.
Assumes we have timegm on Unix, and use _mkgmtime on Windows.
This means we never need to use ftime() / timeb.h
2016-11-17 21:23:56 +01:00
Automatic Release Builder
0702f85540 new version: 2017.1.0 2016-11-17 13:43:29 +01:00
Automatic Release Builder
277dab0d55 new version: 2016.4.1 2016-11-17 13:43:29 +01:00
Erik Hofman
321a3fdaba Fix a typo 2016-11-17 13:05:08 +01:00
Erik Hofman
2eb17d0083 Revetr previous paatch for SGVec4 so close to the release 2016-11-17 11:50:15 +01:00
Erik Hofman
ff7e4597e7 Maximize simd optimization 2016-11-17 11:48:16 +01:00
Erik Hofman
4a4baf1b42 Merge branch 'next' of ssh://git.code.sf.net/p/flightgear/simgear into next 2016-11-17 09:15:02 +01:00
Erik Hofman
2672d5cd11 include simd.hxx 2016-11-17 09:14:51 +01:00
Erik Hofman
1bf3d7c9b1 Add a copyright header 2016-11-16 15:34:25 +01:00
Erik Hofman
f7c0a7f933 Add a simd_t<int> class and more inlining 2016-11-16 14:00:25 +01:00
Erik Hofman
6bf864babb Add class assingment functions 2016-11-16 13:33:51 +01:00
Erik Hofman
43bd1b15ee Add a SIMD accelerator class for float[4] and double[4] types 2016-11-16 12:45:14 +01:00
Rebecca N. Palmer
14c79d9ffb Nasal: disable NASAL_NAN64 on non-x86
Not every architecture has <=48-bit virtual address spaces:
http://meetings-archive.debian.net/pub/debian-meetings/2016/miniconf_cambridge16/Thanks_for_the_Memory.webm
2016-11-15 22:50:41 +00:00
James Turner
3009aadaa6 Simplify Boost auto-detection on MSVC. 2016-11-14 23:05:10 +01:00
James Turner
fca64343ae Attempting to fix Windows include issues.
Only handle PackageRef by reference in the header file, so we don’t
create calls to the copy constructor and/or destructor. If this doesn’t
work will need to create a stub implementation file.
2016-11-14 07:52:15 +01:00
James Turner
042a2659f6 Disable Codecvt for now, libstdc++ is problematic.
Need to research which libstdc++ versions implement codecvt.
2016-11-14 07:45:23 +01:00
James Turner
fe54af405c Zlib is a public, not private include in Simgear.
Should fix Windows compilation as reported by Alan Teeder on the list.
2016-11-14 07:31:54 +01:00
James Turner
ab70090a0a Finally fix bogus terrasync download numbers.
(Staying a hotel with sufficiently slow wi-fi to debug this!)
2016-11-13 22:18:32 +01:00
James Turner
ee02750e95 Enforce VS2013/2015 requirement on Windows. 2016-11-13 14:57:39 +00:00
James Turner
f55007394e Make more includes target-specific. 2016-11-13 14:57:21 +00:00
James Turner
60a9e8fb7e Implement UTF-8 conversion using codecvt 2016-11-13 14:56:52 +00:00
James Turner
7f8455f731 Multi-thumbnail support in packages.
Allow multiple thumbnails per variant / package, including
tagging with types so we can require certain thumbnails in the future.
2016-11-13 14:56:31 +00:00
James Turner
6ae86fc4ca Fix a warning. 2016-11-13 12:02:12 +00:00
Torsten Dreyer
e1fb13bed8 Allow passing of service and protocol for DNS SRV requests 2016-11-09 13:30:58 +01:00
Torsten Dreyer
27fff3b72a Sort DNS TXT entries and provide an attribute map 2016-11-09 12:03:37 +01:00
Torsten Dreyer
6a9235223e Set correct class for DNS TXT queries 2016-11-09 09:44:10 +01:00
Stuart Buchanan
c1e50e9a9c Correct mesh size correction for building LOD ranges 2016-11-08 20:06:34 +00:00
Stuart Buchanan
dcbf5b7c11 Fix for OBJECT_BUILDING_MESH_DETAILED 2016-11-08 19:56:08 +00:00
Torsten Dreyer
4b571f2a24 Implement SRV and TXT DNS records 2016-11-08 17:09:37 +01:00
Erik Hofman
679b7b845c Always define the class destructor 2016-11-08 13:17:15 +01:00
Edward d'Auvergne
50d7127c51 Calculation of the illuminance factor for the moon.
This is a number ranging between 0 and 1 based on the log of the illuminance of
the moon outside the atmosphere.  It is calculated as

    factor = (log(I) - max_loglux) / (max_loglux - min_loglux) + 1.0,

where I is the illuminance of the moon outside the atmosphere and min_loglux and
max_loglux are hardcoded to -0.504030345621 and -4.39964634562 respectively.
Although the value should never be outside of [0, 1], for safety it is clipped
to be between these values.  For more background, see
http://forum.flightgear.org/viewtopic.php?f=47&t=28201&start=60#p270516 .
2016-11-08 09:49:57 +01:00
Edward d'Auvergne
0e09ee4bce Calculation of the log of the illuminance of the moon outside the atmosphere.
This is the base 10 log of equation 20, converted from foot-candles to lux,
from:

   Krisciunas K. and Schaefer B.E. (1991). A model of the brightness of
moonlight, Publ. Astron.  Soc. Pacif. 103(667), 1033-1039 (DOI:
http://dx.doi.org/10.1086/132921).
2016-11-08 09:49:57 +01:00
Edward d'Auvergne
76ebd569d5 Calculation and exposure of the moon's age and phase.
To obtain the sun's true longitude, the Star::getlonEcl() function has been
created.  The moon's age is then calculated as the difference between the moon's
and sun's true longitudes.  The phase is then simply half of one minus the
cosine of the age.  Hence these calculations are very cheap compared to the rest
of the moon position calculations.  The algorithm is from:

    Duffett-Smith, Peter. Practical Astronomy With Your Calculator. 3rd ed.
Cambridge: Cambridge University Press, 1981. ISBN 0-521-28411-2.

The code can replicate the example in the book of Feb 26, 1979 at 16h UT, with
an age of -0.4767 degrees a phase of 0.0:

$ fgfs --aircraft=UFO --start-date-gmt=1979:02:26:16:00:00 --airport=EGLL \
--altitude=50000 --enable-hud

The calculated phase is 1.459e-5 and the age is -6.2908 (which is -0.43628
degrees).  For a recent full moon:

$ fgfs --aircraft=UFO --start-date-gmt=2015:11:25:22:44:00 --airport=EGLL \
--altitude=50000 --enable-hud

The calculated age is -3.1413 and the phase is 0.9999999778.
2016-11-08 09:49:57 +01:00
Edward d'Auvergne
edcd42bc2d Optimisation of the celestialBody ephemeris code.
By storing repetitive intermediate calculations, the number of mathematical
operations for a single call to CelestialBody::updatePosition() has decreased by
12.  This matches the changes to MoonPos::updatePosition().
2016-11-08 09:49:57 +01:00
Edward d'Auvergne
f04e501472 Exposure of the moon position.
The following functions have been added:  MoonPos::getM(), MoonPos::getw(),
MoonPos::getxg(), MoonPos::getyg(), MoonPos::getye(), MoonPos::getze(),
MoonPos::getDistance().  These are copied from and match the Star class
functions (but with xs and ys replaced by xg and yg).
2016-11-08 09:49:57 +01:00
Edward d'Auvergne
32d152ba38 A few spelling fixes for the moon position ephemeris code. 2016-11-08 09:49:57 +01:00
Edward d'Auvergne
94c4c44d92 Optimisation of the moon position ephemeris code.
By storing repetitive intermediate calculations, the number of mathematical
operations for a single call to MoonPos::updatePosition() has decreased by 32.
2016-11-08 09:49:57 +01:00
James Turner
ab1d4e651e Bugfix: avoid bogus download size on start
Missed a default init of the HTTP repo download content size, so until
the request response header was received, this could report a very
large value.
2016-11-07 15:49:07 +01:00
James Turner
5cd250e452 Packages: notify delegate of uninstalls. 2016-11-06 21:58:01 +01:00
James Turner
2dcff4bb8e Ensure build include location is used first.
Otherwise PREFIX_PATH headers might be found first, but these could be
from an older SimGear version.
2016-11-06 21:57:30 +01:00
James Turner
604a9ff614 Hopefully fix Win32 linkage. 2016-11-02 22:57:39 +00:00
James Turner
a09630bcca Cmake export fixes.
Should hopefully fix importing in FlightGear
2016-11-02 13:59:43 +00:00
James Turner
b44c70b3f4 Simplify isnan detection with C++11 library. 2016-10-30 22:49:38 +00:00
James Turner
e4cddb100e Drastically simplify compiler.h 2016-10-30 22:49:11 +00:00
Erik Hofman
e3a4144e6c Switch to SGMisc::isNaN 2016-10-28 11:18:40 +02:00