Skip to content

Commit

Permalink
Introduce the new Planetary Guiding Tool, which can be optionally ena…
Browse files Browse the repository at this point in the history
…bled

for the detection of large celestial bodies such as the Sun, Moon, and planets.
This feature detects them as either full light disks or crescent shapes
occurring during eclipses or various Moon phases. This commit lays the
foundation for subsequent updates needed to fully integrate this feature
into PHD2 and ensure its functionality.

Signed-off-by: Leo Shatz <[email protected]>

no zoom

Signed-off-by: Leo Shatz <[email protected]>

fixes

Signed-off-by: Leo Shatz <[email protected]>

rename

Signed-off-by: Leo Shatz <[email protected]>

copyr

Signed-off-by: Leo Shatz <[email protected]>

switch to opencv4

Signed-off-by: Leo Shatz <[email protected]>

Linux fixups

Signed-off-by: Leo Shatz <[email protected]>
  • Loading branch information
Eyeke2 committed Apr 21, 2024
1 parent 9ea3210 commit 43df98b
Show file tree
Hide file tree
Showing 15 changed files with 2,369 additions and 14 deletions.
4 changes: 4 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -326,6 +326,8 @@ set(guiding_SRC
${phd_src_dir}/guide_algorithms.h
${phd_src_dir}/guider_multistar.cpp
${phd_src_dir}/guider_multistar.h
${phd_src_dir}/guider_planetary.cpp
${phd_src_dir}/guider_planetary.h
${phd_src_dir}/guider.cpp
${phd_src_dir}/guider.h
${phd_src_dir}/guiders.h
Expand Down Expand Up @@ -427,6 +429,8 @@ set(phd2_SRC
${phd_src_dir}/phdupdate.h
${phd_src_dir}/pierflip_tool.cpp
${phd_src_dir}/pierflip_tool.h
${phd_src_dir}/planetary_tool.cpp
${phd_src_dir}/planetary_tool.h
${phd_src_dir}/polardrift_tool.h
${phd_src_dir}/polardrift_toolwin.h
${phd_src_dir}/polardrift_toolwin.cpp
Expand Down
3 changes: 3 additions & 0 deletions camera.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -681,6 +681,9 @@ bool GuideCamera::SetCameraGain(int cameraGain)

pConfig->Profile.SetInt("/camera/gain", GuideCameraGain);

if (pFrame)
pFrame->UpdateCameraSettings();

return bError;
}

Expand Down
6 changes: 6 additions & 0 deletions gear_dialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1093,6 +1093,9 @@ bool GearDialog::DoConnectCamera(bool autoReconnecting)
throw THROW_INFO("DoConnectCamera: connect failed");
}

// Notify planetary module of camera connect
pFrame->pGuider->m_Planet.NotifyCameraConnect(true);

// update camera pixel size from the driver, cam must be connected for reliable results
double prevPixelSize = m_pCamera->GetProfilePixelSize();
double pixelSize;
Expand Down Expand Up @@ -1250,6 +1253,9 @@ void GearDialog::OnButtonDisconnectCamera(wxCommandEvent& event)

m_pCamera->Disconnect();

// Notify planetary module of camera disconnect
pFrame->pGuider->m_Planet.NotifyCameraConnect(false);

if (m_pScope && m_pScope->RequiresCamera() && m_pScope->IsConnected())
{
Debug.Write("gear_dialog: scope requires camera so disconnecting scope\n");
Expand Down
5 changes: 5 additions & 0 deletions guider.h
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,8 @@
#ifndef GUIDER_H_INCLUDED
#define GUIDER_H_INCLUDED

#include "guider_planetary.h"

enum GUIDER_STATE
{
STATE_UNINITIALIZED = 0,
Expand Down Expand Up @@ -279,6 +281,9 @@ class Guider : public wxWindow
void SetAutoSelDownsample(unsigned int val);
unsigned int GetAutoSelDownsample() const;

// Planetary disk detection parameters
GuiderPlanet m_Planet;

// virtual functions -- these CAN be overridden by a subclass, which should
// consider whether they need to call the base class functions as part of
// their operation
Expand Down
Loading

0 comments on commit 43df98b

Please sign in to comment.