Skip to content

Commit

Permalink
Add MosaicCamera README
Browse files Browse the repository at this point in the history
  • Loading branch information
jmeyers314 committed Dec 12, 2024
1 parent 22aea40 commit 79b3c2d
Show file tree
Hide file tree
Showing 4 changed files with 70 additions and 4 deletions.
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.
2 changes: 0 additions & 2 deletions plugins/MosaicCamera/src/MosaicTcpServer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ void MosaicTcpServer::processClientData(QTcpSocket *client)
QByteArray data = client->readAll();
QString message(data);

// Parse RA, Dec, and rotation
QStringList params = message.split(',');
if (params.size() == 4) {
bool ok1, ok2, ok3;
Expand All @@ -41,7 +40,6 @@ void MosaicTcpServer::processClientData(QTcpSocket *client)
double rot = params[3].toDouble(&ok3);

if (ok1 && ok2 && ok3) {
// Emit the parsed values to be processed elsewhere
emit newValuesReceived(name, ra, dec, rot);
}
}
Expand Down
2 changes: 0 additions & 2 deletions plugins/MosaicCamera/src/gui/MosaicCameraDialog.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ class Ui_mosaicCameraDialog;
class QTimer;
class MosaicCamera;

//! @ingroup mosaicCamera
class MosaicCameraDialog : public StelDialog
{
Q_OBJECT
Expand All @@ -44,7 +43,6 @@ class MosaicCameraDialog : public StelDialog
QString getCurrentCameraName() const;

protected:
//! Initialize the dialog widgets and connect the signals/slots
void createDialogContent() override;

public slots:
Expand Down

0 comments on commit 79b3c2d

Please sign in to comment.