1
0
mirror of https://github.com/f4exb/sdrangel.git synced 2024-11-29 19:28:47 -05:00
sdrangel/plugins/feature/skymap
Daniele Forsi 0ae44663e1 Fix memleaks found with AddressSanitizer/LeakSanitizer
Found with:
ASAN_OPTIONS="detect_odr_violation=1,strip_path_prefix=$(pwd)/" build/sdrangel

Fixes:
Direct leak of 8 byte(s) in 1 object(s) allocated from:
    #0 0x7fabe9cf46b8 in operator new(unsigned long) ../../../../src/libsanitizer/asan/asan_new_delete.cpp:95
    #1 0x7faba9afa508 in WebServer::addSubstitution(QString, QString, QString) sdrangel/plugins/feature/skymap/webserver.cpp:83
    #2 0x7faba9b11591 in SkyMapGUI::SkyMapGUI(PluginAPI*, FeatureUISet*, Feature*, QWidget*) sdrangel/plugins/feature/skymap/skymapgui.cpp:224
    #3 0x7faba9b0f0a0 in SkyMapGUI::create(PluginAPI*, FeatureUISet*, Feature*) sdrangel/plugins/feature/skymap/skymapgui.cpp:44
    #4 0x7faba9af70e9 in SkyMapPlugin::createFeatureGUI(FeatureUISet*, Feature*) const sdrangel/plugins/feature/skymap/skymapplugin.cpp:72
    #5 0x7fabe920938b in MainWindow::featureAddClicked(Workspace*, int) sdrangel/sdrgui/mainwindow.cpp:2888
    #6 0x7fabe9224621 in QtPrivate::FunctorCall<QtPrivate::IndexesList<0, 1>, QtPrivate::List<Workspace*, int>, void, void (MainWindow::*)(Workspace*, int)>::call(void (MainWindow::*)(Workspace*, int), MainWindow*, void**) /usr/include/x86_64-linux-gnu/qt5/QtCore/qobjectdefs_impl.h:152
    #7 0x7fabe921feed in void QtPrivate::FunctionPointer<void (MainWindow::*)(Workspace*, int)>::call<QtPrivate::List<Workspace*, int>, void>(void (MainWindow::*)(Workspace*, int), MainWindow*, void**) /usr/include/x86_64-linux-gnu/qt5/QtCore/qobjectdefs_impl.h:185
    #8 0x7fabe921d376 in QtPrivate::QSlotObject<void (MainWindow::*)(Workspace*, int), QtPrivate::List<Workspace*, int>, void>::impl(int, QtPrivate::QSlotObjectBase*, QObject*, void**, bool*) /usr/include/x86_64-linux-gnu/qt5/QtCore/qobjectdefs_impl.h:418
    #9 0x7fabe43062b1  (/lib/x86_64-linux-gnu/libQt5Core.so.5+0x3062b1) (BuildId: ed2abb344a128279a866aa6c4a79f3fa5c87c59e)
    #10 0x7fabe91d5ca4 in Workspace::addFeature(Workspace*, int) build-sdrangel-Desktop_qt5-Debug/sdrgui/sdrgui_autogen/DMHXEJ42XS/moc_workspace.cpp:393
    #11 0x7fabe950c6a2 in Workspace::addFeatureEmitted(int) sdrangel/sdrgui/gui/workspace.cpp:413
    #12 0x7fabe95245bb in QtPrivate::FunctorCall<QtPrivate::IndexesList<0>, QtPrivate::List<int>, void, void (Workspace::*)(int)>::call(void (Workspace::*)(int), Workspace*, void**) /usr/include/x86_64-linux-gnu/qt5/QtCore/qobjectdefs_impl.h:152
    #13 0x7fabe951fb83 in void QtPrivate::FunctionPointer<void (Workspace::*)(int)>::call<QtPrivate::List<int>, void>(void (Workspace::*)(int), Workspace*, void**) /usr/include/x86_64-linux-gnu/qt5/QtCore/qobjectdefs_impl.h:185
    #14 0x7fabe951cc86 in QtPrivate::QSlotObject<void (Workspace::*)(int), QtPrivate::List<int>, void>::impl(int, QtPrivate::QSlotObjectBase*, QObject*, void**, bool*) /usr/include/x86_64-linux-gnu/qt5/QtCore/qobjectdefs_impl.h:418
    #15 0x7fabe43062b1  (/lib/x86_64-linux-gnu/libQt5Core.so.5+0x3062b1) (BuildId: ed2abb344a128279a866aa6c4a79f3fa5c87c59e)
    #16 0x7fabe91c3c77 in FeatureAddDialog::addFeature(int) build-sdrangel-Desktop_qt5-Debug/sdrgui/sdrgui_autogen/DMHXEJ42XS/moc_featureadddialog.cpp:141
    #17 0x7fabe92d0d79 in FeatureAddDialog::apply(QAbstractButton*) sdrangel/sdrgui/gui/featureadddialog.cpp:53
    #18 0x7fabe91c380e in FeatureAddDialog::qt_static_metacall(QObject*, QMetaObject::Call, int, void**) build-sdrangel-Desktop_qt5-Debug/sdrgui/sdrgui_autogen/DMHXEJ42XS/moc_featureadddialog.cpp:82
    #19 0x7fabe4305fcc  (/lib/x86_64-linux-gnu/libQt5Core.so.5+0x305fcc) (BuildId: ed2abb344a128279a866aa6c4a79f3fa5c87c59e)
    #20 0x7fabe51029b2 in QDialogButtonBox::clicked(QAbstractButton*) (/lib/x86_64-linux-gnu/libQt5Widgets.so.5+0x3029b2) (BuildId: dfefd27f084c0dd066215fc79825fceae604f481)

and more
2024-05-19 19:44:45 +02:00
..
html Add AvailableChannelOrFeatureHandler for handling lists of channels, features and message pipes to them. 2024-02-16 16:31:12 +00:00
icons Add Sky Map feature plugin. 2024-02-14 13:20:33 +00:00
CMakeLists.txt SkyMap: Fix CORS and enabling caching. 2024-02-27 15:40:48 +00:00
icons.qrc Add Sky Map feature plugin. 2024-02-14 13:20:33 +00:00
readme.md Merge pull request #2091 from dforsi/fix/typos 2024-04-27 11:08:10 +02:00
skymap.cpp Fix bug that prevents settings changes updates via reverse API 2024-04-14 18:58:12 +02:00
skymap.h Add Sky Map feature plugin. 2024-02-14 13:20:33 +00:00
skymap.qrc Add Sky Map feature plugin. 2024-02-14 13:20:33 +00:00
skymapgui.cpp SkyMap: Add Moon map. 2024-04-04 15:20:03 +01:00
skymapgui.h SkyMap: Handle find requests, even if map not ready. 2024-03-28 15:29:28 +00:00
skymapgui.ui SkyMap: Add Moon map. 2024-04-04 15:20:03 +01:00
skymapplugin.cpp Updated versions and changelogs 2024-04-14 11:41:00 +02:00
skymapplugin.h Add Sky Map feature plugin. 2024-02-14 13:20:33 +00:00
skymapsettings.cpp Remove unused includes and use more direct includes 2024-04-11 23:31:34 +02:00
skymapsettings.h Fix Qt6 build 2024-04-14 21:33:57 +01:00
skymapsettingsdialog.cpp Add Sky Map feature plugin. 2024-02-14 13:20:33 +00:00
skymapsettingsdialog.h Add Sky Map feature plugin. 2024-02-14 13:20:33 +00:00
skymapsettingsdialog.ui Add Sky Map feature plugin. 2024-02-14 13:20:33 +00:00
skymapwebapiadapter.cpp Add Sky Map feature plugin. 2024-02-14 13:20:33 +00:00
skymapwebapiadapter.h Add Sky Map feature plugin. 2024-02-14 13:20:33 +00:00
webinterface.cpp Add Sky Map feature plugin. 2024-02-14 13:20:33 +00:00
webinterface.h Add Sky Map feature plugin. 2024-02-14 13:20:33 +00:00
webserver.cpp Fix memleaks found with AddressSanitizer/LeakSanitizer 2024-05-19 19:44:45 +02:00
webserver.h Fix memleaks found with AddressSanitizer/LeakSanitizer 2024-05-19 19:44:45 +02:00
websocketserver.cpp Add Sky Map feature plugin. 2024-02-14 13:20:33 +00:00
websocketserver.h Add Sky Map feature plugin. 2024-02-14 13:20:33 +00:00
webview.cpp Fix compiler warnings. 2024-02-14 13:58:44 +00:00
webview.h Remove unused includes and use more direct includes 2024-04-20 19:10:18 +02:00
wtml.cpp SkyMap: Fix CORS and enabling caching. 2024-02-27 15:40:48 +00:00
wtml.h SkyMap: Fix CORS and enabling caching. 2024-02-27 15:40:48 +00:00

Sky Map Feature Plugin

Introduction

The Sky Map Feature provides visualization of the sky in multiple wavelengths (radio, IR, optical, UV, X-Ray, gamma). Multiple Sky Maps are supported, including the World Wide Telescope, ESASky and Aladin Lite.

The Rotator Controller and Star Tracker plugins can track the position viewed in the Sky Map. The Sky Map can also be set to track coordinates from the Star Tracker, Satellite Tracker, Rotator Controller or Map.

Sky Map feature WWT

With the ESASky map, a host of astronomical data is available from JWST, Hubble, Gaia, Herschel and others, including images, spectra and publications:

Sky Map feature ESASky

Additionally, a map of the Moon can be viewed in 2D or 3D, that supports a variety of data layers from various Lunar missions, such as LRO (Lunar Reconnaissance Orbiter).

Moon map

Interface

Sky Map feature plugin GUI

1: Find

Enter an astronomical object name and press enter to centre the sky map on that object.

You can also enter J2000 RA and Dec coordinates, in either HMS/DMS or decimal:

  • 12 05 12.23 +17 06 21.0
  • 12 05 12 17 06 21
  • 12:05:12.23 -17:06:21.20
  • 12h05m12.23s +17d06m21.10s
  • 107.1324 -34.233

Note that the supported object names depend on the chosen map (2).

2: Map Type

Allows you to select the sky map:

  • WWT - World Wide Telescope
  • ESASky
  • Aladin
  • Moon - Map of the Moon

Each map provides different features, image and data sets.

3: Background Image Set

For WWT and Aladin, this sets the background image set the sky map will display. For ESASky, this must be set within the ESASky GUI (using the Manage Skies button), as this can use multiple image sets.

Image sets are available for a variety of wavelengths (radio, IR, optical, UV, X-Ray, gamma) from a number of different surveys.

4: Projection

For World Wide Telescope:

  • Sky - Views the sky from a position on Earth,
  • Solar System - Views the Solar System, with the ability to show orbits,
  • Planet - Views one of the planets or major moons.

For Aladin:

This option is not available for ESASky, which is currently fixed to orthographic.

See List of map projections.

5: Display Names

For WWT, when checked, displays names of constellations and Ecliptic text (when the constellations and Ecliptic are visible).

6: Display Constellations

For WWT, this option enables the display of constellations. How the constellations are drawn can be customised in the Display Settings dialog (12).

7: Display grid

When checked, displays a coordinate grid.

For WWT, Ecliptic, Alt/Az, Equatorial and Galactic grids can be displayed. These can be selected in the Display Settings dialog (12).

For ESASky and Aladin, the grid will be Equatorial or Galactic, depending on the coordinate mode selected.

8: Display reticle

When checked, displays a reticle (cross hair) at the centre of the view. Coordinates for the reticle are displayed in the status bar in the bottom of the window.

9: Display antenna field-of-view

When checked, displays the antenna field-of-view. The antenna beamwidth can be set in the Display Settings dialog (12) or from a Star Tracker source (11).

10: Track

When checked, the centre of view will track the coordinates received from the selected Source plugin (11).

11: Source

Select a Star Tracker, Rotator Controller, Satellite Tracker or Map plugin to read viewing coordinates from.

  • When a Star Tracker is selected, target RA/Dec, observation position, antenna beamwidth and date/time will be read from the selected plugin.
  • For other plugin types, Alt/El will be read and other parameters are taken from the the Display Settings dialog (12).

12: Display settings

When clicked, opens the Display Settings dialog. The Display Settings dialog allows the user to set:

  • Observation location (latitude and longitude in degrees).
  • Antenna beamwidth in degrees.
  • Settings for WWT, such as how the constellations are drawn, what grids are displayed and how the Solar System view appears.

Sky Map Controls

  • Click and drag using the left mouse button to rotate through right ascension or declination.
  • Use the mouse wheel to zoom in and out.
  • In WWT, right click to display information about the nearest astronomical object. The object will be circled and a popup information window will appear with links to relevant astronomical databases (ADS, SIMBAD, NED, VizieR). The popup window can be moved by left clicking and dragging it.
  • In ESASky, right click to display a popup window, with links to various astronomical databases (SIMBAD, NED, VizieR) for the corresponding coordinates.
  • In Aladin, right click to display a popup menu. Use the "What is this?" menu to display a window with a link to the CDS astronomical database.

ESASky and Aladin are able to overlay catalog data:

  • In ESASky, zoom in to the area of interest, then press the "Explore catalog data for this region" button. A window will appear showing available catalogs. Left click and boxes will be overlaid on the map for each catalog entry. The data is also displayed in tabular form. You can left click on a box to view its data in the table.
  • In Aladin, zoom in to the area of interest, then press the "Manage layers" button. In the popup window, select one or more of the available catalogs, or press Add catalogue to add a new one. Boxes will be overlaid on the map for each catalog entry. Left click on a box to display the data for it in tabular form.

Attribution

WWT is from NumFOCUS.

ESASky is from ESAC | ESA.

Aladin Sky Atlas is from Centre de Données astronomiques de Strasbourg | CDS.

Moon map is from Applied Coherent Technology | ACT.

Constellation icons created by Freepik - https://www.flaticon.com

API

Full details of the API can be found in the Swagger documentation. Here is a quick example of how to centre the sky map on an object from the command line:

curl -X POST "http://127.0.0.1:8091/sdrangel/featureset/feature/0/actions" -d '{"featureType": "SkyMap",  "SkyMapActions": { "find": "polaris" }}'

And to centre the sky map at a particular RA and dec (Not for WWT):

curl -X POST "http://127.0.0.1:8091/sdrangel/featureset/feature/0/actions" -d '{"featureType": "SkyMap", "SkyMapActions": { "find": "18 36 56 +38 47 01" }}'