COMPASS  5.0.0
End-to-end AO simulation tool using GPU acceleration
sutra_roket.h
Go to the documentation of this file.
1 // -----------------------------------------------------------------------------
2 // This file is part of COMPASS <https://anr-compass.github.io/compass/>
3 //
4 // Copyright (C) 2011-2019 COMPASS Team <https://github.com/ANR-COMPASS>
5 // All rights reserved.
6 // Distributed under GNU - LGPL
7 //
8 // COMPASS is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser
9 // General Public License as published by the Free Software Foundation, either version 3 of the License,
10 // or any later version.
11 //
12 // COMPASS: End-to-end AO simulation tool using GPU acceleration
13 // The COMPASS platform was designed to meet the need of high-performance for the simulation of AO systems.
14 //
15 // The final product includes a software package for simulating all the critical subcomponents of AO,
16 // particularly in the context of the ELT and a real-time core based on several control approaches,
17 // with performances consistent with its integration into an instrument. Taking advantage of the specific
18 // hardware architecture of the GPU, the COMPASS tool allows to achieve adequate execution speeds to
19 // conduct large simulation campaigns called to the ELT.
20 //
21 // The COMPASS platform can be used to carry a wide variety of simulations to both testspecific components
22 // of AO of the E-ELT (such as wavefront analysis device with a pyramid or elongated Laser star), and
23 // various systems configurations such as multi-conjugate AO.
24 //
25 // COMPASS is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the
26 // implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
27 // See the GNU Lesser General Public License for more details.
28 //
29 // You should have received a copy of the GNU Lesser General Public License along with COMPASS.
30 // If not, see <https://www.gnu.org/licenses/lgpl-3.0.txt>.
31 // -----------------------------------------------------------------------------
32 
41 
42 #ifndef _SUTRA_ROKET_H_
43 #define _SUTRA_ROKET_H_
44 
45 #include <carma.h>
46 #include <carma_obj.h>
47 #include <sutra_atmos.h>
48 #include <sutra_rtc.h>
49 #include <sutra_sensors.h>
50 #include <sutra_target.h>
51 #include <sutra_telescope.h>
52 #include <sutra_utils.h>
53 
54 class SutraRoket {
55  public:
57  int device;
58  float gain; // Loop gain
59  int nfilt; // Number of filtered modes
60  int nactus; // number of actuators
61  int nmodes; // number of modes
62  int iterk; // current iteration number
63  int niter;
64  int loopcontroller; // index of the loop controller
65  int geocontroller; // index of the geo controller
66  int nslopes;
67  // sutra objects to supervise
76 
77  // Projection matrices
80 
81  // Error contributors buffers
88  float fitting;
89 
90  // Residual error buffers
94  // Command loop backup
96  // Target screen backup
98  // Additional buffers
103  // Loop filter matrix
105  // R*D matrix
107  // PSF ortho
109  // Loop output covariance matrices
112 
113  public:
117  int geocontroller, int nactus, int nmodes, int nfilt, int niter,
118  float *Btt, float *P, float *gRD, float *RD);
120 
125  CarmaObj<float> *d_idata2, float gain, int k);
126 };
127 
128 int separate_modes(float *modes, float *filtmodes, int nmodes, int nfilt,
129  CarmaDevice *device);
130 
131 #endif
SutraRoket::current_context
CarmaContext * current_context
Definition: sutra_roket.h:56
SutraTarget
this class provides the target features to COMPASS
Definition: sutra_target.h:54
SutraRoket::fitting
float fitting
Definition: sutra_roket.h:88
SutraRoket::dms
SutraDms * dms
Definition: sutra_roket.h:73
SutraRoket::nactus
int nactus
Definition: sutra_roket.h:60
CarmaDevice
Definition: carma_context.h:57
SutraRoket::d_bandwidth
CarmaObj< float > * d_bandwidth
Definition: sutra_roket.h:87
SutraRoket::~SutraRoket
~SutraRoket()
SutraRoket::compute_breakdown
int compute_breakdown()
sutra_target.h
SutraRoket::d_Btt
CarmaObj< float > * d_Btt
Definition: sutra_roket.h:79
SutraRoket::d_err1
CarmaObj< float > * d_err1
Definition: sutra_roket.h:92
SutraRoket::d_tomo
CarmaObj< float > * d_tomo
Definition: sutra_roket.h:84
SutraRoket::d_modes
CarmaObj< float > * d_modes
Definition: sutra_roket.h:100
SutraRoket::atm
SutraAtmos * atm
Definition: sutra_roket.h:72
SutraRoket::sensors
SutraSensors * sensors
Definition: sutra_roket.h:69
SutraDms
Definition: sutra_dm.h:164
SutraRoket::d_psfortho
CarmaObj< float > * d_psfortho
Definition: sutra_roket.h:108
SutraRoket::d_commanded
CarmaObj< float > * d_commanded
Definition: sutra_roket.h:99
sutra_telescope.h
sutra_rtc.h
SutraRoket::loopcontroller
int loopcontroller
Definition: sutra_roket.h:64
SutraRoket::d_P
CarmaObj< float > * d_P
Definition: sutra_roket.h:78
SutraRoket::gain
float gain
Definition: sutra_roket.h:58
SutraRoket::nfilt
int nfilt
Definition: sutra_roket.h:59
SutraRoket::niter
int niter
Definition: sutra_roket.h:63
SutraAtmos
this class provides the atmos features to COMPASS
Definition: sutra_atmos.h:50
SutraRoket::device
int device
Definition: sutra_roket.h:57
SutraRoket::d_nonlinear
CarmaObj< float > * d_nonlinear
Definition: sutra_roket.h:83
SutraRoket::d_err2
CarmaObj< float > * d_err2
Definition: sutra_roket.h:93
SutraRoket::rtc
SutraRtc * rtc
Definition: sutra_roket.h:68
SutraRoket::d_bkup_com
CarmaObj< float > * d_bkup_com
Definition: sutra_roket.h:95
SutraRoket::geocontrol
sutra_controller_geo * geocontrol
Definition: sutra_roket.h:75
SutraRoket::d_bkup_screen
CarmaObj< float > * d_bkup_screen
Definition: sutra_roket.h:97
SutraRoket::d_fullErr
CarmaObj< float > * d_fullErr
Definition: sutra_roket.h:91
sutra_sensors.h
SutraRoket::d_filtmodes
CarmaObj< float > * d_filtmodes
Definition: sutra_roket.h:101
SutraRoket::d_gRD
CarmaObj< float > * d_gRD
Definition: sutra_roket.h:104
SutraRoket::nmodes
int nmodes
Definition: sutra_roket.h:61
SutraRoket::d_filtered
CarmaObj< float > * d_filtered
Definition: sutra_roket.h:85
SutraRoket::SutraRoket
SutraRoket(CarmaContext *context, int device, SutraRtc *rtc, SutraSensors *sensors, SutraTarget *target, SutraDms *dms, SutraTelescope *tel, SutraAtmos *atm, int loopcontroller, int geocontroller, int nactus, int nmodes, int nfilt, int niter, float *Btt, float *P, float *gRD, float *RD)
SutraRoket::restore_loop_state
int restore_loop_state()
SutraRoket::d_alias
CarmaObj< float > * d_alias
Definition: sutra_roket.h:86
SutraRoket::d_tmpdiff
CarmaObj< float > * d_tmpdiff
Definition: sutra_roket.h:102
SutraTelescope
this class provides the telescope features to COMPASS
Definition: sutra_telescope.h:53
SutraRoket
this class provides the roket features to COMPASS
Definition: sutra_roket.h:54
SutraRoket::d_covm
CarmaObj< float > * d_covm
Definition: sutra_roket.h:111
sutra_controller_ls
this class provides the controller_ls features to COMPASS
Definition: sutra_controller_ls.h:48
CarmaObj< float >
SutraRoket::loopcontrol
sutra_controller_ls * loopcontrol
Definition: sutra_roket.h:74
SutraRoket::geocontroller
int geocontroller
Definition: sutra_roket.h:65
carma_obj.h
sutra_atmos.h
CarmaContext
this class provides the context in which CarmaObj are created
Definition: carma_context.h:104
SutraRoket::nslopes
int nslopes
Definition: sutra_roket.h:66
separate_modes
int separate_modes(float *modes, float *filtmodes, int nmodes, int nfilt, CarmaDevice *device)
sutra_utils.h
SutraRoket::iterk
int iterk
Definition: sutra_roket.h:62
SutraRoket::d_RD
CarmaObj< float > * d_RD
Definition: sutra_roket.h:106
SutraSensors
this class provides the sensors features to COMPASS
Definition: sutra_sensors.h:59
SutraRtc
this class provides the rtc features to COMPASS
Definition: sutra_rtc.h:60
SutraRoket::target
SutraTarget * target
Definition: sutra_roket.h:70
SutraRoket::d_covv
CarmaObj< float > * d_covv
Definition: sutra_roket.h:110
sutra_controller_geo
this class provides the controller_geo features to COMPASS
Definition: sutra_controller_geo.h:48
SutraRoket::tel
SutraTelescope * tel
Definition: sutra_roket.h:71
SutraRoket::save_loop_state
int save_loop_state()
SutraRoket::d_noise
CarmaObj< float > * d_noise
Definition: sutra_roket.h:82
SutraRoket::apply_loop_filter
int apply_loop_filter(CarmaObj< float > *d_odata, CarmaObj< float > *d_idata1, CarmaObj< float > *d_idata2, float gain, int k)