Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Camera Mosaic plugin #4005

Open
wants to merge 33 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
0176716
Make MosaicCamera a separate plugin
jmeyers314 Nov 23, 2024
01e7267
Add MosaicCameraDialog
jmeyers314 Nov 24, 2024
9fab307
Add basic location spinboxes
jmeyers314 Nov 24, 2024
18d0321
connect spin boxes
jmeyers314 Nov 24, 2024
31b5ead
connect spinboxes to mosaic
jmeyers314 Nov 24, 2024
6496ec2
Initial TCP server for Mosaic Camera
jmeyers314 Nov 25, 2024
e2cdb5a
remove debug statements
jmeyers314 Nov 27, 2024
deacd23
Use RSP
jmeyers314 Dec 1, 2024
117c054
cleanup
jmeyers314 Dec 1, 2024
256b5dd
Use json for mosaic layout
jmeyers314 Dec 2, 2024
fd33777
Promote RA/DEC/RSP to AngleSpinBoxs
jmeyers314 Dec 2, 2024
d844f23
Add gui labels
jmeyers314 Dec 2, 2024
d1c45bb
Add json mosaics
jmeyers314 Dec 2, 2024
c1796d0
New Cameras
jmeyers314 Dec 2, 2024
28c70f9
Add Latiss
jmeyers314 Dec 2, 2024
2cccb50
Use HMS for RA
jmeyers314 Dec 2, 2024
97c9cb8
Add qrc
jmeyers314 Dec 3, 2024
a628ad5
clean up
jmeyers314 Dec 3, 2024
ac72f05
reorder tabs
jmeyers314 Dec 3, 2024
bf7206c
Don't need colorComment
jmeyers314 Dec 6, 2024
70e9e9b
Multiple Cameras
jmeyers314 Dec 7, 2024
0c40fc3
Use QListWidget
jmeyers314 Dec 8, 2024
af7c418
Use userDirectory for cameras
jmeyers314 Dec 9, 2024
a9bb0ec
Add MosaicCamera README
jmeyers314 Dec 11, 2024
c108048
Remember camera visibility
jmeyers314 Dec 12, 2024
58c1238
ui_MosaicCameraDialog -> ui_mosaicCameraDialog
jmeyers314 Dec 13, 2024
7284f1a
Update CMakeLists.txt for Qt5/6
jmeyers314 Dec 13, 2024
9628afe
Remove redundant blank line
jmeyers314 Dec 15, 2024
af544ea
Use space delimiter in mosaic TCP
jmeyers314 Dec 15, 2024
945cf2b
Add PROPERTYs to MosaicCamera
jmeyers314 Dec 17, 2024
ad41c9f
Remove MosaicCamera TCP server
jmeyers314 Dec 17, 2024
798b418
Remove MosaicCamera::updateMosaic
jmeyers314 Dec 17, 2024
70294f8
Start documentation
jmeyers314 Jan 23, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions BUILDING.md
Original file line number Diff line number Diff line change
Expand Up @@ -415,6 +415,7 @@ List of supported parameters (passed as `-DPARAMETER=VALUE`):
| USE_PLUGIN_LENSDISTORTIONESTIMATOR | bool | ON | Enable building the Lens Distortion Estimator plugin
| USE_PLUGIN_METEORSHOWERS | bool | ON | Enable building the Meteor Showers plugin
| USE_PLUGIN_MISSINGSTARS | bool | ON | Enable building the Missing Stars plugin
| USE_PLUGIN_MOSAICCAMERA | bool | OFF | Enable building the Mosaic Camera plugin
| USE_PLUGIN_NAVSTARS | bool | ON | Enable building the Navigational Stars plugin
| USE_PLUGIN_NOVAE | bool | ON | Enable building the Bright Novae plugin
| USE_PLUGIN_OBSERVABILITY | bool | ON | Enable building the Observability Analysis plugin
Expand Down
15 changes: 8 additions & 7 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -150,8 +150,8 @@ IF(${CMAKE_BUILD_TYPE} MATCHES "Debug")
APPEND_COVERAGE_COMPILER_FLAGS()
MESSAGE(STATUS "Found lcov ${LCOV_PATH} (enable coverage support)")
SETUP_TARGET_FOR_COVERAGE_LCOV(
NAME coverage
EXECUTABLE ctest -j ${PROCESSOR_COUNT}
NAME coverage
EXECUTABLE ctest -j ${PROCESSOR_COUNT}
DEPENDENCIES buildTests
)
ENDIF()
Expand All @@ -174,7 +174,7 @@ ELSE()
EXECUTE_PROCESS(COMMAND ${GIT_EXECUTABLE} describe --tags --abbrev=0 WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} TIMEOUT 30 OUTPUT_VARIABLE GIT_TAGS OUTPUT_STRIP_TRAILING_WHITESPACE ERROR_VARIABLE GIT_ERROR)
IF(GIT_REVISION)
# Let's use short hash in all cases
STRING(SUBSTRING ${GIT_REVISION} 0 7 REVISION)
STRING(SUBSTRING ${GIT_REVISION} 0 7 REVISION)
ADD_DEFINITIONS(-DGIT_REVISION="${REVISION}")
ADD_DEFINITIONS(-DGIT_BRANCH="${GIT_BRANCH}")
ENDIF()
Expand Down Expand Up @@ -371,7 +371,7 @@ IF("${CMAKE_CXX_COMPILER_ID}" MATCHES "Clang")
ENDIF()

# FreeBSD-specific compiler flags
# resolve bug for FreeBSD/amd64 and NVIDIA proprietary drivers
# resolve bug for FreeBSD/amd64 and NVIDIA proprietary drivers
IF(${CMAKE_SYSTEM_NAME} STREQUAL "FreeBSD")
# Use -pthread compilation option to properly link to threading library
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pthread -Wno-unused-local-typedefs")
Expand Down Expand Up @@ -544,6 +544,7 @@ ADD_PLUGIN(Calendars 1)
ADD_PLUGIN(Exoplanets 1)
ADD_PLUGIN(EquationOfTime 1)
ADD_PLUGIN(MeteorShowers 1)
ADD_PLUGIN(MosaicCamera 1)
ADD_PLUGIN(NavStars 1)
ADD_PLUGIN(Novae 1)
ADD_PLUGIN(Observability 1)
Expand Down Expand Up @@ -717,7 +718,7 @@ IF(ENABLE_SHOWMYSKY)
MESSAGE(STATUS "Will build ShowMySky library")
INCLUDE(GNUInstallDirs)
IF(APPLE)
INSTALL(TARGETS ShowMySky LIBRARY DESTINATION Frameworks)
INSTALL(TARGETS ShowMySky LIBRARY DESTINATION Frameworks)
ELSE()
INSTALL(TARGETS ShowMySky
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
Expand All @@ -737,7 +738,7 @@ IF(ENABLE_SHOWMYSKY)
GET_TARGET_PROPERTY(ShowMySky_LIBRARY
ShowMySky::ShowMySky LOCATION)
IF(EXISTS ${ShowMySky_LIBRARY})
MESSAGE(STATUS "Found ShowMySky library: ${ShowMySky_LIBRARY}")
MESSAGE(STATUS "Found ShowMySky library: ${ShowMySky_LIBRARY}")
ELSE()
MESSAGE(FATAL_ERROR "Could NOT found ShowMySky library")
ENDIF()
Expand Down Expand Up @@ -856,7 +857,7 @@ IF(UNIX AND NOT WIN32)
IF(APPLE)
SET(CMAKE_INSTALL_PREFIX "${PROJECT_BINARY_DIR}/Stellarium.app/Contents")
ELSE()
ADD_DEFINITIONS(-DINSTALL_DATADIR="${CMAKE_INSTALL_PREFIX}/${SDATALOC}")
ADD_DEFINITIONS(-DINSTALL_DATADIR="${CMAKE_INSTALL_PREFIX}/${SDATALOC}")
# Used in generating the documentation (doc/stellarium.pod.cmake):
SET(INSTALL_DATADIR "${CMAKE_INSTALL_PREFIX}/${SDATALOC}")
ENDIF()
Expand Down
14 changes: 14 additions & 0 deletions plugins/MosaicCamera/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# This is the cmake config file for the MosaicCamera
SET(MOSAICCAMERA_VERSION "0.0.0")
ADD_DEFINITIONS(-DBUILD_DYNAMIC_PLUGIN=0)
ADD_DEFINITIONS(-DMOSAICCAMERA_PLUGIN_VERSION="${MOSAICCAMERA_VERSION}")
ADD_DEFINITIONS(-DMOSAICCAMERA_PLUGIN_LICENSE="GNU GPLv2 or later")

ADD_SUBDIRECTORY( src )

IF(APPLE)
SET(CMAKE_INSTALL_PREFIX $ENV{HOME}/Library/Application\ Support/Stellarium)
ElSE(APPLE)
SET(CMAKE_INSTALL_PREFIX $ENV{HOME}/.stellarium)
ENDIF(APPLE)
INSTALL(FILES DESTINATION "modules/MosaicCamera")
340 changes: 340 additions & 0 deletions plugins/MosaicCamera/COPYING

Large diffs are not rendered by default.

2 changes: 2 additions & 0 deletions plugins/MosaicCamera/ChangeLog
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
0.0.0 [2024-12-10]
Created basic plugin
68 changes: 68 additions & 0 deletions plugins/MosaicCamera/README
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
Mosaic Camera Overlay Stellarium plugin
=======================================

Overlays mosaic camera sensor outlines on the Stellarium celestial sphere.

Available Cameras
=================

Built-in cameras include:
LSSTCam : https://www.lsst.org/about/camera
HSC : https://www.naoj.org/Projects/HSC/
DECam : https://www.darkenergysurvey.org/the-des-project/instrument/the-camera/
MegaPrime : https://www.cfht.hawaii.edu/Instruments/Imaging/Megacam/
Latiss : https://noirlab.edu/public/programs/vera-c-rubin-observatory/rubin-auxtel/

Camera sensors are specified via their corners, which are assumed to form spherical
polygons. The corners should be specified as gnomonic projections from the sphere to a
tangent plane in radians. Multiple groups of sensors can compose the same camera. For
example, LSSTCam has separate sensor groups for wavefront sensors, guider sensors, and
each of two types of science sensors.

Each camera is defined via a JSON file with the structure:

[
{
"name": "name-of-group-1",
"corners": [
[
[corner1_x, corner1_y],
[corner2_x, corner2_y],
...
], # sensor 1
[
...
], # sensor 2
...
]
"color": {
"value": [R, G, B, alpha]
}
},
{
"name": "name-of-group-2",
...
},
...
]

Cameras are loaded according to the order in

camera_order.json

which has the structure:
{
"order": [
"LSSTCam",
"DECam",
...
]
}


TCP Server
==========
The mosaic camera plugin starts a TCP server listening on port 5772. Messages can be
sent to the port in the format: "[name],[ra],[dec],[rot]" where [name] is the name of
one of the cameras, [ra] and [dec] indicate the camera boresight and [rot] the camera
rotation, all in degrees.
Loading