@@ -1,2 +1,2 | |||||
1 | 3081d1f9bb20b2b64a192585337a292a9804e0c5 LFR_basic-parameters |
|
1 | 3081d1f9bb20b2b64a192585337a292a9804e0c5 LFR_basic-parameters | |
2 | 7053a75ef0a55a40e950a8302065856f3bd06a26 header/lfr_common_headers |
|
2 | f5b83fb540b1cfd5d87c68621fb53f238eb623ae header/lfr_common_headers |
@@ -1,3 +1,27 | |||||
|
1 | /*------------------------------------------------------------------------------ | |||
|
2 | -- Solar Orbiter's Low Frequency Receiver Flight Software (LFR FSW), | |||
|
3 | -- This file is a part of the LFR FSW | |||
|
4 | -- Copyright (C) 2012-2018, Plasma Physics Laboratory - CNRS | |||
|
5 | -- | |||
|
6 | -- This program is free software; you can redistribute it and/or modify | |||
|
7 | -- it under the terms of the GNU General Public License as published by | |||
|
8 | -- the Free Software Foundation; either version 2 of the License, or | |||
|
9 | -- (at your option) any later version. | |||
|
10 | -- | |||
|
11 | -- This program is distributed in the hope that it will be useful, | |||
|
12 | -- but WITHOUT ANY WARRANTY; without even the implied warranty of | |||
|
13 | -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |||
|
14 | -- GNU General Public License for more details. | |||
|
15 | -- | |||
|
16 | -- You should have received a copy of the GNU General Public License | |||
|
17 | -- along with this program; if not, write to the Free Software | |||
|
18 | -- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | |||
|
19 | -------------------------------------------------------------------------------*/ | |||
|
20 | /*-- Author : Paul Leroy | |||
|
21 | -- Contact : Alexis Jeandet | |||
|
22 | -- Mail : alexis.jeandet@lpp.polytechnique.fr | |||
|
23 | ----------------------------------------------------------------------------*/ | |||
|
24 | ||||
1 | #ifndef GRSPW_H_INCLUDED |
|
25 | #ifndef GRSPW_H_INCLUDED | |
2 | #define GRSPW_H_INCLUDED |
|
26 | #define GRSPW_H_INCLUDED | |
3 |
|
27 |
@@ -1,3 +1,26 | |||||
|
1 | /*------------------------------------------------------------------------------ | |||
|
2 | -- Solar Orbiter's Low Frequency Receiver Flight Software (LFR FSW), | |||
|
3 | -- This file is a part of the LFR FSW | |||
|
4 | -- Copyright (C) 2012-2018, Plasma Physics Laboratory - CNRS | |||
|
5 | -- | |||
|
6 | -- This program is free software; you can redistribute it and/or modify | |||
|
7 | -- it under the terms of the GNU General Public License as published by | |||
|
8 | -- the Free Software Foundation; either version 2 of the License, or | |||
|
9 | -- (at your option) any later version. | |||
|
10 | -- | |||
|
11 | -- This program is distributed in the hope that it will be useful, | |||
|
12 | -- but WITHOUT ANY WARRANTY; without even the implied warranty of | |||
|
13 | -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |||
|
14 | -- GNU General Public License for more details. | |||
|
15 | -- | |||
|
16 | -- You should have received a copy of the GNU General Public License | |||
|
17 | -- along with this program; if not, write to the Free Software | |||
|
18 | -- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | |||
|
19 | -------------------------------------------------------------------------------*/ | |||
|
20 | /*-- Author : Paul Leroy | |||
|
21 | -- Contact : Alexis Jeandet | |||
|
22 | -- Mail : alexis.jeandet@lpp.polytechnique.fr | |||
|
23 | ----------------------------------------------------------------------------*/ | |||
1 | /** Global variables of the LFR flight software. |
|
24 | /** Global variables of the LFR flight software. | |
2 | * |
|
25 | * | |
3 | * @file |
|
26 | * @file |
@@ -1,3 +1,27 | |||||
|
1 | /*------------------------------------------------------------------------------ | |||
|
2 | -- Solar Orbiter's Low Frequency Receiver Flight Software (LFR FSW), | |||
|
3 | -- This file is a part of the LFR FSW | |||
|
4 | -- Copyright (C) 2012-2018, Plasma Physics Laboratory - CNRS | |||
|
5 | -- | |||
|
6 | -- This program is free software; you can redistribute it and/or modify | |||
|
7 | -- it under the terms of the GNU General Public License as published by | |||
|
8 | -- the Free Software Foundation; either version 2 of the License, or | |||
|
9 | -- (at your option) any later version. | |||
|
10 | -- | |||
|
11 | -- This program is distributed in the hope that it will be useful, | |||
|
12 | -- but WITHOUT ANY WARRANTY; without even the implied warranty of | |||
|
13 | -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |||
|
14 | -- GNU General Public License for more details. | |||
|
15 | -- | |||
|
16 | -- You should have received a copy of the GNU General Public License | |||
|
17 | -- along with this program; if not, write to the Free Software | |||
|
18 | -- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | |||
|
19 | -------------------------------------------------------------------------------*/ | |||
|
20 | /*-- Author : Paul Leroy | |||
|
21 | -- Contact : Alexis Jeandet | |||
|
22 | -- Mail : alexis.jeandet@lpp.polytechnique.fr | |||
|
23 | ----------------------------------------------------------------------------*/ | |||
|
24 | ||||
1 | /** This is the RTEMS initialization module. |
|
25 | /** This is the RTEMS initialization module. | |
2 | * |
|
26 | * | |
3 | * @file |
|
27 | * @file | |
@@ -9,10 +33,6 | |||||
9 | * |
|
33 | * | |
10 | */ |
|
34 | */ | |
11 |
|
35 | |||
12 | //************************* |
|
|||
13 | // GPL reminder to be added |
|
|||
14 | //************************* |
|
|||
15 |
|
||||
16 | #include <rtems.h> |
|
36 | #include <rtems.h> | |
17 |
|
37 | |||
18 |
|
38 |
@@ -1,3 +1,27 | |||||
|
1 | /*------------------------------------------------------------------------------ | |||
|
2 | -- Solar Orbiter's Low Frequency Receiver Flight Software (LFR FSW), | |||
|
3 | -- This file is a part of the LFR FSW | |||
|
4 | -- Copyright (C) 2012-2018, Plasma Physics Laboratory - CNRS | |||
|
5 | -- | |||
|
6 | -- This program is free software; you can redistribute it and/or modify | |||
|
7 | -- it under the terms of the GNU General Public License as published by | |||
|
8 | -- the Free Software Foundation; either version 2 of the License, or | |||
|
9 | -- (at your option) any later version. | |||
|
10 | -- | |||
|
11 | -- This program is distributed in the hope that it will be useful, | |||
|
12 | -- but WITHOUT ANY WARRANTY; without even the implied warranty of | |||
|
13 | -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |||
|
14 | -- GNU General Public License for more details. | |||
|
15 | -- | |||
|
16 | -- You should have received a copy of the GNU General Public License | |||
|
17 | -- along with this program; if not, write to the Free Software | |||
|
18 | -- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | |||
|
19 | -------------------------------------------------------------------------------*/ | |||
|
20 | /*-- Author : Paul Leroy | |||
|
21 | -- Contact : Alexis Jeandet | |||
|
22 | -- Mail : alexis.jeandet@lpp.polytechnique.fr | |||
|
23 | ----------------------------------------------------------------------------*/ | |||
|
24 | ||||
1 | /** General usage functions and RTEMS tasks. |
|
25 | /** General usage functions and RTEMS tasks. | |
2 | * |
|
26 | * | |
3 | * @file |
|
27 | * @file | |
@@ -85,7 +109,7 void timer_set_clock_divider(unsigned ch | |||||
85 | gptimer_regs->timer[timer].reload = clock_divider; // base clock frequency is 1 MHz |
|
109 | gptimer_regs->timer[timer].reload = clock_divider; // base clock frequency is 1 MHz | |
86 | } |
|
110 | } | |
87 |
|
111 | |||
88 | // WATCHDOG |
|
112 | // WATCHDOG, this ISR should never be triggered. | |
89 |
|
113 | |||
90 | rtems_isr watchdog_isr( rtems_vector_number vector ) |
|
114 | rtems_isr watchdog_isr( rtems_vector_number vector ) | |
91 | { |
|
115 | { | |
@@ -183,8 +207,11 void set_apbuart_scaler_reload_register( | |||||
183 | BOOT_PRINTF1("OK *** apbuart port scaler reload register set to 0x%x\n", value) |
|
207 | BOOT_PRINTF1("OK *** apbuart port scaler reload register set to 0x%x\n", value) | |
184 | } |
|
208 | } | |
185 |
|
209 | |||
186 | //************ |
|
210 | /** | |
187 | // RTEMS TASKS |
|
211 | * @brief load_task starts and keeps the watchdog alive. | |
|
212 | * @param argument | |||
|
213 | * @return | |||
|
214 | */ | |||
188 |
|
215 | |||
189 | rtems_task load_task(rtems_task_argument argument) |
|
216 | rtems_task load_task(rtems_task_argument argument) | |
190 | { |
|
217 | { | |
@@ -233,6 +260,11 rtems_task load_task(rtems_task_argument | |||||
233 | } |
|
260 | } | |
234 | } |
|
261 | } | |
235 |
|
262 | |||
|
263 | /** | |||
|
264 | * @brief hous_task produces and sends HK each seconds | |||
|
265 | * @param argument | |||
|
266 | * @return | |||
|
267 | */ | |||
236 | rtems_task hous_task(rtems_task_argument argument) |
|
268 | rtems_task hous_task(rtems_task_argument argument) | |
237 | { |
|
269 | { | |
238 | rtems_status_code status; |
|
270 | rtems_status_code status; | |
@@ -347,6 +379,12 rtems_task hous_task(rtems_task_argument | |||||
347 | return; |
|
379 | return; | |
348 | } |
|
380 | } | |
349 |
|
381 | |||
|
382 | /** | |||
|
383 | * @brief filter is a Direct-Form-II filter implementation, mostly used to filter electric field for HK | |||
|
384 | * @param x, new sample | |||
|
385 | * @param ctx, filter context, used to store previous input and output samples | |||
|
386 | * @return a new filtered sample | |||
|
387 | */ | |||
350 | int filter( int x, filter_ctx* ctx ) |
|
388 | int filter( int x, filter_ctx* ctx ) | |
351 | { |
|
389 | { | |
352 | static const int b[NB_COEFFS][NB_COEFFS]={ {B00, B01, B02}, {B10, B11, B12}, {B20, B21, B22} }; |
|
390 | static const int b[NB_COEFFS][NB_COEFFS]={ {B00, B01, B02}, {B10, B11, B12}, {B20, B21, B22} }; | |
@@ -376,6 +414,11 int filter( int x, filter_ctx* ctx ) | |||||
376 | return x; |
|
414 | return x; | |
377 | } |
|
415 | } | |
378 |
|
416 | |||
|
417 | /** | |||
|
418 | * @brief avgv_task pruduces HK rate elctrical field from F3 data | |||
|
419 | * @param argument | |||
|
420 | * @return | |||
|
421 | */ | |||
379 | rtems_task avgv_task(rtems_task_argument argument) |
|
422 | rtems_task avgv_task(rtems_task_argument argument) | |
380 | { |
|
423 | { | |
381 | #define MOVING_AVERAGE 16 |
|
424 | #define MOVING_AVERAGE 16 | |
@@ -742,6 +785,15 void get_v_e1_e2_f3( unsigned char *spac | |||||
742 | spacecraft_potential[BYTE_5] = e2_ptr[1]; |
|
785 | spacecraft_potential[BYTE_5] = e2_ptr[1]; | |
743 | } |
|
786 | } | |
744 |
|
787 | |||
|
788 | /** | |||
|
789 | * @brief get_cpu_load, computes CPU load, CPU load average and CPU load max | |||
|
790 | * @param resource_statistics stores: | |||
|
791 | * - CPU load at index 0 | |||
|
792 | * - CPU load max at index 1 | |||
|
793 | * - CPU load average at index 2 | |||
|
794 | * | |||
|
795 | * The CPU load average is computed on the last 60 values with a simple moving average. | |||
|
796 | */ | |||
745 | void get_cpu_load( unsigned char *resource_statistics ) |
|
797 | void get_cpu_load( unsigned char *resource_statistics ) | |
746 | { |
|
798 | { | |
747 | #define LOAD_AVG_SIZE 60 |
|
799 | #define LOAD_AVG_SIZE 60 | |
@@ -753,12 +805,12 void get_cpu_load( unsigned char *resour | |||||
753 | cpu_load = lfr_rtems_cpu_usage_report(); |
|
805 | cpu_load = lfr_rtems_cpu_usage_report(); | |
754 |
|
806 | |||
755 | // HK_LFR_CPU_LOAD |
|
807 | // HK_LFR_CPU_LOAD | |
756 | resource_statistics[0] = cpu_load; |
|
808 | resource_statistics[BYTE_0] = cpu_load; | |
757 |
|
809 | |||
758 | // HK_LFR_CPU_LOAD_MAX |
|
810 | // HK_LFR_CPU_LOAD_MAX | |
759 | if (cpu_load > resource_statistics[1]) |
|
811 | if (cpu_load > resource_statistics[BYTE_1]) | |
760 | { |
|
812 | { | |
761 | resource_statistics[1] = cpu_load; |
|
813 | resource_statistics[BYTE_1] = cpu_load; | |
762 | } |
|
814 | } | |
763 |
|
815 | |||
764 | cpu_load_avg = cpu_load_avg - (unsigned int)cpu_load_hist[(int)old_avg_pos] + (unsigned int)cpu_load; |
|
816 | cpu_load_avg = cpu_load_avg - (unsigned int)cpu_load_hist[(int)old_avg_pos] + (unsigned int)cpu_load; | |
@@ -858,6 +910,7 void increment_hk_counter( unsigned char | |||||
858 | *counter = *counter + delta; |
|
910 | *counter = *counter + delta; | |
859 | } |
|
911 | } | |
860 |
|
912 | |||
|
913 | // Low severity error counters update | |||
861 | void hk_lfr_le_update( void ) |
|
914 | void hk_lfr_le_update( void ) | |
862 | { |
|
915 | { | |
863 | static hk_lfr_le_t old_hk_lfr_le = {0}; |
|
916 | static hk_lfr_le_t old_hk_lfr_le = {0}; | |
@@ -928,6 +981,7 void hk_lfr_le_update( void ) | |||||
928 | housekeeping_packet.hk_lfr_le_cnt[1] = (unsigned char) (counter & BYTE1_MASK); |
|
981 | housekeeping_packet.hk_lfr_le_cnt[1] = (unsigned char) (counter & BYTE1_MASK); | |
929 | } |
|
982 | } | |
930 |
|
983 | |||
|
984 | // Medium severity error counters update | |||
931 | void hk_lfr_me_update( void ) |
|
985 | void hk_lfr_me_update( void ) | |
932 | { |
|
986 | { | |
933 | static hk_lfr_me_t old_hk_lfr_me = {0}; |
|
987 | static hk_lfr_me_t old_hk_lfr_me = {0}; | |
@@ -960,6 +1014,7 void hk_lfr_me_update( void ) | |||||
960 | housekeeping_packet.hk_lfr_me_cnt[1] = (unsigned char) (counter & BYTE1_MASK); |
|
1014 | housekeeping_packet.hk_lfr_me_cnt[1] = (unsigned char) (counter & BYTE1_MASK); | |
961 | } |
|
1015 | } | |
962 |
|
1016 | |||
|
1017 | // High severity error counters update | |||
963 | void hk_lfr_le_me_he_update() |
|
1018 | void hk_lfr_le_me_he_update() | |
964 | { |
|
1019 | { | |
965 |
|
1020 |
@@ -1,3 +1,27 | |||||
|
1 | /*------------------------------------------------------------------------------ | |||
|
2 | -- Solar Orbiter's Low Frequency Receiver Flight Software (LFR FSW), | |||
|
3 | -- This file is a part of the LFR FSW | |||
|
4 | -- Copyright (C) 2012-2018, Plasma Physics Laboratory - CNRS | |||
|
5 | -- | |||
|
6 | -- This program is free software; you can redistribute it and/or modify | |||
|
7 | -- it under the terms of the GNU General Public License as published by | |||
|
8 | -- the Free Software Foundation; either version 2 of the License, or | |||
|
9 | -- (at your option) any later version. | |||
|
10 | -- | |||
|
11 | -- This program is distributed in the hope that it will be useful, | |||
|
12 | -- but WITHOUT ANY WARRANTY; without even the implied warranty of | |||
|
13 | -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |||
|
14 | -- GNU General Public License for more details. | |||
|
15 | -- | |||
|
16 | -- You should have received a copy of the GNU General Public License | |||
|
17 | -- along with this program; if not, write to the Free Software | |||
|
18 | -- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | |||
|
19 | -------------------------------------------------------------------------------*/ | |||
|
20 | /*-- Author : Paul Leroy | |||
|
21 | -- Contact : Alexis Jeandet | |||
|
22 | -- Mail : alexis.jeandet@lpp.polytechnique.fr | |||
|
23 | ----------------------------------------------------------------------------*/ | |||
|
24 | ||||
1 | /** Functions related to the SpaceWire interface. |
|
25 | /** Functions related to the SpaceWire interface. | |
2 | * |
|
26 | * | |
3 | * @file |
|
27 | * @file |
@@ -1,3 +1,27 | |||||
|
1 | /*------------------------------------------------------------------------------ | |||
|
2 | -- Solar Orbiter's Low Frequency Receiver Flight Software (LFR FSW), | |||
|
3 | -- This file is a part of the LFR FSW | |||
|
4 | -- Copyright (C) 2012-2018, Plasma Physics Laboratory - CNRS | |||
|
5 | -- | |||
|
6 | -- This program is free software; you can redistribute it and/or modify | |||
|
7 | -- it under the terms of the GNU General Public License as published by | |||
|
8 | -- the Free Software Foundation; either version 2 of the License, or | |||
|
9 | -- (at your option) any later version. | |||
|
10 | -- | |||
|
11 | -- This program is distributed in the hope that it will be useful, | |||
|
12 | -- but WITHOUT ANY WARRANTY; without even the implied warranty of | |||
|
13 | -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |||
|
14 | -- GNU General Public License for more details. | |||
|
15 | -- | |||
|
16 | -- You should have received a copy of the GNU General Public License | |||
|
17 | -- along with this program; if not, write to the Free Software | |||
|
18 | -- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | |||
|
19 | -------------------------------------------------------------------------------*/ | |||
|
20 | /*-- Author : Paul Leroy | |||
|
21 | -- Contact : Alexis Jeandet | |||
|
22 | -- Mail : alexis.jeandet@lpp.polytechnique.fr | |||
|
23 | ----------------------------------------------------------------------------*/ | |||
|
24 | ||||
1 | /** Functions related to data processing. |
|
25 | /** Functions related to data processing. | |
2 | * |
|
26 | * | |
3 | * @file |
|
27 | * @file |
@@ -1,3 +1,27 | |||||
|
1 | /*------------------------------------------------------------------------------ | |||
|
2 | -- Solar Orbiter's Low Frequency Receiver Flight Software (LFR FSW), | |||
|
3 | -- This file is a part of the LFR FSW | |||
|
4 | -- Copyright (C) 2012-2018, Plasma Physics Laboratory - CNRS | |||
|
5 | -- | |||
|
6 | -- This program is free software; you can redistribute it and/or modify | |||
|
7 | -- it under the terms of the GNU General Public License as published by | |||
|
8 | -- the Free Software Foundation; either version 2 of the License, or | |||
|
9 | -- (at your option) any later version. | |||
|
10 | -- | |||
|
11 | -- This program is distributed in the hope that it will be useful, | |||
|
12 | -- but WITHOUT ANY WARRANTY; without even the implied warranty of | |||
|
13 | -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |||
|
14 | -- GNU General Public License for more details. | |||
|
15 | -- | |||
|
16 | -- You should have received a copy of the GNU General Public License | |||
|
17 | -- along with this program; if not, write to the Free Software | |||
|
18 | -- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | |||
|
19 | -------------------------------------------------------------------------------*/ | |||
|
20 | /*-- Author : Paul Leroy | |||
|
21 | -- Contact : Alexis Jeandet | |||
|
22 | -- Mail : alexis.jeandet@lpp.polytechnique.fr | |||
|
23 | ----------------------------------------------------------------------------*/ | |||
|
24 | ||||
1 | /** Functions related to data processing. |
|
25 | /** Functions related to data processing. | |
2 | * |
|
26 | * | |
3 | * @file |
|
27 | * @file |
@@ -1,3 +1,27 | |||||
|
1 | /*------------------------------------------------------------------------------ | |||
|
2 | -- Solar Orbiter's Low Frequency Receiver Flight Software (LFR FSW), | |||
|
3 | -- This file is a part of the LFR FSW | |||
|
4 | -- Copyright (C) 2012-2018, Plasma Physics Laboratory - CNRS | |||
|
5 | -- | |||
|
6 | -- This program is free software; you can redistribute it and/or modify | |||
|
7 | -- it under the terms of the GNU General Public License as published by | |||
|
8 | -- the Free Software Foundation; either version 2 of the License, or | |||
|
9 | -- (at your option) any later version. | |||
|
10 | -- | |||
|
11 | -- This program is distributed in the hope that it will be useful, | |||
|
12 | -- but WITHOUT ANY WARRANTY; without even the implied warranty of | |||
|
13 | -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |||
|
14 | -- GNU General Public License for more details. | |||
|
15 | -- | |||
|
16 | -- You should have received a copy of the GNU General Public License | |||
|
17 | -- along with this program; if not, write to the Free Software | |||
|
18 | -- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | |||
|
19 | -------------------------------------------------------------------------------*/ | |||
|
20 | /*-- Author : Paul Leroy | |||
|
21 | -- Contact : Alexis Jeandet | |||
|
22 | -- Mail : alexis.jeandet@lpp.polytechnique.fr | |||
|
23 | ----------------------------------------------------------------------------*/ | |||
|
24 | ||||
1 | /** Functions related to data processing. |
|
25 | /** Functions related to data processing. | |
2 | * |
|
26 | * | |
3 | * @file |
|
27 | * @file |
@@ -1,3 +1,27 | |||||
|
1 | /*------------------------------------------------------------------------------ | |||
|
2 | -- Solar Orbiter's Low Frequency Receiver Flight Software (LFR FSW), | |||
|
3 | -- This file is a part of the LFR FSW | |||
|
4 | -- Copyright (C) 2012-2018, Plasma Physics Laboratory - CNRS | |||
|
5 | -- | |||
|
6 | -- This program is free software; you can redistribute it and/or modify | |||
|
7 | -- it under the terms of the GNU General Public License as published by | |||
|
8 | -- the Free Software Foundation; either version 2 of the License, or | |||
|
9 | -- (at your option) any later version. | |||
|
10 | -- | |||
|
11 | -- This program is distributed in the hope that it will be useful, | |||
|
12 | -- but WITHOUT ANY WARRANTY; without even the implied warranty of | |||
|
13 | -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |||
|
14 | -- GNU General Public License for more details. | |||
|
15 | -- | |||
|
16 | -- You should have received a copy of the GNU General Public License | |||
|
17 | -- along with this program; if not, write to the Free Software | |||
|
18 | -- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | |||
|
19 | -------------------------------------------------------------------------------*/ | |||
|
20 | /*-- Author : Paul Leroy | |||
|
21 | -- Contact : Alexis Jeandet | |||
|
22 | -- Mail : alexis.jeandet@lpp.polytechnique.fr | |||
|
23 | ----------------------------------------------------------------------------*/ | |||
|
24 | ||||
1 | /** Functions related to data processing. |
|
25 | /** Functions related to data processing. | |
2 | * |
|
26 | * | |
3 | * @file |
|
27 | * @file | |
@@ -583,6 +607,12 unsigned char getSID( rtems_event_set ev | |||||
583 | return sid; |
|
607 | return sid; | |
584 | } |
|
608 | } | |
585 |
|
609 | |||
|
610 | /** | |||
|
611 | * @brief extractReImVectors converts a given ASM component from interleaved to split representation | |||
|
612 | * @param inputASM | |||
|
613 | * @param outputASM | |||
|
614 | * @param asmComponent | |||
|
615 | */ | |||
586 | void extractReImVectors( float *inputASM, float *outputASM, unsigned int asmComponent ) |
|
616 | void extractReImVectors( float *inputASM, float *outputASM, unsigned int asmComponent ) | |
587 | { |
|
617 | { | |
588 | unsigned int i; |
|
618 | unsigned int i; | |
@@ -597,6 +627,12 void extractReImVectors( float *inputASM | |||||
597 | } |
|
627 | } | |
598 | } |
|
628 | } | |
599 |
|
629 | |||
|
630 | /** | |||
|
631 | * @brief copyReVectors copies real part of a given ASM from inputASM to outputASM | |||
|
632 | * @param inputASM | |||
|
633 | * @param outputASM | |||
|
634 | * @param asmComponent | |||
|
635 | */ | |||
600 | void copyReVectors( float *inputASM, float *outputASM, unsigned int asmComponent ) |
|
636 | void copyReVectors( float *inputASM, float *outputASM, unsigned int asmComponent ) | |
601 | { |
|
637 | { | |
602 | unsigned int i; |
|
638 | unsigned int i; | |
@@ -608,6 +644,13 void copyReVectors( float *inputASM, flo | |||||
608 | } |
|
644 | } | |
609 | } |
|
645 | } | |
610 |
|
646 | |||
|
647 | /** | |||
|
648 | * @brief ASM_patch, converts ASM from interleaved to split representation | |||
|
649 | * @param inputASM | |||
|
650 | * @param outputASM | |||
|
651 | * @note inputASM and outputASM must be different, in other words this function can't do in place convertion | |||
|
652 | * @see extractReImVectors | |||
|
653 | */ | |||
611 | void ASM_patch( float *inputASM, float *outputASM ) |
|
654 | void ASM_patch( float *inputASM, float *outputASM ) | |
612 | { |
|
655 | { | |
613 | extractReImVectors( inputASM, outputASM, ASM_COMP_B1B2); // b1b2 |
|
656 | extractReImVectors( inputASM, outputASM, ASM_COMP_B1B2); // b1b2 | |
@@ -718,6 +761,14 int getFBinMask( int index, unsigned cha | |||||
718 | return fbin; |
|
761 | return fbin; | |
719 | } |
|
762 | } | |
720 |
|
763 | |||
|
764 | /** | |||
|
765 | * @brief isPolluted returns MATRIX_IS_POLLUTED if there is any overlap between t0:t1 and tbad0:tbad1 ranges | |||
|
766 | * @param t0 Start acquisition time | |||
|
767 | * @param t1 End of acquisition time | |||
|
768 | * @param tbad0 Start time of poluting signal | |||
|
769 | * @param tbad1 End time of poluting signal | |||
|
770 | * @return | |||
|
771 | */ | |||
721 | unsigned char isPolluted( u_int64_t t0, u_int64_t t1, u_int64_t tbad0, u_int64_t tbad1 ) |
|
772 | unsigned char isPolluted( u_int64_t t0, u_int64_t t1, u_int64_t tbad0, u_int64_t tbad1 ) | |
722 | { |
|
773 | { | |
723 | unsigned char polluted; |
|
774 | unsigned char polluted; | |
@@ -735,6 +786,13 unsigned char isPolluted( u_int64_t t0, | |||||
735 | return polluted; |
|
786 | return polluted; | |
736 | } |
|
787 | } | |
737 |
|
788 | |||
|
789 | /** | |||
|
790 | * @brief acquisitionTimeIsValid checks if the given acquisition time is poluted by PAS | |||
|
791 | * @param coarseTime Coarse acquisition time of the given SM | |||
|
792 | * @param fineTime Fine acquisition time of the given ASM | |||
|
793 | * @param channel Frequency channel to check, will impact SM time footprint | |||
|
794 | * @return MATRIX_IS_POLLUTED if there is any time overlap between SM and PAS poluting signal | |||
|
795 | */ | |||
738 | unsigned char acquisitionTimeIsValid( unsigned int coarseTime, unsigned int fineTime, unsigned char channel) |
|
796 | unsigned char acquisitionTimeIsValid( unsigned int coarseTime, unsigned int fineTime, unsigned char channel) | |
739 | { |
|
797 | { | |
740 | u_int64_t t0; |
|
798 | u_int64_t t0; |
@@ -1,3 +1,26 | |||||
|
1 | /*------------------------------------------------------------------------------ | |||
|
2 | -- Solar Orbiter's Low Frequency Receiver Flight Software (LFR FSW), | |||
|
3 | -- This file is a part of the LFR FSW | |||
|
4 | -- Copyright (C) 2012-2018, Plasma Physics Laboratory - CNRS | |||
|
5 | -- | |||
|
6 | -- This program is free software; you can redistribute it and/or modify | |||
|
7 | -- it under the terms of the GNU General Public License as published by | |||
|
8 | -- the Free Software Foundation; either version 2 of the License, or | |||
|
9 | -- (at your option) any later version. | |||
|
10 | -- | |||
|
11 | -- This program is distributed in the hope that it will be useful, | |||
|
12 | -- but WITHOUT ANY WARRANTY; without even the implied warranty of | |||
|
13 | -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |||
|
14 | -- GNU General Public License for more details. | |||
|
15 | -- | |||
|
16 | -- You should have received a copy of the GNU General Public License | |||
|
17 | -- along with this program; if not, write to the Free Software | |||
|
18 | -- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | |||
|
19 | -------------------------------------------------------------------------------*/ | |||
|
20 | /*-- Author : Paul Leroy | |||
|
21 | -- Contact : Alexis Jeandet | |||
|
22 | -- Mail : alexis.jeandet@lpp.polytechnique.fr | |||
|
23 | ----------------------------------------------------------------------------*/ | |||
1 | /** Functions related to TeleCommand acceptance. |
|
24 | /** Functions related to TeleCommand acceptance. | |
2 | * |
|
25 | * | |
3 | * @file |
|
26 | * @file |
@@ -1,3 +1,26 | |||||
|
1 | /*------------------------------------------------------------------------------ | |||
|
2 | -- Solar Orbiter's Low Frequency Receiver Flight Software (LFR FSW), | |||
|
3 | -- This file is a part of the LFR FSW | |||
|
4 | -- Copyright (C) 2012-2018, Plasma Physics Laboratory - CNRS | |||
|
5 | -- | |||
|
6 | -- This program is free software; you can redistribute it and/or modify | |||
|
7 | -- it under the terms of the GNU General Public License as published by | |||
|
8 | -- the Free Software Foundation; either version 2 of the License, or | |||
|
9 | -- (at your option) any later version. | |||
|
10 | -- | |||
|
11 | -- This program is distributed in the hope that it will be useful, | |||
|
12 | -- but WITHOUT ANY WARRANTY; without even the implied warranty of | |||
|
13 | -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |||
|
14 | -- GNU General Public License for more details. | |||
|
15 | -- | |||
|
16 | -- You should have received a copy of the GNU General Public License | |||
|
17 | -- along with this program; if not, write to the Free Software | |||
|
18 | -- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | |||
|
19 | -------------------------------------------------------------------------------*/ | |||
|
20 | /*-- Author : Paul Leroy | |||
|
21 | -- Contact : Alexis Jeandet | |||
|
22 | -- Mail : alexis.jeandet@lpp.polytechnique.fr | |||
|
23 | ----------------------------------------------------------------------------*/ | |||
1 | /** Functions and tasks related to TeleCommand handling. |
|
24 | /** Functions and tasks related to TeleCommand handling. | |
2 | * |
|
25 | * | |
3 | * @file |
|
26 | * @file |
@@ -1,3 +1,27 | |||||
|
1 | /*------------------------------------------------------------------------------ | |||
|
2 | -- Solar Orbiter's Low Frequency Receiver Flight Software (LFR FSW), | |||
|
3 | -- This file is a part of the LFR FSW | |||
|
4 | -- Copyright (C) 2012-2018, Plasma Physics Laboratory - CNRS | |||
|
5 | -- | |||
|
6 | -- This program is free software; you can redistribute it and/or modify | |||
|
7 | -- it under the terms of the GNU General Public License as published by | |||
|
8 | -- the Free Software Foundation; either version 2 of the License, or | |||
|
9 | -- (at your option) any later version. | |||
|
10 | -- | |||
|
11 | -- This program is distributed in the hope that it will be useful, | |||
|
12 | -- but WITHOUT ANY WARRANTY; without even the implied warranty of | |||
|
13 | -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |||
|
14 | -- GNU General Public License for more details. | |||
|
15 | -- | |||
|
16 | -- You should have received a copy of the GNU General Public License | |||
|
17 | -- along with this program; if not, write to the Free Software | |||
|
18 | -- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | |||
|
19 | -------------------------------------------------------------------------------*/ | |||
|
20 | /*-- Author : Paul Leroy | |||
|
21 | -- Contact : Alexis Jeandet | |||
|
22 | -- Mail : alexis.jeandet@lpp.polytechnique.fr | |||
|
23 | ----------------------------------------------------------------------------*/ | |||
|
24 | ||||
1 | /** Functions to load and dump parameters in the LFR registers. |
|
25 | /** Functions to load and dump parameters in the LFR registers. | |
2 | * |
|
26 | * | |
3 | * @file |
|
27 | * @file |
@@ -1,3 +1,27 | |||||
|
1 | /*------------------------------------------------------------------------------ | |||
|
2 | -- Solar Orbiter's Low Frequency Receiver Flight Software (LFR FSW), | |||
|
3 | -- This file is a part of the LFR FSW | |||
|
4 | -- Copyright (C) 2012-2018, Plasma Physics Laboratory - CNRS | |||
|
5 | -- | |||
|
6 | -- This program is free software; you can redistribute it and/or modify | |||
|
7 | -- it under the terms of the GNU General Public License as published by | |||
|
8 | -- the Free Software Foundation; either version 2 of the License, or | |||
|
9 | -- (at your option) any later version. | |||
|
10 | -- | |||
|
11 | -- This program is distributed in the hope that it will be useful, | |||
|
12 | -- but WITHOUT ANY WARRANTY; without even the implied warranty of | |||
|
13 | -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |||
|
14 | -- GNU General Public License for more details. | |||
|
15 | -- | |||
|
16 | -- You should have received a copy of the GNU General Public License | |||
|
17 | -- along with this program; if not, write to the Free Software | |||
|
18 | -- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | |||
|
19 | -------------------------------------------------------------------------------*/ | |||
|
20 | /*-- Author : Paul Leroy | |||
|
21 | -- Contact : Alexis Jeandet | |||
|
22 | -- Mail : alexis.jeandet@lpp.polytechnique.fr | |||
|
23 | ----------------------------------------------------------------------------*/ | |||
|
24 | ||||
1 | /** Functions to send TM packets related to TC parsing and execution. |
|
25 | /** Functions to send TM packets related to TC parsing and execution. | |
2 | * |
|
26 | * | |
3 | * @file |
|
27 | * @file |
@@ -1,3 +1,27 | |||||
|
1 | /*------------------------------------------------------------------------------ | |||
|
2 | -- Solar Orbiter's Low Frequency Receiver Flight Software (LFR FSW), | |||
|
3 | -- This file is a part of the LFR FSW | |||
|
4 | -- Copyright (C) 2012-2018, Plasma Physics Laboratory - CNRS | |||
|
5 | -- | |||
|
6 | -- This program is free software; you can redistribute it and/or modify | |||
|
7 | -- it under the terms of the GNU General Public License as published by | |||
|
8 | -- the Free Software Foundation; either version 2 of the License, or | |||
|
9 | -- (at your option) any later version. | |||
|
10 | -- | |||
|
11 | -- This program is distributed in the hope that it will be useful, | |||
|
12 | -- but WITHOUT ANY WARRANTY; without even the implied warranty of | |||
|
13 | -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |||
|
14 | -- GNU General Public License for more details. | |||
|
15 | -- | |||
|
16 | -- You should have received a copy of the GNU General Public License | |||
|
17 | -- along with this program; if not, write to the Free Software | |||
|
18 | -- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | |||
|
19 | -------------------------------------------------------------------------------*/ | |||
|
20 | /*-- Author : Paul Leroy | |||
|
21 | -- Contact : Alexis Jeandet | |||
|
22 | -- Mail : alexis.jeandet@lpp.polytechnique.fr | |||
|
23 | ----------------------------------------------------------------------------*/ | |||
|
24 | ||||
1 | /** Functions and tasks related to waveform packet generation. |
|
25 | /** Functions and tasks related to waveform packet generation. | |
2 | * |
|
26 | * | |
3 | * @file |
|
27 | * @file |
@@ -1,3 +1,27 | |||||
|
1 | /*------------------------------------------------------------------------------ | |||
|
2 | -- Solar Orbiter's Low Frequency Receiver Flight Software (LFR FSW), | |||
|
3 | -- This file is a part of the LFR FSW | |||
|
4 | -- Copyright (C) 2012-2018, Plasma Physics Laboratory - CNRS | |||
|
5 | -- | |||
|
6 | -- This program is free software; you can redistribute it and/or modify | |||
|
7 | -- it under the terms of the GNU General Public License as published by | |||
|
8 | -- the Free Software Foundation; either version 2 of the License, or | |||
|
9 | -- (at your option) any later version. | |||
|
10 | -- | |||
|
11 | -- This program is distributed in the hope that it will be useful, | |||
|
12 | -- but WITHOUT ANY WARRANTY; without even the implied warranty of | |||
|
13 | -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |||
|
14 | -- GNU General Public License for more details. | |||
|
15 | -- | |||
|
16 | -- You should have received a copy of the GNU General Public License | |||
|
17 | -- along with this program; if not, write to the Free Software | |||
|
18 | -- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | |||
|
19 | -------------------------------------------------------------------------------*/ | |||
|
20 | /*-- Author : Paul Leroy | |||
|
21 | -- Contact : Alexis Jeandet | |||
|
22 | -- Mail : alexis.jeandet@lpp.polytechnique.fr | |||
|
23 | ----------------------------------------------------------------------------*/ | |||
|
24 | ||||
1 | #define NB_VALUES_PER_SM 25 |
|
25 | #define NB_VALUES_PER_SM 25 | |
2 | #define NB_BINS_PER_SM 128 |
|
26 | #define NB_BINS_PER_SM 128 | |
3 |
|
27 |
General Comments 0
You need to be logged in to leave comments.
Login now