Skip to content

The spectrum charts improvements. #833

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 32 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
7905a91
The FFT is used power 2 input length to get maximal fft performance
demvlad May 13, 2025
966e0cd
Added Power spectral density curves chart
demvlad May 13, 2025
5d2749a
The spectrum magnitude is computed by complex Re and Im value
demvlad May 13, 2025
bec79fb
Added functions to compute PSD by RPM and Throttle
demvlad May 10, 2025
4bcd84e
Added drawing heat map for PSD values
demvlad May 10, 2025
fe7c95b
Added switch to select PSD by throttle or RPM charts
demvlad May 10, 2025
0870212
Resolved issue of limit drawing psd value
demvlad May 10, 2025
7e77390
Code style improvement
demvlad May 10, 2025
765b55b
Code refactoring in src/graph_spectrum_calc.js
demvlad May 10, 2025
a5ea9fa
Resolved missing this. issue
demvlad May 10, 2025
a938e7a
Added PSD values label at mouse position cursor by Shift key
demvlad May 11, 2025
2d02e2a
Added PSD values label on the mouse position cursor by Shift key at t…
demvlad May 11, 2025
01160bc
Code refactoring
demvlad May 12, 2025
3fb48e7
The background heatmap PSD value is changed from -70 to -100dBm
demvlad May 12, 2025
92468d9
Added PSD value to maximal noise PSD marker
demvlad May 12, 2025
953f08f
Removed needless spaces
demvlad May 12, 2025
13380b7
The SPECTRUM_TYPE enum members are reordered
demvlad May 12, 2025
334b945
Code style improvement
demvlad May 12, 2025
6c07c08
Code refactoring
demvlad May 14, 2025
0c59a87
Resolved issue of wrong simple frequency spectrum data
demvlad May 14, 2025
565f248
Code refactoring
demvlad May 14, 2025
f11bad0
Improved fill data into fft input array
demvlad May 14, 2025
0efd9e7
Improved computing of PSD
demvlad May 14, 2025
7e9582e
Code refactoring
demvlad May 14, 2025
f3d1ec1
Resolved issue computing frequency with maximal noise at the simple s…
demvlad May 15, 2025
3f72d63
Improved computing of vsBinIndex values
demvlad May 15, 2025
2391421
Code refactoring: using of named constant
demvlad May 15, 2025
0be83fd
The top margin at heatmaps charts applies for RPM axis only
demvlad May 16, 2025
27d8c15
Resolved issue of filters drawing at the PSD charts
demvlad May 16, 2025
01d0f87
Improved computing of top margin value at vs RPM charts
demvlad May 16, 2025
e6d4fe4
Set properly value for overdrawSpectrumType select element position
demvlad May 17, 2025
257f5cc
The vertical slider shifts the PSD charts dBm range
demvlad May 17, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -457,8 +457,11 @@ <h4>Workspace</h4>
<select id="spectrumTypeSelect">
<option value="0">Frequency</option>
<option value="1">Freq. vs Throttle</option>
<option value="3">Freq. vs RPM</option>
<option value="2">Error vs Setpoint</option>
<option value="2">Freq. vs RPM</option>
<option value="3">Power spectral density</option>
<option value="4">PSD vs Throttle</option>
<option value="5">PSD vs RPM</option>
<option value="6">Error vs Setpoint</option>
</select>
</div>

Expand Down
2 changes: 1 addition & 1 deletion src/css/main.css
Original file line number Diff line number Diff line change
Expand Up @@ -616,7 +616,7 @@ html.has-analyser-fullscreen.has-analyser
height: 0;
overflow: hidden;
opacity: 0;
left: 120px;
left: 130px;
float: left;
z-index: 9;
position: absolute;
Expand Down
17 changes: 17 additions & 0 deletions src/graph_spectrum.js
Original file line number Diff line number Diff line change
Expand Up @@ -112,10 +112,22 @@ export function FlightLogAnalyser(flightLog, canvas, analyserCanvas) {
fftData = GraphSpectrumCalc.dataLoadFrequencyVsRpm();
break;

case SPECTRUM_TYPE.PSD_VS_THROTTLE:
fftData = GraphSpectrumCalc.dataLoadPowerSpectralDensityVsThrottle();
break;

case SPECTRUM_TYPE.PSD_VS_RPM:
fftData = GraphSpectrumCalc.dataLoadFrequencyVsRpm(true);
break;

case SPECTRUM_TYPE.PIDERROR_VS_SETPOINT:
fftData = GraphSpectrumCalc.dataLoadPidErrorVsSetpoint();
break;

case SPECTRUM_TYPE.POWER_SPECTRAL_DENSITY:
fftData = GraphSpectrumCalc.dataLoadPSD(analyserZoomY);
break;

case SPECTRUM_TYPE.FREQUENCY:
default:
fftData = GraphSpectrumCalc.dataLoadFrequency();
Expand Down Expand Up @@ -187,6 +199,11 @@ export function FlightLogAnalyser(flightLog, canvas, analyserCanvas) {
debounce(100, function () {
analyserZoomY = 1 / (analyserZoomYElem.val() / 100);
GraphSpectrumPlot.setZoom(analyserZoomX, analyserZoomY);
// Recalculate PSD with updated samples per segment count
if (userSettings.spectrumType == SPECTRUM_TYPE.POWER_SPECTRAL_DENSITY) {
dataLoad();
GraphSpectrumPlot.setData(fftData, userSettings.spectrumType);
}
that.refresh();
})
)
Expand Down
Loading