Commit 5f9bd2ef authored by Akarsh Simha's avatar Akarsh Simha

Allow to demote objects in the Dobsonian hole

parent cec7c8f9
......@@ -757,6 +757,21 @@
<whatsthis>The observing list will prefer SDSS imagery while downloading imagery.</whatsthis>
<default>false</default>
</entry>
<entry name="ObsListDemoteHole" type="Bool">
<label>While sorting by percentage altitude in the observing list, demote objects present in the Dobsonian hole</label>
<whatsthis>Check this if you use a large Dobsonian telescope.
Sorting by percentage current altitude is an easy way of determining what objects are well-placed for observation.
However, when using a large Dobsonian telescope, objects close to the zenith are hard to observe.
Since tracking there corresponds to a rotation in azimuith, it is both counterintuitive and requires the observer to frequently move the ladder.
The region around the zenith where this is particularly frustrating is called the Dobsonian hole.
This checkbox makes the observing list consider objects present in the hole as unfit for observation.</whatsthis>
<default>false</default>
</entry>
<entry name="ObsListHoleSize" type="Double">
<label>This is the angular distance from the zenith, in degrees, below which you can easily point your telescope.</label>
<whatsthis>This specifies the angular radius of the Dobsonian hole, i.e. the region where a large Dobsonian telescope cannot be pointed easily.</whatsthis>
<default>15.00</default>
</entry>
</group>
<group name="Colors">
<entry name="ColorSchemeFile" type="String">
......
......@@ -51,6 +51,10 @@ OpsAdvanced::OpsAdvanced()
connect(showLogsB, SIGNAL(clicked()), this, SLOT(slotShowLogFiles()));
connect( kcfg_ObsListDemoteHole, &QCheckBox::toggled, [this]( bool state ) {
kcfg_ObsListHoleSize->setEnabled( state );
} );
foreach(QAbstractButton *b, modulesGroup->buttons())
b->setEnabled(kcfg_VerboseLogging->isChecked());
}
......@@ -83,12 +87,12 @@ void OpsAdvanced::slotToggleVerbosityOptions()
void OpsAdvanced::slotToggleOutputOptions()
{
if (kcfg_LogToDefault->isChecked())
{
{
if (kcfg_DisableLogging->isChecked() == false)
KSUtils::Logging::UseDefault();
}
else
else
KSUtils::Logging::UseFile();
}
......
......@@ -6,15 +6,15 @@
<rect>
<x>0</x>
<y>0</y>
<width>584</width>
<height>473</height>
<width>723</width>
<height>486</height>
</rect>
</property>
<layout class="QVBoxLayout" name="verticalLayout_5">
<item>
<widget class="QTabWidget" name="AdvancedOptionsTabWidget">
<property name="currentIndex">
<number>0</number>
<number>2</number>
</property>
<widget class="QWidget" name="tab">
<attribute name="title">
......@@ -280,7 +280,7 @@
<string>Enable regular debug output</string>
</property>
<property name="text">
<string>Regular</string>
<string>Reg&amp;ular</string>
</property>
<property name="checked">
<bool>true</bool>
......@@ -329,7 +329,7 @@
<string>Disable all logging output</string>
</property>
<property name="text">
<string>Disable</string>
<string>&amp;Disable</string>
</property>
<property name="checked">
<bool>false</bool>
......@@ -404,7 +404,7 @@
<string>Log debug messages to default output device used by the platform (e.g. Standard Error)</string>
</property>
<property name="text">
<string>Default</string>
<string>Defaul&amp;t</string>
</property>
<property name="checked">
<bool>true</bool>
......@@ -865,7 +865,7 @@
<item>
<widget class="QRadioButton" name="kcfg_ObsListSymbol">
<property name="text">
<string>Sy&amp;mbol</string>
<string>S&amp;ymbol</string>
</property>
<property name="checked">
<bool>true</bool>
......@@ -928,13 +928,78 @@
<bool>false</bool>
</property>
<property name="text">
<string>Sloan Digital Sky Sur&amp;vey (SDSS)</string>
<string>Sloan &amp;Digital Sky Survey (SDSS)</string>
</property>
</widget>
</item>
</layout>
</widget>
</item>
<item>
<widget class="QGroupBox" name="ObsListMiscOptions">
<property name="title">
<string>Miscellaneous</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout_6">
<item>
<widget class="QCheckBox" name="kcfg_ObsListDemoteHole">
<property name="text">
<string>While sorting by percentage altitude, demote objects present in the Dobsonian hole</string>
</property>
</widget>
</item>
<item>
<layout class="QHBoxLayout" name="horizontalLayout">
<item>
<spacer name="holeSizeSpacer">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item>
<widget class="QLabel" name="holeSizeLabel">
<property name="sizePolicy">
<sizepolicy hsizetype="MinimumExpanding" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>Hole size in degrees:</string>
</property>
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
</widget>
</item>
<item>
<widget class="QDoubleSpinBox" name="kcfg_ObsListHoleSize">
<property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Minimum">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="maximum">
<double>89.989999999999995</double>
</property>
<property name="value">
<double>15.000000000000000</double>
</property>
</widget>
</item>
</layout>
</item>
</layout>
</widget>
</item>
<item>
<spacer name="verticalSpacer_2">
<property name="orientation">
......@@ -999,12 +1064,12 @@
<resources/>
<connections/>
<buttongroups>
<buttongroup name="logbuttonGroup"/>
<buttongroup name="modulesGroup">
<property name="exclusive">
<bool>false</bool>
</property>
</buttongroup>
<buttongroup name="verbosityButtonGroup"/>
<buttongroup name="logbuttonGroup"/>
</buttongroups>
</ui>
......@@ -233,22 +233,31 @@ ObservingList::ObservingList()
m_NoImagePixmap = QPixmap(":/images/noimage.png").scaledToHeight(ui->ImagePreview->width());
m_altCostHelper = [ this ]( const SkyPoint &p ) -> QStandardItem * {
double inf = std::numeric_limits<double>::infinity();
const double inf = std::numeric_limits<double>::infinity();
double altCost = 0.;
QString itemText;
if ( p.maxAlt( *( geo->lat() ) ) <= 0. ) {
double maxAlt = p.maxAlt( *( geo->lat() ) );
if ( Options::obsListDemoteHole() && maxAlt > 90. - Options::obsListHoleSize() )
maxAlt = 90. - Options::obsListHoleSize();
if ( maxAlt <= 0. ) {
altCost = -inf;
itemText = i18n( "Never rises" );
}
else {
altCost = ( p.alt().Degrees() / p.maxAlt( *( geo->lat() ) ) ) * 100.;
altCost = ( p.alt().Degrees() / maxAlt ) * 100.;
if ( altCost < 0 )
itemText = i18nc( "Short text to describe that object has not risen yet", "Not risen" );
else
itemText = QString::number( altCost, 'f', 0 ) + '%';
else {
if ( altCost > 100. ) {
altCost = -inf;
itemText = i18nc( "Object is in the Dobsonian hole", "In hole" );
}
else
itemText = QString::number( altCost, 'f', 0 ) + '%';
}
}
QStandardItem *altItem = new QStandardItem( itemText );
QStandardItem *altItem = new QStandardItem( itemText );
altItem->setData( altCost, Qt::UserRole );
qDebug() << "Updating altitude for " << p.ra().toHMSString() << " " << p.dec().toDMSString() << " alt = " << p.alt().toDMSString() << " info to " << itemText;
return altItem;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment