Commit b1d08942 authored by Tomasz Buchert's avatar Tomasz Buchert

Imported Upstream version 0.14.1

parent 107962e6
......@@ -20,7 +20,7 @@ ENDIF()
PROJECT(Stellarium)
SET(STELLARIUM_MAJOR "0")
SET(STELLARIUM_MINOR "14")
SET(STELLARIUM_PATCH "0")
SET(STELLARIUM_PATCH "1")
SET(VERSION "${STELLARIUM_MAJOR}.${STELLARIUM_MINOR}.${STELLARIUM_PATCH}")
SET(PACKAGE stellarium)
SET(COPYRIGHT_YEARS "2000-2015")
......@@ -129,9 +129,9 @@ IF(ENABLE_NLS)
ADD_DEFINITIONS(-DENABLE_NLS)
ENDIF()
SET(RELEASE_BUILD 1 CACHE BOOL "Flag this build as an official release.")
IF(RELEASE_BUILD)
ADD_DEFINITIONS(-DRELEASE_BUILD)
SET(STELLARIUM_RELEASE_BUILD 1 CACHE BOOL "Flag this build as an official release.")
IF(STELLARIUM_RELEASE_BUILD)
ADD_DEFINITIONS(-DSTELLARIUM_RELEASE_BUILD)
ENDIF()
# Activate sound support
......@@ -149,7 +149,7 @@ ELSE()
ENDIF()
SET(GUI_MODE Standard CACHE STRING "Choose the type of GUI to build, options are: Standard, None")
SET(STELLARIUM_GUI_MODE Standard CACHE STRING "Choose the type of GUI to build, options are: Standard, None")
SET(GENERATE_PACKAGE_TARGET 1 CACHE BOOL "Set to 1 or true if you want to have make package target")
......@@ -222,6 +222,9 @@ FIND_PACKAGE(Qt5Gui REQUIRED)
FIND_PACKAGE(Qt5Network REQUIRED)
FIND_PACKAGE(Qt5OpenGL REQUIRED)
FIND_PACKAGE(Qt5Widgets REQUIRED)
IF(USE_PLUGIN_TELESCOPECONTROL)
FIND_PACKAGE(Qt5SerialPort REQUIRED)
ENDIF()
IF(WIN32)
FIND_PACKAGE(Qt5Sql REQUIRED)
FIND_PACKAGE(Qt5XmlPatterns REQUIRED)
......@@ -275,21 +278,36 @@ ELSE()
ENDIF()
########### Get revision number for non-release builds ###########
IF(NOT RELEASE_BUILD)
IF(NOT STELLARIUM_RELEASE_BUILD)
#Hack until CMake detection for Bazaar is finished
IF(BZR_REVISION)
SET(PACKAGE_VERSION "bzr${BZR_REVISION}")
ADD_DEFINITIONS(-DBZR_REVISION="${BZR_REVISION}")
ENDIF()
IF(DEV_VERSION)
ADD_DEFINITIONS(-DDEV_VERSION="${DEV_VERSION}")
IF(STELLARIUM_VERSION)
SET(PACKAGE_VERSION "${STELLARIUM_VERSION}")
ADD_DEFINITIONS(-DSTELLARIUM_VERSION="${STELLARIUM_VERSION}")
ENDIF()
ENDIF()
CONFIGURE_FILE(${CMAKE_SOURCE_DIR}/data/stellarium.exe.manifest.cmake ${CMAKE_SOURCE_DIR}/data/stellarium.exe.manifest @ONLY)
### [Optional] Embed icon in the Windows executable ###
IF(WIN32)
#######################################################
### Generate a VersionInfo file ###
#######################################################
IF(STELLARIUM_RELEASE_BUILD)
SET(PACKAGE_VERSION_RC "${PACKAGE_VERSION},0")
ELSE()
SET(PACKAGE_VERSION_RC "${PACKAGE_VERSION}")
ENDIF()
STRING(REGEX REPLACE "([.]+)" "," PACKAGE_VERSION_RC ${PACKAGE_VERSION_RC})
CONFIGURE_FILE(${CMAKE_SOURCE_DIR}/data/stellarium.rc.cmake ${CMAKE_SOURCE_DIR}/data/stellarium.rc @ONLY)
#######################################################
### [Optional] Embed icon in the Windows executable ###
#######################################################
SET(ENABLE_WINDOWS_EXE_ICON 1 CACHE BOOL "Determine if it should try to embed the Stellarium icon in the Windows .exe file")
IF(ENABLE_WINDOWS_EXE_ICON AND NOT RC_COMPILER_PATH)
IF(NOT MSVC)
......@@ -301,10 +319,11 @@ IF(WIN32)
MESSAGE(STATUS "Found .rc compiler: ${RC_COMPILER_PATH}")
ENDIF(RC_COMPILER_PATH)
ENDIF(ENABLE_WINDOWS_EXE_ICON AND NOT RC_COMPILER_PATH)
ENDIF()
### Generate an Inno Setup project file ###
IF(WIN32)
#######################################################
### Generate an Inno Setup project file ###
#######################################################
# Try to guess the MinGW /bin directory...
GET_FILENAME_COMPONENT(MINGW_BIN_DIRECTORY ${CMAKE_CXX_COMPILER} PATH)
IF("${CMAKE_SIZEOF_VOID_P}" EQUAL "4")
......@@ -353,6 +372,12 @@ IF(WIN32)
ELSE()
SET(ISS_QT_SCRIPT "; QtScript isn't used")
ENDIF()
IF(USE_PLUGIN_TELESCOPECONTROL)
GET_TARGET_PROPERTY(QtSerialPort_location Qt5::SerialPort LOCATION)
SET(ISS_QT_SERIALPORT "Source: \"${QtSerialPort_location}\"; DestDir: \"{app}\";")
ELSE()
SET(ISS_QT_SERIALPORT "; QtSerialPort isn't used")
ENDIF()
IF(ENABLE_SOUND)
GET_TARGET_PROPERTY(QtMultimedia_location Qt5::Multimedia LOCATION)
GET_TARGET_PROPERTY(QtMultimediaWidgets_location Qt5::MultimediaWidgets LOCATION)
......@@ -362,23 +387,29 @@ IF(WIN32)
ENDIF()
GET_FILENAME_COMPONENT(QT5_LIBS ${QtCore_location} PATH)
IF(MSVC)
# Use installer for checking minimum requirements
# Stellarium/MSVC require Windows Vista (6.0) for work
# Details: http://www.jrsoftware.org/ishelp/index.php?topic=winvernotes
SET(MIN_VERSION "6.0")
SET(ISS_ANGLE_LIBS "; ANGLE support (libEGL.dll, libGLESv2.dll and d3dcompiler_*.dll)\nSource: \"${QT5_LIBS}/libEGL.dll\"; DestDir: \"{app}\";\nSource: \"${QT5_LIBS}/libGLESv2.dll\"; DestDir: \"{app}\";\nSource: \"${QT5_LIBS}/d3dcompiler_*.dll\"; DestDir: \"{app}\";")
ELSE()
# Use installer for checking minimum requirements
# Stellarium/MinGW require Windows XP (5.1) for work
# Details: http://www.jrsoftware.org/ishelp/index.php?topic=winvernotes
SET(MIN_VERSION "5.1")
SET(ISS_ANGLE_LIBS "; ANGLE support doesn't exists for MinGW")
ENDIF()
SET(ISS_ICU_LIBS "; ICU support\nSource: \"${QT5_LIBS}/icu*.dll\"; DestDir: \"{app}\";")
# Deploy related stuff
SET(ISS_WINDOWS_PLUGIN "Source: \"${QT5_LIBS}/../plugins/platforms/qwindows.dll\"; DestDir: \"{app}/platforms/\";")
SET(ISS_ICO_PLUGIN "Source: \"${QT5_LIBS}/../plugins/imageformats/qico.dll\"; DestDir: \"{app}/imageformats/\";")
SET(ISS_JPEG_PLUGIN "Source: \"${QT5_LIBS}/../plugins/imageformats/qjpeg.dll\"; DestDir: \"{app}/imageformats/\";")
SET(ISS_QT_PLUGINS "; Qt plugins")
SET(ISS_QT_PLUGINS "${ISS_QT_PLUGINS}\nSource: \"${QT5_LIBS}/../plugins/platforms/qwindows.dll\"; DestDir: \"{app}/platforms/\";")
SET(ISS_QT_PLUGINS "${ISS_QT_PLUGINS}\nSource: \"${QT5_LIBS}/../plugins/imageformats/qico.dll\"; DestDir: \"{app}/imageformats/\";")
SET(ISS_QT_PLUGINS "${ISS_QT_PLUGINS}\nSource: \"${QT5_LIBS}/../plugins/imageformats/qjpeg.dll\"; DestDir: \"{app}/imageformats/\";")
IF(ENABLE_SOUND)
SET(ISS_MULTIMEDIA_PLUGINS "Source: \"${QT5_LIBS}/../plugins/mediaservice/dsengine.dll\"; DestDir: \"{app}/mediaservice/\";\nSource: \"${QT5_LIBS}/../plugins/mediaservice/qtmedia_audioengine.dll\"; DestDir: \"{app}/mediaservice/\";\nSource: \"${QT5_LIBS}/../plugins/playlistformats/qtmultimedia_m3u.dll\"; DestDir: \"{app}/playlistformats/\";")
ELSE()
SET(ISS_MULTIMEDIA_PLUGINS "; QtMultimedia isn't used")
ENDIF()
SET(ISS_QML_DIR "Source: \"${QT5_LIBS}/../imports/Qt/labs/shaders/qmldir\"; DestDir: \"{app}/Qt/labs/shaders/\";")
SET(ISS_QML_PLUGINS "Source: \"${QT5_LIBS}/../imports/Qt/labs/shaders/plugins.qmltypes\"; DestDir: \"{app}/Qt/labs/shaders/\";")
SET(ISS_QML_SHADERS "Source: \"${QT5_LIBS}/../imports/Qt/labs/shaders/qmlshadersplugin.dll\"; DestDir: \"{app}/Qt/labs/shaders/\";")
CONFIGURE_FILE(${CMAKE_SOURCE_DIR}/stellarium.iss.cmake ${CMAKE_SOURCE_DIR}/stellarium.iss @ONLY)
CONFIGURE_FILE(${CMAKE_SOURCE_DIR}/stellarium-patch.iss.cmake ${CMAKE_SOURCE_DIR}/stellarium-patch.iss @ONLY)
......@@ -458,7 +489,8 @@ IF(WIN32)
STRING(REPLACE "/" "\\" PROJECT_SOURCE_DIR_WINPATH ${PROJECT_SOURCE_DIR})
STRING(REPLACE "/" "\\" PROJECT_BINARY_DIR_WINPATH ${PROJECT_BINARY_DIR})
CONFIGURE_FILE(${PROJECT_SOURCE_DIR}/util/copy-translations.bat.cmake ${PROJECT_SOURCE_DIR}/util/copy-translations.bat @ONLY NEWLINE_STYLE WIN32)
ENDIF()
ENDIF()
########### Top level include directories ###########
# This will be used for all compilations in sub-directories
......
0.14.1 [2015-12-02]
Bugfix release:
- Added support for side-by-side assembly technology (LP: #1400045)
- Enhancements of the Ocular plugin: add OAG support (LP: #1354427)
- Added Belarusian translation for landscapes and sky cultures (LP: #1520303)
- Added designations for few stars in Scorpius (LP: #1518437)
- Fixed constellation art brightness and zooming (LP: #1520783)
- Fixed number of satellite orbit segments resets (LP: #1510592)
- Fixed certain outplanet moons with wrong Longitudes (LP: #1509693, #1509692)
- Fixed saving settings for some View panel options (LP: #1509639)
- Fixed fails to run up on Windows when invoked from a different directory (LP: #1410529)
- Fixed wrong value of ecliptic obliquity (LP: #1520792)
- Fixed segmentation fault (core dumped) while try update stars catalog (LP: #1514542)
- Tentative fix for support 4K resolution (GUI scaling) (LP: #1372781)
0.14.0 [2015-10-24]
A big leap forward in astronomical accuracy for historical applications:
- Precession now follows the IAU2006 model in the long-time version from Vondrak
......
[main]
version = 0.14.0
version = 0.14.1
invert_screenshots_colors = false
[plugins_load_at_startup]
......
......@@ -1895,7 +1895,7 @@ radius=2403.
rot_equator_ascending_node=160.6
rot_obliquity=0.4
rot_periode=400.5364314
rot_rotation_offset=281.51
rot_rotation_offset=120.80
tex_halo=star16x16.png
tex_map=callisto.png
type=moon
......@@ -1946,8 +1946,8 @@ parent=Pluto
radius=593.
rot_equator_ascending_node=287.6
rot_obliquity=1.0
rot_periode=153.293904
rot_rotation_offset=123.28
rot_periode=-153.293904
rot_rotation_offset=195.62
tex_halo=star16x16.png
tex_map=charon.png
type=moon
......@@ -2008,7 +2008,7 @@ parent=Saturn
radius=560.
rot_obliquity=0.0
rot_periode=65.68597326
rot_rotation_offset=317.1
rot_rotation_offset=316.98
tex_halo=star16x16.png
tex_map=dione.png
type=moon
......@@ -2136,7 +2136,7 @@ radius=2634.
rot_equator_ascending_node=161.6
rot_obliquity=0.1
rot_periode=171.7092749
rot_rotation_offset=61.88
rot_rotation_offset=260.61
tex_halo=star16x16.png
tex_map=ganymede.png
type=moon
......@@ -2481,7 +2481,7 @@ radius=198.6
rot_equator_ascending_node=137.8
rot_obliquity=1.5
rot_periode=22.61812344
rot_rotation_offset=266.33
rot_rotation_offset=126.39
tex_halo=star16x16.png
tex_map=mimas.png
type=moon
......@@ -2498,7 +2498,7 @@ parent=Uranus
radius=235.8
rot_obliquity=0.0
rot_periode=-33.92350158
rot_rotation_offset=35.51
rot_rotation_offset=35.78
tex_halo=star16x16.png
tex_map=miranda.png
type=moon
......@@ -2661,7 +2661,7 @@ parent=Uranus
radius=761.4
rot_obliquity=0.0
rot_periode=-323.1175675
rot_rotation_offset=13.18
rot_rotation_offset=12.47
tex_halo=star16x16.png
tex_map=oberon.png
type=moon
......@@ -2751,7 +2751,7 @@ radius=11.1
rot_equator_ascending_node=186.6
rot_obliquity=0.6
rot_periode=7.653843687
rot_rotation_offset=356.8
rot_rotation_offset=169.17
tex_halo=star16x16.png
tex_map=phobos.png
type=moon
......@@ -2768,7 +2768,7 @@ parent=Sun
radius=1195.
rot_equator_ascending_node=228.34
rot_obliquity=-115.60
rot_periode=153.293904
rot_periode=-153.293904
rot_pole_de=9.09
rot_pole_ra=313.02
rot_rotation_offset=303.46
......@@ -3045,7 +3045,7 @@ radius=2575.
rot_equator_ascending_node=186.6
rot_obliquity=0.6
rot_periode=382.6907418
rot_rotation_offset=147.68
rot_rotation_offset=321.00
tex_halo=star16x16.png
tex_map=titan.png
type=moon
......@@ -3062,7 +3062,7 @@ parent=Uranus
radius=788.9
rot_obliquity=0.0
rot_periode=-208.9407710
rot_rotation_offset=84.33
rot_rotation_offset=83.45
tex_halo=star16x16.png
tex_map=titania.png
type=moon
......
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
<assemblyIdentity
processorArchitecture="*"
version="@PACKAGE_VERSION@"
type="win32"
name="Stellarium.Stellarium.Stellarium"/>
<description>Stellarium is a free open source planetarium for your computer.</description>
<dependency>
<dependentAssembly>
<assemblyIdentity
type="win32"
name="Microsoft.Windows.Common-Controls"
version="6.0.0.0"
publicKeyToken="6595b64144ccf1df"
language="*"
processorArchitecture="*"/>
</dependentAssembly>
</dependency>
</assembly>
\ No newline at end of file
stellarium-icon ICON "stellarium.ico"
1 RT_MANIFEST "stellarium.exe.manifest"
\ No newline at end of file
stellarium-icon ICON "stellarium.ico"
1 VERSIONINFO
FILEVERSION @PACKAGE_VERSION_RC@
PRODUCTVERSION @PACKAGE_VERSION_RC@
FILEOS 0x00040004L
FILETYPE 0x00000001L
FILESUBTYPE 0x0L
BEGIN
BLOCK "StringFileInfo"
BEGIN
BLOCK "040904B0" // Lang=English (United States, 0x0409, decimal 1033), CharSet=Unicode (0x04B0, decimal 1200).
BEGIN
VALUE "CompanyName", "Stellarium team\0"
VALUE "FileDescription", "Stellarium is a free open source planetarium\0"
VALUE "FileVersion", "@PACKAGE_VERSION@\0"
VALUE "LegalCopyright", "Copyright (C) @COPYRIGHT_YEARS@ Stellarium team\0"
VALUE "Info", "http://www.stellarium.org/\0"
VALUE "ProductVersion", "@PACKAGE_VERSION@\0"
VALUE "ProductName", "Stellarium\0"
VALUE "InternalName", "stellarium\0"
VALUE "OriginalFilename", "stellarium.exe\0"
END
END
BLOCK "VarFileInfo"
BEGIN
VALUE "Translation", 0x0409, 1200
END
END
<h2>Жэнэва</h2>
<p>Лінія гарызонту Жэнэвы. Прыклад, які дэманструе падтрымку фармату Cartes du Ciel, узята з дазволу <a href="http://sourceforge.net/p/skychart/code/HEAD/tree/trunk/tools/data/horizon/horizon_Geneve.txt">адсюль</a>.
<h2>Ґрасмуґль</h2>
<p>Поле побач зь Лібэрґам (вялізны 16-мэтровы курган гальштацкай эпохі) ля Ґрасмуґля ў Ніжняў Аўстрыі &mdash; асноўнае месца назіраньняў пад Венай</p><p>Нягледзячы на блізкасьць да вялікага горада, сьветлавое забруджаньне засяроджана, збольшага, ля гарызонту на поўдні, таму Млечны шлях добра бачны, калі глядзець крыху вышэй. Ля гарызонту на ўсходзе бачныя чырвоныя агні ветрапарку. <a href="http://starlightoasis.org">http://starlightoasis.org</a>.</p>
<h2>Нулявы гарызонт</h2>
<p>Прост шматкутны краявід, які проста хавае вобласьць пад матэматычным гарызонтам.</p>
......@@ -347,8 +347,13 @@ void MeteorShower::drawRadiant(StelCore *core)
rgb /= 255.f;
painter.setColor(rgb[0], rgb[1], rgb[2], alpha);
// Hide the radiant markers at during day light and make it visible
// when first stars will shine on the sky.
float mlimit = core->getSkyDrawer()->getLimitMagnitude();
float mag = 2.0f;
Vec3d win;
if (m_mgr->getEnableMarker() && painter.getProjector()->projectCheck(m_position, win))
if (m_mgr->getEnableMarker() && painter.getProjector()->projectCheck(m_position, win) && mag<=mlimit)
{
m_mgr->getRadiantTexture()->bind();
painter.drawSprite2dMode(XY[0], XY[1], 45);
......@@ -358,7 +363,8 @@ void MeteorShower::drawRadiant(StelCore *core)
painter.setFont(m_mgr->getFont());
float size = getAngularSize(NULL)*M_PI/180.*painter.getProjector()->getPixelPerRadAtCenter();
float shift = 8.f + size/1.8f;
painter.drawText(XY[0]+shift, XY[1]+shift, getNameI18n(), 0, 0, 0, false);
if ((mag+1.f)<mlimit)
painter.drawText(XY[0]+shift, XY[1]+shift, getNameI18n(), 0, 0, 0, false);
}
}
}
......
SET(OCULARS_STELMODULE_MAJOR "1")
SET(OCULARS_STELMODULE_MINOR "0")
SET(OCULARS_STELMODULE_PATCH "13")
SET(OCULARS_STELMODULE_MINOR "1")
SET(OCULARS_STELMODULE_PATCH "0")
SET(OCULARS_VERSION "${OCULARS_STELMODULE_MAJOR}.${OCULARS_STELMODULE_MINOR}.${OCULARS_STELMODULE_PATCH}")
IF(APPLE)
......
......@@ -35,6 +35,12 @@ CCD::CCD()
, m_chipHeight(0.)
, m_pixelWidth(0.)
, m_pixelHeight(0.)
, m_chipRotAngle(0.)
, m_has_oag(false)
, m_oag_prismHeight(0.)
, m_oag_prismWidth(0.)
, m_oag_prismDistance(0.)
, m_oag_prismPosAngle(0.)
{
}
......@@ -46,6 +52,12 @@ CCD::CCD(const QObject& other)
, m_chipHeight(other.property("chipHeight").toFloat())
, m_pixelWidth(other.property("pixelWidth").toFloat())
, m_pixelHeight(other.property("pixelHeight").toFloat())
, m_chipRotAngle(other.property("chipRotAngle").toFloat())
, m_has_oag(other.property("hasOAG").toBool())
, m_oag_prismHeight(other.property("prismHeight").toFloat())
, m_oag_prismWidth(other.property("prismWidth").toFloat())
, m_oag_prismDistance(other.property("prismDistance").toFloat())
, m_oag_prismPosAngle(other.property("prismPosAngle").toFloat())
{
}
......@@ -67,6 +79,12 @@ QMap<int, QString> CCD::propertyMap()
mapping[4] = "pixelWidth";
mapping[5] = "resolutionX";
mapping[6] = "resolutionY";
mapping[7] = "chipRotAngle";
mapping[8] = "hasOAG";
mapping[9] = "prismHeight";
mapping[10] = "prismWidth";
mapping[11] = "prismDistance";
mapping[12] = "prismPosAngle";
}
return mapping;
}
......@@ -148,6 +166,87 @@ void CCD::setPixelHeight(double height)
m_pixelHeight = height;
}
void CCD::setChipRotAngle(double angle)
{
m_chipRotAngle = angle;
}
double CCD::chipRotAngle() const
{
return m_chipRotAngle;
}
bool CCD::hasOAG() const
{
return m_has_oag;
}
void CCD::setHasOAG(bool oag)
{
m_has_oag = oag;
}
double CCD::prismHeight() const
{
return m_oag_prismHeight;
}
void CCD::setPrismHeight(double height)
{
m_oag_prismHeight = height;
}
double CCD::prismWidth() const
{
return m_oag_prismWidth;
}
void CCD::setPrismWidth(double width)
{
m_oag_prismWidth = width;
}
double CCD::prismDistance() const
{
return m_oag_prismDistance;
}
void CCD::setPrismDistance(double distance)
{
m_oag_prismDistance = distance;
}
void CCD::setPrismPosAngle(double angle)
{
m_oag_prismPosAngle = angle;
}
double CCD::prismPosAngle() const
{
return m_oag_prismPosAngle;
}
double CCD::getInnerOAGRadius(Telescope *telescope, Lens *lens) const
{
const double lens_multipler = (lens != NULL ? lens->multipler() : 1.0f);
double radius = RADIAN_TO_DEGREES * 2 * qAtan(this->prismDistance() /(2.0 * telescope->focalLength() * lens_multipler));
return radius;
}
double CCD::getOuterOAGRadius(Telescope *telescope, Lens *lens) const
{
const double lens_multipler = (lens != NULL ? lens->multipler() : 1.0f);
double radius = RADIAN_TO_DEGREES * 2 * qAtan((this->prismDistance() + this->prismHeight()) /(2.0 * telescope->focalLength() * lens_multipler));
return radius;
}
double CCD::getOAGActualFOVx(Telescope *telescope, Lens *lens) const
{
const double lens_multipler = (lens != NULL ? lens->multipler() : 1.0f);
double fovX = RADIAN_TO_DEGREES * 2 * qAtan(this->prismWidth() /(2.0 * telescope->focalLength() * lens_multipler));
return fovX;
}
double CCD::getActualFOVx(Telescope *telescope, Lens *lens) const
{
const double lens_multipler = (lens != NULL ? lens->multipler() : 1.0f);
......@@ -171,7 +270,13 @@ void CCD::writeToSettings(QSettings * settings, const int index)
settings->setValue(prefix + "chip_width", this->chipWidth());
settings->setValue(prefix + "chip_height", this->chipHeight());
settings->setValue(prefix + "pixel_width", this->pixelWidth());
settings->setValue(prefix + "pixel_height", this->pixelWidth());
settings->setValue(prefix + "pixel_height", this->pixelHeight());
settings->setValue(prefix + "chip_rot_angle", this->chipRotAngle());
settings->setValue(prefix + "has_oag", this->hasOAG());
settings->setValue(prefix + "prism_height", this->prismHeight());
settings->setValue(prefix + "prism_width", this->prismWidth());
settings->setValue(prefix + "prism_distance", this->prismDistance());
settings->setValue(prefix + "prism_pos_angle", this->prismPosAngle());
}
/* ********************************************************************* */
#if 0
......@@ -190,7 +295,12 @@ CCD* CCD::ccdFromSettings(QSettings* theSettings, int ccdIndex)
ccd->setChipHeight(theSettings->value(prefix + "chip_height", "0.0").toDouble());
ccd->setPixelWidth(theSettings->value(prefix + "pixel_width", "0.0").toDouble());
ccd->setPixelHeight(theSettings->value(prefix + "pixel_height", "0.0").toDouble());
ccd->setChipRotAngle(theSettings->value(prefix + "chip_rot_angle", "0.0").toDouble());
ccd->setHasOAG(theSettings->value(prefix + "has_oag", "false").toBool());
ccd->setPrismHeight(theSettings->value(prefix + "prism_height", "0.0").toDouble());
ccd->setPrismWidth(theSettings->value(prefix + "prism_width", "0.0").toDouble());
ccd->setPrismDistance(theSettings->value(prefix + "prism_distance", "0.0").toDouble());
ccd->setPrismPosAngle(theSettings->value(prefix + "prism_pos_angle", "0.0").toDouble());
return ccd;
}
......@@ -204,5 +314,6 @@ CCD* CCD::ccdModel()
model->setPixelWidth(9);
model->setResolutionX(4096);
model->setResolutionY(4096);
model->setChipRotAngle(0);
return model;
}
......@@ -37,6 +37,12 @@ class CCD : public QObject
Q_PROPERTY(double chipHeight READ chipHeight WRITE setChipHeight)
Q_PROPERTY(double pixelWidth READ pixelWidth WRITE setPixelWidth)
Q_PROPERTY(double pixelHeight READ pixelHeight WRITE setPixelHeight)
Q_PROPERTY(double chipRotAngle READ chipRotAngle WRITE setChipRotAngle)
Q_PROPERTY(double hasOAG READ hasOAG WRITE setHasOAG)
Q_PROPERTY(double prismHeight READ prismHeight WRITE setPrismHeight)
Q_PROPERTY(double prismWidth READ prismWidth WRITE setPrismWidth)
Q_PROPERTY(double prismDistance READ prismDistance WRITE setPrismDistance)
Q_PROPERTY(double prismPosAngle READ prismPosAngle WRITE setPrismPosAngle)
public:
CCD();
Q_INVOKABLE CCD(const QObject& other);
......@@ -60,6 +66,18 @@ public:
void setPixelWidth(double width);
double pixelHeight() const;
void setPixelHeight(double height);
double chipRotAngle() const;
void setChipRotAngle(double angle);
bool hasOAG() const;
void setHasOAG(bool oag);
double prismDistance() const;
void setPrismDistance(double distance);
double prismHeight() const;
void setPrismHeight(double height);
double prismWidth() const;
void setPrismWidth(double width);
double prismPosAngle() const;
void setPrismPosAngle(double angle);
/**
* The formula for this calculation comes from the Yerkes observatory.
......@@ -67,6 +85,9 @@ public:
*/
double getActualFOVx(Telescope *telescope, Lens *lens) const;
double getActualFOVy(Telescope *telescope, Lens *lens) const;
double getInnerOAGRadius(Telescope *telescope, Lens *lens) const;
double getOuterOAGRadius(Telescope *telescope, Lens *lens) const;
double getOAGActualFOVx(Telescope *telescope, Lens *lens) const;
QMap<int, QString> propertyMap();
private:
QString m_name;
......@@ -82,6 +103,18 @@ private:
double m_pixelWidth;
//! width of 1 pixel in micron (micrometer)
double m_pixelHeight;
//! chip rotation angle around its axis (degrees)
double m_chipRotAngle;
//! Show off axis guider view
bool m_has_oag;
//! OAG prism height (milimeters)
double m_oag_prismHeight;
//! OAG prism width (milimeters)
double m_oag_prismWidth;
//! OAG prisrm distance from the axis center (mimileters)
double m_oag_prismDistance;
//! OAG prisrm position angle (degrees)
double m_oag_prismPosAngle;
};
......
......@@ -122,7 +122,6 @@ Oculars::Oculars():
flagLimitPlanets(false),
magLimitPlanets(0.0),
flagMoonScale(false),
ccdRotationAngle(0.0),
maxEyepieceAngle(0.0),
requireSelection(true),
flagLimitMagnitude(false),
......@@ -793,7 +792,16 @@ void Oculars::updateLists()