diff --git a/dox/doxy_stylesheet.css b/dox/doxy_stylesheet.css index 4f1ab91..e9d4f10 100644 --- a/dox/doxy_stylesheet.css +++ b/dox/doxy_stylesheet.css @@ -150,11 +150,11 @@ a.elRef { } a.code, a.code:visited, a.line, a.line:visited { - color: #4665A2; + color: #4665A2; } a.codeRef, a.codeRef:visited, a.lineRef, a.lineRef:visited { - color: #4665A2; + color: #4665A2; } /* @end */ @@ -321,7 +321,7 @@ p.formulaDsp { } img.formulaDsp { - + } img.formulaInl { @@ -379,20 +379,20 @@ span.charliteral { color: #008080 } -span.vhdldigit { - color: #ff00ff +span.vhdldigit { + color: #ff00ff } -span.vhdlchar { - color: #000000 +span.vhdlchar { + color: #000000 } -span.vhdlkeyword { - color: #700070 +span.vhdlkeyword { + color: #700070 } -span.vhdllogic { - color: #ff0000 +span.vhdllogic { + color: #ff0000 } blockquote { @@ -610,9 +610,9 @@ table.memberdecls { } .memdoc, dl.reflist dd { - border-bottom: 1px solid #A8B8D9; - border-left: 1px solid #A8B8D9; - border-right: 1px solid #A8B8D9; + border-bottom: 1px solid #A8B8D9; + border-left: 1px solid #A8B8D9; + border-right: 1px solid #A8B8D9; padding: 6px 10px 2px 10px; background-color: #FBFCFD; border-top-width: 0; @@ -664,18 +664,18 @@ dl.reflist dd { .params, .retval, .exception, .tparams { margin-left: 0px; padding-left: 0px; -} +} .params .paramname, .retval .paramname { font-weight: bold; vertical-align: top; } - + .params .paramtype { font-style: italic; vertical-align: top; -} - +} + .params .paramdir { font-family: "courier new",courier,monospace; vertical-align: top; @@ -931,8 +931,8 @@ table.fieldtable { .fieldtable td.fielddoc p:first-child { margin-top: 0px; -} - +} + .fieldtable td.fielddoc p:last-child { margin-bottom: 2px; } @@ -1007,7 +1007,7 @@ table.fieldtable { color: #283A5D; font-family: 'Lucida Grande',Geneva,Helvetica,Arial,sans-serif; text-shadow: 0px 1px 1px rgba(255, 255, 255, 0.9); - text-decoration: none; + text-decoration: none; } .navpath li.navelem a:hover @@ -1036,7 +1036,7 @@ div.summary padding-right: 5px; width: 50%; text-align: right; -} +} div.summary a { @@ -1051,7 +1051,7 @@ table.classindex margin-right: 3%; width: 94%; border: 0; - border-spacing: 0; + border-spacing: 0; padding: 0; } @@ -1160,12 +1160,12 @@ dl.section dd { vertical-align: bottom; border-collapse: separate; } - + #projectlogo img -{ +{ border: 0px none; } - + #projectalign { vertical-align: middle; @@ -1177,7 +1177,7 @@ dl.section dd { margin: 0px; padding: 2px 0px; } - + #projectbrief { font: 120% Tahoma, Arial,sans-serif; @@ -1205,6 +1205,12 @@ dl.section dd { text-align: center; } +.image img +{ + max-width: 100%; + text-align: center; +} + .dotgraph { text-align: center; @@ -1282,7 +1288,7 @@ div.toc ul { list-style: none outside none; border: medium none; padding: 0px; -} +} div.toc li.level1 { margin-left: 0px; diff --git a/dox/doxyfile_ru b/dox/doxyfile_ru index 4c5dce5..064673b 100755 --- a/dox/doxyfile_ru +++ b/dox/doxyfile_ru @@ -934,7 +934,8 @@ EXAMPLE_RECURSIVE = YES # that contain images that are to be included in the documentation (see the # \image command). -IMAGE_PATH = ../test/bin/img +IMAGE_PATH = ../test/bin/img \ + ru/img # The INPUT_FILTER tag can be used to specify a program that doxygen should # invoke to filter for each input file. Doxygen will invoke the filter program diff --git a/dox/makedoc.sh b/dox/makedoc.sh index 1fcb3c3..ce48961 100755 --- a/dox/makedoc.sh +++ b/dox/makedoc.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/bin/bash cd ../ make @@ -14,3 +14,6 @@ doxygen doxyfile_ru cd ../ make clean cd dox + +pkill -x gnuplot + diff --git a/dox/ru/getting_started.dox b/dox/ru/getting_started.dox new file mode 100644 index 0000000..b1aa0d9 --- /dev/null +++ b/dox/ru/getting_started.dox @@ -0,0 +1,239 @@ +/*! \page getting_started_windows_gcc Быстрый старт использования библиотеки в системе Windows (GCC компилятор) + + +\tableofcontents + +Запуск DSPL в системе Windows требует установки компилятора, Unix-утилит, и +пакета построения графиков GNUPlot. Также желательно установить консольный +файловый менеджер Far. + + + + +\subsection install_gcc Установка компилятора GCC в системе Windows + +

Установка компилятора GCC в системе Windows

+ +GCC компилятор в системе Windows реализован в проекте MinGW64. +Скачиваем дистрибутив MinGW64 с сайта + +sourceforge.net +, соответствующий разрядности вашей системы Windows. + +Для 64-битной системы вы можете скачать по + +прямой ссылке +.
+ +Разархивируем дистрибутив на диск `C:\`. В результате на диске `C:\` +появится директория `mingw64` в которой будет несколько папок. + +Перейдя в директорию `C:\mingw64\bin` можно увидеть множество исполняемых +файлов, в частности `gcc.exe` который вызывается для компиляции кода. + +\image html mingw_bin.png + +Теперь надо операционной системе прописать в системную +переменную `Path` путь к директории `C:\mingw64\bin`, +чтобы при вызове компиляции система искала `gcc.exe` по указанному пути. + + +В системе Windows необходимо открыть свойства компьютера, +и перейти в дополнительные параметры системы. После открыть переменные среды: + +\image html path_1.png + + +нажать кнопку Создать и добавить путь `C:\mingw64\bin`, + как это показано на следующем рисунке: + +\image html path_2.png + + +Если вы используете opensource приложения, например GNU Octave, +то они могут в своем составе также иметь GCC компилятор. + +Поэтому рекомендуется ставить путь `C:\mingw64\bin` +в списке переменной `Path` самым первым, нажатием кнопки Вверх: + +\image html path_3.png + + +В предыдущих версиях Windows переменная редактировалась в одной строке: + +\image html path_old.png + +В этом случае надо вставить `C:\mingw64\bin;` вначало строки переменной `Path`. + +После того как переменная `Path` изменена система должна увидеть GCC. +Открываем консоль и проверяем, система увидела GCC компилятор. + +Для этого нажимаем Пуск-> Все приложения -> Служебные Windows +и выбираем Командная строка. + +В консоли вводим + +\verbatim +gcc --version +\endverbatim + + +и вывод должен быть следующий: + +\image html gcc_ver.png + + +На этом настройка компилятора GCC окончена. + + + + +\subsection install_unixutils Установка Unix утилит в системе Windows + +

Установка Unix утилит в системе Windows

+ + +Для работы с кроссплатформенным компилятором gcc необходимо установить +дополнительный набор Unix-утилит. + +Скачиваем набор Unix-утилит со + +страницы SourceForge + +Распаковываем в директорию `C:\UnxUtils` +Тогда в директории `C:\UnxUtils\usr\local\wbin` +будет набор утилит: + +\image html unxutils.png + +Для того чтобы эти утилиты увидела система, директорию `C:\UnxUtils\usr\local\wbin` + +Также надо добавить к переменной `Path`, +также как это было описано выше для GCC компилятора: + + +\image html path_unx.png + +На этом настройка Unix-утилит окончена. + + + + + + + +\subsection install_gnuplot Установка программы построения графиков GNUPlot + +

Установка программы построения графиков GNUPlot

+ +При работе с DSPL требуется строить графики сигналов, спектров и т.д. +Для этого используется кроссплатформенный пакет GNUPlot. + + +Скачиваем архив с пакетом построения графиков +со + +страницы SourceForge + +Pазархивируем на диск `C:\`. + +Получаем следующую директорию с исполняемыми файлами GNUPlot: + +\image html gnuplot.png + +Снова прописываем путь к директории `C:\gnuplot\bin` в переменную `Path` + +\image html path_gnuplot.png + +На этом настройка GNUPlot окончена. + + + + + + + + + + + + + +\subsection install_far Установка консольного файлового менеджера Far manager + +

Установка консольного файлового менеджера Far manager

+ +На самом деле это не обязательный шаг, но Far сильно облегчает работу + с командной строкой в Windows. + +Скачиваем дистрибутив с + +официального сайта + и устанавливаем его. + +После установки запускаем и видим две панели консольного файлового менеджера: + +\image html far_manager.png + + +В сети можно найти + +множество информации по использованию Far. + + + + + +Итак, мы установили компилятор MinGW64, набор Unix утилит, +программу построения графиков GNUPlot и консольный файловый менеджер. + +Теперь можно компилировать DSPL и запускать программы с ее использованием. + + + + + + +\subsection compile_gcc Компиляция libdspl-2.0 и запуск программы с ее использованием + +

Компиляция libdspl-2.0 и запуск программы с ее использованием

+ + +Скачиваем с сайта Github.com + +сайта Github.com + +исходные коды DSPL: + +\image html dspl_github.png + + + +Разархивируем в рабочую директорию. + +Вы можете разархивировать в любую директорию, libdspl-2.0 будет +обозначать директорию в которую разархивированы исходные коды. + +Запускаем Far manager и переходим в директорию libdspl-2.0. + +\image html dspl_dir.png + + +Далее нажимаем `Ctrl-O` и скрываем панели Far, после вводим команду `mingw32-make` + +Если все настроено верно, то вы увидите процесс компиляции библиотеки и всех тестовых программ. + +\image html compileproc.png + + +По завершению компиляции снова нажимаем `Ctrl-O` (возвращаем панели Far), +переходим в директорию `libdspl-2.0/test/bin` и видим скомпилированные exe-файлы: + +\image html dspl_exe.png + + +Можно выполнить любой exe-файл. Например выполним `sinc_test.exe` и +увидим окно с графиками функции. + + +*/ diff --git a/dox/ru/img/compileproc.png b/dox/ru/img/compileproc.png new file mode 100644 index 0000000..da69a7e Binary files /dev/null and b/dox/ru/img/compileproc.png differ diff --git a/dox/ru/img/dspl_dir.png b/dox/ru/img/dspl_dir.png new file mode 100644 index 0000000..25e419d Binary files /dev/null and b/dox/ru/img/dspl_dir.png differ diff --git a/dox/ru/img/dspl_exe.png b/dox/ru/img/dspl_exe.png new file mode 100644 index 0000000..27a6d1c Binary files /dev/null and b/dox/ru/img/dspl_exe.png differ diff --git a/dox/ru/img/dspl_github.png b/dox/ru/img/dspl_github.png new file mode 100644 index 0000000..fe40148 Binary files /dev/null and b/dox/ru/img/dspl_github.png differ diff --git a/dox/ru/img/far_manager.png b/dox/ru/img/far_manager.png new file mode 100644 index 0000000..682a122 Binary files /dev/null and b/dox/ru/img/far_manager.png differ diff --git a/dox/ru/img/gcc_ver.png b/dox/ru/img/gcc_ver.png new file mode 100644 index 0000000..30f80b2 Binary files /dev/null and b/dox/ru/img/gcc_ver.png differ diff --git a/dox/ru/img/gnuplot.png b/dox/ru/img/gnuplot.png new file mode 100644 index 0000000..52d8013 Binary files /dev/null and b/dox/ru/img/gnuplot.png differ diff --git a/dox/ru/img/mingw_bin.png b/dox/ru/img/mingw_bin.png new file mode 100644 index 0000000..2e6c6c7 Binary files /dev/null and b/dox/ru/img/mingw_bin.png differ diff --git a/dox/ru/img/path_1.png b/dox/ru/img/path_1.png new file mode 100644 index 0000000..842656a Binary files /dev/null and b/dox/ru/img/path_1.png differ diff --git a/dox/ru/img/path_2.png b/dox/ru/img/path_2.png new file mode 100644 index 0000000..651365e Binary files /dev/null and b/dox/ru/img/path_2.png differ diff --git a/dox/ru/img/path_3.png b/dox/ru/img/path_3.png new file mode 100644 index 0000000..e89ba49 Binary files /dev/null and b/dox/ru/img/path_3.png differ diff --git a/dox/ru/img/path_gnuplot.png b/dox/ru/img/path_gnuplot.png new file mode 100644 index 0000000..c491bb7 Binary files /dev/null and b/dox/ru/img/path_gnuplot.png differ diff --git a/dox/ru/img/path_old.png b/dox/ru/img/path_old.png new file mode 100644 index 0000000..3d88383 Binary files /dev/null and b/dox/ru/img/path_old.png differ diff --git a/dox/ru/img/path_unx.png b/dox/ru/img/path_unx.png new file mode 100644 index 0000000..0d42e66 Binary files /dev/null and b/dox/ru/img/path_unx.png differ diff --git a/dox/ru/img/unxutils.png b/dox/ru/img/unxutils.png new file mode 100644 index 0000000..e3c012a Binary files /dev/null and b/dox/ru/img/unxutils.png differ diff --git a/dox/ru/mainpage.dox b/dox/ru/mainpage.dox index 90f5488..8d6d8df 100755 --- a/dox/ru/mainpage.dox +++ b/dox/ru/mainpage.dox @@ -1,32 +1,43 @@ /*! - \mainpage DSPL-2.0 - библиотека алгоритмов цифровой обработки сигналов. - - - DSPL-2.0 - свободная библиотека алгоритмов цифровой обработки сигналов, - включающая в себя следующие группы алгоритмов:
- - \ref DFT_GROUP
- \ref WIN_GROUP
- \ref FILTER_CONV_GROUP
- \ref IIR_FILTER_DESIGN_GROUP
- \ref FIR_FILTER_DESIGN_GROUP
- \ref FILTER_ANALYSIS_GROUP
- \ref RESAMPLING_GROUP
- \ref SPEC_MATH_GROUP
- \ref IN_OUT_GROUP
-
- - Библиотека поддерживает работу с вещественными и комплексными типами входных данных.
- Описание испльзуемых типов:
- - \ref TYPES_GROUP
- - DSPL-2.0 библиотека с открытым исходным кодом, написанная на языке Си.
+\mainpage DSPL-2.0 - библиотека алгоритмов цифровой обработки сигналов. - Pаспространяется под лицензией LGPL v3 - Исходные коды библиотеки доступны на GitHub.
- Вы также можете внести свой вклад в развитие данной библиотеки. Присоединяйтесь! - +DSPL-2.0 - свободная библиотека алгоритмов цифровой обработки сигналов, +включающая в себя следующие группы алгоритмов:
+ +\ref DFT_GROUP
+\ref WIN_GROUP
+\ref FILTER_CONV_GROUP
+\ref IIR_FILTER_DESIGN_GROUP
+\ref FIR_FILTER_DESIGN_GROUP
+\ref FILTER_ANALYSIS_GROUP
+\ref RESAMPLING_GROUP
+\ref SPEC_MATH_GROUP
+\ref IN_OUT_GROUP
+ +
+ +Библиотека поддерживает работу с вещественными и +комплексными типами входных данных.
+ +Описание испльзуемых типов:
+ +\ref TYPES_GROUP
+ +DSPL-2.0 библиотека с открытым исходным кодом, написанная на языке Си.
+ + + Pаспространяется под лицензией + LGPL v3 + +Исходные коды библиотеки доступны на +GitHub.
+ +Вы также можете внести свой вклад в развитие данной библиотеки. Присоединяйтесь! + +Для начала работы с библиотекой необходимо ознакомиться с разделами: + +\ref getting_started_windows_gcc
+ */ diff --git a/dspl/dox/ru/fourier_series.dox b/dspl/dox/ru/fourier_series.dox index e69de29..9b50145 100755 --- a/dspl/dox/ru/fourier_series.dox +++ b/dspl/dox/ru/fourier_series.dox @@ -0,0 +1,56 @@ +/*! **************************************************************************** +\ingroup DFT_GROUP +\fn int fourier_series_dec(double* t, double* s, int nt, + double period, int nw, double* w, complex_t* y) + +\brief Расчет коэффициентов разложения в ряд Фурье + +Функция рассчитывает спектр периодического сигнала при усечении ряда Фурье
+ + +\param[in] t Указатель на массив моментов времени дискретизации + исходного сигнала `s`
+ размер вектора вектора `[nt x 1]`.
+ Память должна быть выделена.

+ +\param[in] s Указатель на массив значений исходного сигнала`s`
+ размер вектора вектора `[nt x 1]`.
+ Память должна быть выделена.

+ + +\param[in] nt размер выборки исходного сигнала.
+ Значение должно быть положительным.

+ +\param[in] period Период повторения сигнала.

+ +\param[in] nw Размер усеченного ряда Фурье.

+ +\param[out] w Указатель на массив частот спектра + периодического сигнала.
+ Размер вектора `[nw x 1]`.
+ Память должна быть выделена.

+ +\param[out] y Указатель массив комплексных значений спектра + периодического сигнала.
+ Размер вектора `[nw x 1]`.
+ Память должна быть выделена.

+ +\return + `RES_OK` Массивы нулей и полюсов рассчитаны успешно.
+ В противном случае + \ref ERROR_CODE_GROUP "код ошибки".
+ + +\note +Для расчета спектра сигнала используетя численное интегрирование +исходного сигнала методом трапеций. Данная функция не является +вычислительно-эффективной. Для увеличения скорости расчета спектра сигнала +целесообразнее использовать алгоритмы дискретного +и быстрого преобразования Фурье. +
+ +\author + Бахурин Сергей + www.dsplib.org + +***************************************************************************** */ diff --git a/dspl/src/fourier_series.c b/dspl/src/fourier_series.c index bc77207..03bc02e 100755 --- a/dspl/src/fourier_series.c +++ b/dspl/src/fourier_series.c @@ -25,76 +25,80 @@ #include "dspl.h" - -int DSPL_API fourier_series_dec(double* t, double* s, int nt, double period, int nw, double* w, complex_t* y) +/******************************************************************************* +Fourier Series Decomposition +*******************************************************************************/ +int DSPL_API fourier_series_dec(double* t, double* s, int nt, + double period, int nw, double* w, complex_t* y) { - int k, m; - double dw = M_2PI / period; - complex_t e[2]; + int k, m; + double dw = M_2PI / period; + complex_t e[2]; - if(!t || !s || !w || !y) - return ERROR_PTR; - if(nt<1 || nw < 1) - return ERROR_SIZE; - if(period <= 0.0) - return ERROR_NEGATIVE; + if(!t || !s || !w || !y) + return ERROR_PTR; + if(nt<1 || nw < 1) + return ERROR_SIZE; + if(period <= 0.0) + return ERROR_NEGATIVE; - memset(y, 0 , nw*sizeof(complex_t)); + memset(y, 0 , nw*sizeof(complex_t)); - for(k = 0; k < nw; k++) - { - w[k] = (k - nw/2) * dw; - RE(e[1]) = s[0] * cos(w[k] * t[0]); - IM(e[1]) = -s[0] * sin(w[k] * t[0]); - for(m = 1; m < nt; m++) - { - RE(e[0]) = RE(e[1]); - IM(e[0]) = IM(e[1]); - RE(e[1]) = s[m] * cos(w[k] * t[m]); - IM(e[1]) = - s[m] * sin(w[k] * t[m]); - RE(y[k]) += 0.5 * (RE(e[0]) + RE(e[1])) * (t[m] - t[m-1]); - IM(y[k]) += 0.5 * (IM(e[0]) + IM(e[1])) * (t[m] - t[m-1]); - } - RE(y[k]) /= period; - IM(y[k]) /= period; - } + for(k = 0; k < nw; k++) + { + w[k] = (k - nw/2) * dw; + RE(e[1]) = s[0] * cos(w[k] * t[0]); + IM(e[1]) = -s[0] * sin(w[k] * t[0]); + for(m = 1; m < nt; m++) + { + RE(e[0]) = RE(e[1]); + IM(e[0]) = IM(e[1]); + RE(e[1]) = s[m] * cos(w[k] * t[m]); + IM(e[1]) = - s[m] * sin(w[k] * t[m]); + RE(y[k]) += 0.5 * (RE(e[0]) + RE(e[1]))*(t[m] - t[m-1]); + IM(y[k]) += 0.5 * (IM(e[0]) + IM(e[1]))*(t[m] - t[m-1]); + } + RE(y[k]) /= period; + IM(y[k]) /= period; + } - if(!(nw%2)) - RE(y[0]) = RE(y[1]) = 0.0; + if(!(nw%2)) + RE(y[0]) = RE(y[1]) = 0.0; - return RES_OK; + return RES_OK; } - -int DSPL_API fourier_series_rec(double* w, complex_t* s, int nw, double *t, int nt, complex_t* y) +/******************************************************************************* +Fourier Series Reconstruction +*******************************************************************************/ +int DSPL_API fourier_series_rec(double* w, complex_t* s, int nw, + double *t, int nt, complex_t* y) { - int k, m; - complex_t e; + int k, m; + complex_t e; - if(!t || !s || !w || !y) - return ERROR_PTR; - if(nt<1 || nw < 1) - return ERROR_SIZE; + if(!t || !s || !w || !y) + return ERROR_PTR; + if(nt<1 || nw < 1) + return ERROR_SIZE; - memset(y, 0, nt*sizeof(complex_t)); + memset(y, 0, nt*sizeof(complex_t)); - for(k = 0; k < nw; k++) - { - for(m = 0; m < nt; m++) - { - RE(e) = cos(w[k] * t[m]); - IM(e) = sin(w[k] * t[m]); - - RE(y[m]) += CMRE(s[k], e); - IM(y[m]) += CMIM(s[k], e); - - } - } - return RES_OK; + for(k = 0; k < nw; k++) + { + for(m = 0; m < nt; m++) + { + RE(e) = cos(w[k] * t[m]); + IM(e) = sin(w[k] * t[m]); + RE(y[m]) += CMRE(s[k], e); + IM(y[m]) += CMIM(s[k], e); + } + } + return RES_OK; } diff --git a/ide/visualstudio/libdspl-2.0.sln b/ide/visualstudio/libdspl-2.0.sln new file mode 100644 index 0000000..37f33e3 --- /dev/null +++ b/ide/visualstudio/libdspl-2.0.sln @@ -0,0 +1,44 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio 15 +VisualStudioVersion = 15.0.27703.2042 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libdspl-2.0", "libdspl-2.0.vcxproj", "{B7A08A03-C9D7-49C8-89C5-15B0EB872A2E}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "test", "test.vcxproj", "{281E42D9-1F9F-4A4B-852D-AAD12291EBF1}" + ProjectSection(ProjectDependencies) = postProject + {B7A08A03-C9D7-49C8-89C5-15B0EB872A2E} = {B7A08A03-C9D7-49C8-89C5-15B0EB872A2E} + EndProjectSection +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|x64 = Debug|x64 + Debug|x86 = Debug|x86 + Release|x64 = Release|x64 + Release|x86 = Release|x86 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {B7A08A03-C9D7-49C8-89C5-15B0EB872A2E}.Debug|x64.ActiveCfg = Debug|x64 + {B7A08A03-C9D7-49C8-89C5-15B0EB872A2E}.Debug|x64.Build.0 = Debug|x64 + {B7A08A03-C9D7-49C8-89C5-15B0EB872A2E}.Debug|x86.ActiveCfg = Debug|Win32 + {B7A08A03-C9D7-49C8-89C5-15B0EB872A2E}.Debug|x86.Build.0 = Debug|Win32 + {B7A08A03-C9D7-49C8-89C5-15B0EB872A2E}.Release|x64.ActiveCfg = Release|x64 + {B7A08A03-C9D7-49C8-89C5-15B0EB872A2E}.Release|x64.Build.0 = Release|x64 + {B7A08A03-C9D7-49C8-89C5-15B0EB872A2E}.Release|x86.ActiveCfg = Release|Win32 + {B7A08A03-C9D7-49C8-89C5-15B0EB872A2E}.Release|x86.Build.0 = Release|Win32 + {281E42D9-1F9F-4A4B-852D-AAD12291EBF1}.Debug|x64.ActiveCfg = Debug|x64 + {281E42D9-1F9F-4A4B-852D-AAD12291EBF1}.Debug|x64.Build.0 = Debug|x64 + {281E42D9-1F9F-4A4B-852D-AAD12291EBF1}.Debug|x86.ActiveCfg = Debug|Win32 + {281E42D9-1F9F-4A4B-852D-AAD12291EBF1}.Debug|x86.Build.0 = Debug|Win32 + {281E42D9-1F9F-4A4B-852D-AAD12291EBF1}.Release|x64.ActiveCfg = Release|x64 + {281E42D9-1F9F-4A4B-852D-AAD12291EBF1}.Release|x64.Build.0 = Release|x64 + {281E42D9-1F9F-4A4B-852D-AAD12291EBF1}.Release|x86.ActiveCfg = Release|Win32 + {281E42D9-1F9F-4A4B-852D-AAD12291EBF1}.Release|x86.Build.0 = Release|Win32 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {71230A03-7736-47BD-BB65-804F946D83FA} + EndGlobalSection +EndGlobal diff --git a/ide/visualstudio/libdspl-2.0.vcxproj b/ide/visualstudio/libdspl-2.0.vcxproj new file mode 100644 index 0000000..16993c2 --- /dev/null +++ b/ide/visualstudio/libdspl-2.0.vcxproj @@ -0,0 +1,203 @@ + + + + + Debug + Win32 + + + Release + Win32 + + + Debug + x64 + + + Release + x64 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 15.0 + {B7A08A03-C9D7-49C8-89C5-15B0EB872A2E} + Win32Proj + libdspl20 + 10.0.17134.0 + libdspl-2.0 + + + + DynamicLibrary + true + v141 + Unicode + + + DynamicLibrary + false + v141 + true + Unicode + + + DynamicLibrary + true + v141 + Unicode + + + DynamicLibrary + false + v141 + true + Unicode + + + + + + + + + + + + + + + + + + + + + true + $(SolutionDir)$(Configuration)\../../../test/bin + + + true + $(SolutionDir)$(Configuration)\../../../test/bin + + + false + $(SolutionDir)$(Configuration)\../../../test/bin + + + false + $(SolutionDir)$(Configuration)\../../../test/bin + + + + NotUsing + Level3 + MaxSpeed + true + BUILD_LIB;WIN_OS;_CRT_SECURE_NO_WARNINGS + true + ../../include;%(AdditionalIncludeDirectories) + Speed + true + Default + MultiThreadedDebugDLL + + + Windows + true + $(OutDir)libdspl.dll + + + + + NotUsing + Level3 + MaxSpeed + true + BUILD_LIB;WIN_OS;_CRT_SECURE_NO_WARNINGS + true + ../../include;%(AdditionalIncludeDirectories) + Speed + true + Default + MultiThreadedDebugDLL + + + Windows + true + $(OutDir)libdspl.dll + + + + + NotUsing + Level3 + MaxSpeed + true + true + BUILD_LIB;WIN_OS;_CRT_SECURE_NO_WARNINGS + true + ../../include;%(AdditionalIncludeDirectories) + Speed + true + MultiThreadedDebugDLL + + + Windows + true + true + true + $(OutDir)libdspl.dll + + + + + NotUsing + Level3 + MaxSpeed + true + true + BUILD_LIB;WIN_OS;_CRT_SECURE_NO_WARNINGS + true + ../../include;%(AdditionalIncludeDirectories) + Speed + true + MultiThreadedDebugDLL + + + Windows + true + true + true + $(OutDir)libdspl.dll + + + + + + \ No newline at end of file diff --git a/ide/visualstudio/libdspl-2.0.vcxproj.filters b/ide/visualstudio/libdspl-2.0.vcxproj.filters new file mode 100644 index 0000000..307ba29 --- /dev/null +++ b/ide/visualstudio/libdspl-2.0.vcxproj.filters @@ -0,0 +1,87 @@ + + + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx + + + {93995380-89BD-4b04-88EB-625FBE52EBFB} + h;hh;hpp;hxx;hm;inl;inc;ipp;xsd + + + {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} + rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms + + + + + Исходные файлы + + + Исходные файлы + + + Исходные файлы + + + Исходные файлы + + + Исходные файлы + + + Исходные файлы + + + Исходные файлы + + + Исходные файлы + + + Исходные файлы + + + Исходные файлы + + + Исходные файлы + + + Исходные файлы + + + Исходные файлы + + + Исходные файлы + + + Исходные файлы + + + Исходные файлы + + + Исходные файлы + + + Исходные файлы + + + Исходные файлы + + + Исходные файлы + + + Исходные файлы + + + + + Файлы заголовков + + + \ No newline at end of file diff --git a/ide/visualstudio/libdspl-2.0.vcxproj.user b/ide/visualstudio/libdspl-2.0.vcxproj.user new file mode 100644 index 0000000..6e2aec7 --- /dev/null +++ b/ide/visualstudio/libdspl-2.0.vcxproj.user @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/ide/visualstudio/test.vcxproj b/ide/visualstudio/test.vcxproj new file mode 100644 index 0000000..6f721d2 --- /dev/null +++ b/ide/visualstudio/test.vcxproj @@ -0,0 +1,146 @@ + + + + + Debug + Win32 + + + Release + Win32 + + + Debug + x64 + + + Release + x64 + + + + 15.0 + {281E42D9-1F9F-4A4B-852D-AAD12291EBF1} + test + 10.0.17134.0 + + + + Application + true + v141 + MultiByte + + + Application + false + v141 + true + MultiByte + + + Application + true + v141 + MultiByte + + + Application + false + v141 + true + MultiByte + + + + + + + + + + + + + + + + + + + + + $(SolutionDir)$(Configuration)\../../../test/bin + + + $(SolutionDir)$(Configuration)\../../../test/bin + + + $(SolutionDir)$(Configuration)\../../../test/bin + + + $(SolutionDir)$(Configuration)\../../../test/bin + + + + Level3 + MaxSpeed + true + true + true + true + ../../include;%(AdditionalIncludeDirectories) + WIN_OS;%(PreprocessorDefinitions) + + + true + true + + + + + Level3 + Disabled + true + true + ../../include;%(AdditionalIncludeDirectories) + WIN_OS;%(PreprocessorDefinitions) + + + + + Level3 + Disabled + true + true + ../../include;%(AdditionalIncludeDirectories) + WIN_OS;%(PreprocessorDefinitions) + + + + + Level3 + MaxSpeed + true + true + true + true + ../../include;%(AdditionalIncludeDirectories) + WIN_OS;%(PreprocessorDefinitions) + + + true + true + + + + + + + + + + + + + \ No newline at end of file diff --git a/ide/visualstudio/test.vcxproj.filters b/ide/visualstudio/test.vcxproj.filters new file mode 100644 index 0000000..ee56c37 --- /dev/null +++ b/ide/visualstudio/test.vcxproj.filters @@ -0,0 +1,30 @@ + + + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx + + + {93995380-89BD-4b04-88EB-625FBE52EBFB} + h;hh;hpp;hxx;hm;inl;inc;ipp;xsd + + + {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} + rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms + + + + + Исходные файлы + + + Исходные файлы + + + + + Файлы заголовков + + + \ No newline at end of file diff --git a/ide/visualstudio/test.vcxproj.user b/ide/visualstudio/test.vcxproj.user new file mode 100644 index 0000000..da0e35c --- /dev/null +++ b/ide/visualstudio/test.vcxproj.user @@ -0,0 +1,19 @@ + + + + $(ProjectDir)../../test/bin + WindowsLocalDebugger + + + $(ProjectDir)../../test/bin + WindowsLocalDebugger + + + $(ProjectDir)../../test/bin + WindowsLocalDebugger + + + $(ProjectDir)../../test/bin + WindowsLocalDebugger + + \ No newline at end of file diff --git a/test/bin/gnuplot/butter_ap_test.plt b/test/bin/gnuplot/butter_ap_test.plt old mode 100755 new mode 100644 index 7331d5a..7c29d47 --- a/test/bin/gnuplot/butter_ap_test.plt +++ b/test/bin/gnuplot/butter_ap_test.plt @@ -6,29 +6,34 @@ set xlabel "frequency, rad/s" set lmargin at screen 0.10 -set terminal pngcairo size 560,420 enhanced font 'Verdana,8' -set output 'img/butter_ap_test_mag.png' +set terminal wxt 0 size 460,320 enhanced font 'Verdana,8' + set ylabel "Butterworth filter magnitude, dB" set yrange [-100:5] plot 'dat/butter_ap_test_mag.txt' with lines - - - set terminal pngcairo size 560,420 enhanced font 'Verdana,8' -set output 'img/butter_ap_test_phi.png' +set output 'img/butter_ap_test_mag.png' +replot + +set terminal wxt 0 size 460,320 enhanced font 'Verdana,8' set ylabel "Butterworth filter phase response, rad" unset yrange plot 'dat/butter_ap_test_phi.txt' with lines - - - set terminal pngcairo size 560,420 enhanced font 'Verdana,8' -set output 'img/butter_ap_test_tau.png' +set output 'img/butter_ap_test_phi.png' +replot + + +set terminal wxt 0 size 460,320 enhanced font 'Verdana,8' set ylabel "Butterworth filter groupdelay, sec" unset yrange plot 'dat/butter_ap_test_tau.txt' with lines + +set terminal pngcairo size 560,420 enhanced font 'Verdana,8' +set output 'img/butter_ap_test_tau.png' +replot diff --git a/test/bin/gnuplot/cheby1_ap_test.plt b/test/bin/gnuplot/cheby1_ap_test.plt old mode 100755 new mode 100644 index 7379443..6bc1184 --- a/test/bin/gnuplot/cheby1_ap_test.plt +++ b/test/bin/gnuplot/cheby1_ap_test.plt @@ -5,24 +5,38 @@ set xlabel "frequency, rad/s" set lmargin at screen 0.10 -set terminal pngcairo size 560,420 enhanced font 'Verdana,8' -set output 'img/cheby1_ap_test_mag.png' +set terminal wxt 0 size 460,320 enhanced font 'Verdana,8' position 0,0 + set ylabel "Chebyshev type 1 filter magnitude, dB" set yrange [-100:5] plot 'dat/cheby1_ap_test_mag.txt' with lines - set terminal pngcairo size 560,420 enhanced font 'Verdana,8' -set output 'img/cheby1_ap_test_phi.png' +set output 'img/cheby1_ap_test_mag.png' +replot + + + +set terminal wxt 1 size 460,320 enhanced font 'Verdana,8' position 460, 0 set ylabel "Chebyshev type 1 filter phase response, rad" unset yrange plot 'dat/cheby1_ap_test_phi.txt' with lines - set terminal pngcairo size 560,420 enhanced font 'Verdana,8' -set output 'img/cheby1_ap_test_tau.png' +set output 'img/cheby1_ap_test_phi.png' +replot + + + +set terminal wxt 2 size 460,320 enhanced font 'Verdana,8' position 920, 0 set ylabel "Chebyshev type 1 filter groupdelay, sec" unset yrange plot 'dat/cheby1_ap_test_tau.txt' with lines + + +set terminal pngcairo size 560,420 enhanced font 'Verdana,8' +set output 'img/cheby1_ap_test_tau.png' +replot + diff --git a/test/bin/gnuplot/sinc_test.plt b/test/bin/gnuplot/sinc_test.plt index dfef9c1..8f14ead 100644 --- a/test/bin/gnuplot/sinc_test.plt +++ b/test/bin/gnuplot/sinc_test.plt @@ -3,7 +3,7 @@ set xlabel "x" set lmargin at screen 0.10 -set terminal pngcairo size 560,280 enhanced font 'Verdana,8' +set terminal wxt size 560,280 enhanced font 'Verdana,8' set output 'img/sinc_test.png' set ylabel "sinc(x,a)" set yrange [-0.25:1.1] @@ -11,3 +11,6 @@ plot 'dat/sinc_test_1.0.txt' with lines title "a = 1.0", \ 'dat/sinc_test_pi.txt' with lines title "a = pi", \ 'dat/sinc_test_2pi.txt' with lines title "a = 2pi" +set terminal pngcairo size 560,280 enhanced font 'Verdana,8' +set output 'img/sinc_test.png' +replot diff --git a/test/src/butter_ap_test.c b/test/src/butter_ap_test.c old mode 100755 new mode 100644 index 513585a..afb77d6 --- a/test/src/butter_ap_test.c +++ b/test/src/butter_ap_test.c @@ -16,12 +16,12 @@ int main() double Rp = 1.0; double w[N], mag[N], phi[N], tau[N]; - + int k; int res = butter_ap(Rp, ORD, b, a); if(res != RES_OK) printf("error code = 0x%8x\n", res); - + for(k = 0; k < ORD+1; k++) printf("b[%2d] = %9.3f a[%2d] = %9.3f\n", k, b[k], k, a[k]); @@ -29,15 +29,14 @@ int main() logspace(-2.0, 2.0, N , DSPL_SYMMETRIC, w); freqs_resp(b, a, ORD, w, N, DSPL_FLAG_LOG|DSPL_FLAG_UNWRAP, mag, phi, tau); - writetxt(w, mag, N, "dat/butter_ap_test_mag.txt"); + writetxt(w, mag, N, "dat/butter_ap_test_mag.txt"); writetxt(w, phi, N, "dat/butter_ap_test_phi.txt"); writetxt(w, tau, N, "dat/butter_ap_test_tau.txt"); dspl_free(handle); // free dspl handle - res = system("gnuplot gnuplot/butter_ap_test.plt"); + res = system("gnuplot -p gnuplot/butter_ap_test.plt"); return 0; } - diff --git a/test/src/cheby1_ap_test.c b/test/src/cheby1_ap_test.c old mode 100755 new mode 100644 index 35156a5..9978fff --- a/test/src/cheby1_ap_test.c +++ b/test/src/cheby1_ap_test.c @@ -46,7 +46,7 @@ int main() // выполнить скрипт GNUPLOT для построения графиков // по рассчитанным данным - return system("gnuplot gnuplot/cheby1_ap_test.plt");; + return system("gnuplot -p gnuplot/cheby1_ap_test.plt");; } diff --git a/test/src/cheby2_ap_zp_test.c b/test/src/cheby2_ap_zp_test.c old mode 100755 new mode 100644 diff --git a/test/src/conv_fft_cmplx_test.c b/test/src/conv_fft_cmplx_test.c old mode 100755 new mode 100644 diff --git a/test/src/dft_cmplx_test.c b/test/src/dft_cmplx_test.c old mode 100755 new mode 100644 diff --git a/test/src/dft_test.c b/test/src/dft_test.c old mode 100755 new mode 100644 diff --git a/test/src/dspl_info_test.c b/test/src/dspl_info_test.c old mode 100755 new mode 100644 diff --git a/test/src/ellip_landen_test.c b/test/src/ellip_landen_test.c old mode 100755 new mode 100644 diff --git a/test/src/fft_cmplx_test.c b/test/src/fft_cmplx_test.c old mode 100755 new mode 100644 diff --git a/test/src/fft_test.c b/test/src/fft_test.c old mode 100755 new mode 100644 diff --git a/test/src/sinc_test.c b/test/src/sinc_test.c index b805558..029c5b2 100644 --- a/test/src/sinc_test.c +++ b/test/src/sinc_test.c @@ -27,6 +27,10 @@ int main() // выполнить скрипт GNUPLOT для построения графиков // по рассчитанным данным - return system("gnuplot gnuplot/sinc_test.plt");; + int err = system("gnuplot -p gnuplot/sinc_test.plt"); + printf("err = %d\n", err); + + + return err; }