From 2802ec3d3591737de48ffd4f04d7426816b18738 Mon Sep 17 00:00:00 2001 From: demvlad Date: Wed, 17 Dec 2025 15:09:17 +0300 Subject: [PATCH 01/12] Resolved computing fields bug in case of disabled log gyro data and enabled Attitudes --- src/flightlog.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/flightlog.js b/src/flightlog.js index e4e00187..003ecdaf 100644 --- a/src/flightlog.js +++ b/src/flightlog.js @@ -746,7 +746,7 @@ export function FlightLog(logData) { if (m < 1.0) { // reconstruct .w of unit quaternion q.w = Math.sqrt(1.0 - m); - } else { + } else { // normalize [0,x,y,z] m = Math.sqrt(m); q.x /= m; From 1f7d14a508341e6f846464ce2cc1fb8bd8b6adad Mon Sep 17 00:00:00 2001 From: demvlad Date: Wed, 17 Dec 2025 15:12:20 +0300 Subject: [PATCH 02/12] Added computed GPS trajectory tilt angle field --- src/flightlog.js | 26 ++++++++++++++++++++++++-- 1 file changed, 24 insertions(+), 2 deletions(-) diff --git a/src/flightlog.js b/src/flightlog.js index 003ecdaf..93b36f51 100644 --- a/src/flightlog.js +++ b/src/flightlog.js @@ -30,7 +30,7 @@ import { * Window based smoothing of fields is offered. */ export function FlightLog(logData) { - let ADDITIONAL_COMPUTED_FIELD_COUNT = 20 /** attitude + PID_SUM + PID_ERROR + RCCOMMAND_SCALED + GPS coord, distance and azimuth **/, + let ADDITIONAL_COMPUTED_FIELD_COUNT = 21 /** attitude + PID_SUM + PID_ERROR + RCCOMMAND_SCALED + GPS coord, distance, azimuth, trajectory tilt angle **/, that = this, logIndex = 0, logIndexes = new FlightLogIndex(logData), @@ -286,6 +286,7 @@ export function FlightLog(logData) { } if (!that.isFieldDisabled().GPS) { fieldNames.push("gpsCartesianCoords[0]", "gpsCartesianCoords[1]", "gpsCartesianCoords[2]", "gpsDistance", "gpsHomeAzimuth"); // GPS coords in cartesian system + fieldNames.push("gpsTrajectoryTiltAngle"); // trajectory tilt angle } fieldNameToIndex = {}; @@ -636,6 +637,11 @@ export function FlightLog(logData) { fieldNameToIndex["GPS_coord[1]"], fieldNameToIndex["GPS_altitude"], ]; + let gpsVelNED = [ + fieldNameToIndex["GPS_velned[0]"], + fieldNameToIndex["GPS_velned[1]"], + fieldNameToIndex["GPS_velned[2]"], + ]; const flightModeFlagsIndex = fieldNameToIndex["flightModeFlags"]; // This points to the flightmode data @@ -705,6 +711,9 @@ export function FlightLog(logData) { gpsCoord = false; } + if (!gpsVelNED[0]) { + gpsVelNED = false; + } sourceChunkIndex = 0; destChunkIndex = 0; @@ -877,7 +886,7 @@ export function FlightLog(logData) { } } - // Calculate cartesian coords by GPS + // Calculate cartesian coords, azimuth and trajectory tilt angle by GPS if (!that.isFieldDisabled().GPS) { if (gpsTransform && gpsCoord && srcFrame[gpsCoord[0]]) { const gpsCartesianCoords = gpsTransform.WGS_BS(srcFrame[gpsCoord[0]] / 10000000, srcFrame[gpsCoord[1]] / 10000000, srcFrame[gpsCoord[2]] / 10); @@ -898,6 +907,19 @@ export function FlightLog(logData) { destFrame[fieldIndex++] = 0; destFrame[fieldIndex++] = 0; } + + // Calculate trajectory tilt angle by NED GPS velocity + if (gpsVelNED) { + const Vn = srcFrame[gpsVelNED[0]], + Ve = srcFrame[gpsVelNED[1]], + Vd = srcFrame[gpsVelNED[2]]; + const velocity = Math.sqrt(Vn * Vn + Ve * Ve + Vd * Vd); + const minVelo = 1; + const trajectoryTiltAngle = velocity > minVelo ? -Math.asin(Vd / velocity) * 180.0 / Math.PI : 0; // [degree], if velo is up then >0 + destFrame[fieldIndex++] = trajectoryTiltAngle; + } else { + destFrame[fieldIndex++] = 0; + } } // Remove empty fields at the end From cd0eaa1e3c65ab56d8e52c504cb36786098176b3 Mon Sep 17 00:00:00 2001 From: demvlad Date: Wed, 17 Dec 2025 15:14:55 +0300 Subject: [PATCH 03/12] Added settings for computed GPS trajectory tilt angle field --- src/flightlog_fields_presenter.js | 2 ++ src/graph_config.js | 6 ++++++ 2 files changed, 8 insertions(+) diff --git a/src/flightlog_fields_presenter.js b/src/flightlog_fields_presenter.js index a97227d4..0908a95f 100644 --- a/src/flightlog_fields_presenter.js +++ b/src/flightlog_fields_presenter.js @@ -141,6 +141,7 @@ const FRIENDLY_FIELD_NAMES = { "gpsCartesianCoords[2]": "GPS Coords [Z]", gpsDistance: "GPS Home distance", gpsHomeAzimuth: "GPS Home azimuth", + gpsTrajectoryTiltAngle: "GPS Traject. tilt angle", }; const DEBUG_FRIENDLY_FIELD_NAMES_INITIAL = { @@ -1853,6 +1854,7 @@ FlightLogFieldPresenter.decodeFieldToFriendly = function ( case "gpsDistance": return `${value.toFixed(0)} m`; case "gpsHomeAzimuth": + case "gpsTrajectoryTiltAngle": return `${value.toFixed(1)} °`; case "magADC[0]": case "magADC[1]": diff --git a/src/graph_config.js b/src/graph_config.js index 14d71ef8..e9deba7f 100644 --- a/src/graph_config.js +++ b/src/graph_config.js @@ -490,6 +490,12 @@ GraphConfig.getDefaultCurveForField = function (flightLog, fieldName) { MinMax: { min: -25, max: 25, + } else if (fieldName == "gpsTrajectoryTiltAngle") { + return { + power: 1.0, + MinMax: { + min: -90, + max: 90, }, }; } else if (fieldName.match(/^debug.*/) && sysConfig.debug_mode != null) { From 7fea41190e6555c1ca09fd2a585eebd13d8600b8 Mon Sep 17 00:00:00 2001 From: demvlad Date: Wed, 17 Dec 2025 22:55:42 +0300 Subject: [PATCH 04/12] Resolved code error --- src/graph_config.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/graph_config.js b/src/graph_config.js index e9deba7f..eac4e5e7 100644 --- a/src/graph_config.js +++ b/src/graph_config.js @@ -490,6 +490,8 @@ GraphConfig.getDefaultCurveForField = function (flightLog, fieldName) { MinMax: { min: -25, max: 25, + } + } } else if (fieldName == "gpsTrajectoryTiltAngle") { return { power: 1.0, From 97f1531c8d5e3d4c1f211c79bbfd344d8062e233 Mon Sep 17 00:00:00 2001 From: demvlad Date: Thu, 18 Dec 2025 08:53:56 +0300 Subject: [PATCH 05/12] Added checking of asin argument into trajectory tilt angle formula --- src/flightlog.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/flightlog.js b/src/flightlog.js index 93b36f51..3c3b3e4a 100644 --- a/src/flightlog.js +++ b/src/flightlog.js @@ -914,8 +914,12 @@ export function FlightLog(logData) { Ve = srcFrame[gpsVelNED[1]], Vd = srcFrame[gpsVelNED[2]]; const velocity = Math.sqrt(Vn * Vn + Ve * Ve + Vd * Vd); - const minVelo = 1; - const trajectoryTiltAngle = velocity > minVelo ? -Math.asin(Vd / velocity) * 180.0 / Math.PI : 0; // [degree], if velo is up then >0 + const minVelo = 5; // 5cm/s limit to prevent division by zero and miss tiny noise values + let trajectoryTiltAngle = 0; + if (velocity > minVelo) { + const angleSin = Math.max(-1, Math.min(1, Vd / velocity)); + trajectoryTiltAngle = -Math.asin(angleSin) * 180.0 / Math.PI; // [degree], if velo is up then >0 + } destFrame[fieldIndex++] = trajectoryTiltAngle; } else { destFrame[fieldIndex++] = 0; From 5cb0221bc72f63a0f5a393795cc10fdeaf5e5eae Mon Sep 17 00:00:00 2001 From: demvlad Date: Thu, 18 Dec 2025 17:02:40 +0300 Subject: [PATCH 06/12] Resolved misssing comma --- src/graph_config.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/graph_config.js b/src/graph_config.js index eac4e5e7..4cdbda08 100644 --- a/src/graph_config.js +++ b/src/graph_config.js @@ -490,7 +490,7 @@ GraphConfig.getDefaultCurveForField = function (flightLog, fieldName) { MinMax: { min: -25, max: 25, - } + }, } } else if (fieldName == "gpsTrajectoryTiltAngle") { return { From e0fbe882a0916183bf0303cb9c1d2a433c16de79 Mon Sep 17 00:00:00 2001 From: demvlad Date: Thu, 18 Dec 2025 17:05:51 +0300 Subject: [PATCH 07/12] using Math.hypot(x, y, z) instead of Math.sqrt(x*x + y*y + z*z) --- src/flightlog.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/flightlog.js b/src/flightlog.js index 3c3b3e4a..f437332e 100644 --- a/src/flightlog.js +++ b/src/flightlog.js @@ -913,7 +913,7 @@ export function FlightLog(logData) { const Vn = srcFrame[gpsVelNED[0]], Ve = srcFrame[gpsVelNED[1]], Vd = srcFrame[gpsVelNED[2]]; - const velocity = Math.sqrt(Vn * Vn + Ve * Ve + Vd * Vd); + const velocity = Math.hypot(Vn, Ve, Vd); const minVelo = 5; // 5cm/s limit to prevent division by zero and miss tiny noise values let trajectoryTiltAngle = 0; if (velocity > minVelo) { From c398e3d2296e852c35aadbcf78b077334706e833 Mon Sep 17 00:00:00 2001 From: demvlad Date: Thu, 18 Dec 2025 17:09:44 +0300 Subject: [PATCH 08/12] List.push() call is optimized --- src/flightlog.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/flightlog.js b/src/flightlog.js index f437332e..fef106f0 100644 --- a/src/flightlog.js +++ b/src/flightlog.js @@ -285,8 +285,8 @@ export function FlightLog(logData) { fieldNames.push("axisError[0]", "axisError[1]", "axisError[2]"); // Custom calculated error field } if (!that.isFieldDisabled().GPS) { - fieldNames.push("gpsCartesianCoords[0]", "gpsCartesianCoords[1]", "gpsCartesianCoords[2]", "gpsDistance", "gpsHomeAzimuth"); // GPS coords in cartesian system - fieldNames.push("gpsTrajectoryTiltAngle"); // trajectory tilt angle + // GPS coords in cartesian system, trajectory tilt angle + fieldNames.push("gpsCartesianCoords[0]", "gpsCartesianCoords[1]", "gpsCartesianCoords[2]", "gpsDistance", "gpsHomeAzimuth", "gpsTrajectoryTiltAngle"); } fieldNameToIndex = {}; From 6d98479c763b948950c567e9481e6c839d8e3a7b Mon Sep 17 00:00:00 2001 From: demvlad Date: Thu, 18 Dec 2025 17:11:53 +0300 Subject: [PATCH 09/12] Deleted lessfull zero fraction in the number --- src/flightlog.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/flightlog.js b/src/flightlog.js index fef106f0..20ce60fa 100644 --- a/src/flightlog.js +++ b/src/flightlog.js @@ -918,7 +918,7 @@ export function FlightLog(logData) { let trajectoryTiltAngle = 0; if (velocity > minVelo) { const angleSin = Math.max(-1, Math.min(1, Vd / velocity)); - trajectoryTiltAngle = -Math.asin(angleSin) * 180.0 / Math.PI; // [degree], if velo is up then >0 + trajectoryTiltAngle = -Math.asin(angleSin) * 180 / Math.PI; // [degree], if velo is up then >0 } destFrame[fieldIndex++] = trajectoryTiltAngle; } else { From bffc31a97078239dc98a1903f413c98e74a2d36d Mon Sep 17 00:00:00 2001 From: demvlad Date: Thu, 18 Dec 2025 17:13:53 +0300 Subject: [PATCH 10/12] Added missing semicolon --- src/graph_config.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/graph_config.js b/src/graph_config.js index 4cdbda08..8d2f1ec7 100644 --- a/src/graph_config.js +++ b/src/graph_config.js @@ -491,7 +491,7 @@ GraphConfig.getDefaultCurveForField = function (flightLog, fieldName) { min: -25, max: 25, }, - } + }; } else if (fieldName == "gpsTrajectoryTiltAngle") { return { power: 1.0, From 96b3c7bbd94c86147bcde229122d02dc71097b3e Mon Sep 17 00:00:00 2001 From: demvlad Date: Thu, 18 Dec 2025 17:18:37 +0300 Subject: [PATCH 11/12] Deleted lessfull zero fraction in the number --- src/graph_config.js | 212 ++++++++++++++++++++++---------------------- 1 file changed, 106 insertions(+), 106 deletions(-) diff --git a/src/graph_config.js b/src/graph_config.js index 8d2f1ec7..0a72c2b2 100644 --- a/src/graph_config.js +++ b/src/graph_config.js @@ -285,7 +285,7 @@ GraphConfig.getDefaultCurveForField = function (flightLog, fieldName) { ), }; return { - power: 1.0, + power: 1, MinMax: mmChartUnits, }; }; @@ -310,11 +310,11 @@ GraphConfig.getDefaultCurveForField = function (flightLog, fieldName) { }; mmChartUnits.max = Math.max( Math.max(Math.abs(mmChartUnits.max), Math.abs(mmChartUnits.min)), - 1.0 + 1 ); mmChartUnits.min = -mmChartUnits.max; return { - power: 1.0, + power: 1, MinMax: mmChartUnits, }; }; @@ -340,7 +340,7 @@ GraphConfig.getDefaultCurveForField = function (flightLog, fieldName) { try { if (fieldName.match(/^motor\[/)) { return { - power: 1.0, + power: 1, MinMax: { min: 0, max: 100, @@ -359,7 +359,7 @@ GraphConfig.getDefaultCurveForField = function (flightLog, fieldName) { ); } else if (fieldName.match(/^servo\[/)) { return { - power: 1.0, + power: 1, MinMax: { min: 1000, max: 2000, @@ -367,7 +367,7 @@ GraphConfig.getDefaultCurveForField = function (flightLog, fieldName) { }; } else if (fieldName.match(/^accSmooth\[/)) { return { - power: 1.0, + power: 1, MinMax: { min: -16, max: 16, @@ -376,7 +376,7 @@ GraphConfig.getDefaultCurveForField = function (flightLog, fieldName) { } else if (fieldName == "rcCommands[3]") { // Throttle scaled return { - power: 1.0 /* Make this 1.0 to scale linearly */, + power: 1 /* Make this 1 to scale linearly */, MinMax: { min: 0, max: 100, @@ -389,7 +389,7 @@ GraphConfig.getDefaultCurveForField = function (flightLog, fieldName) { fieldName.match(/^gyroUnfilt\[/) ) { return { - power: 1.0, + power: 1, MinMax: { min: -maxDegreesSecond(gyroScaleMargin), max: maxDegreesSecond(gyroScaleMargin), @@ -397,7 +397,7 @@ GraphConfig.getDefaultCurveForField = function (flightLog, fieldName) { }; } else if (fieldName.match(/^axis.+\[/)) { return { - power: 1.0, + power: 1, MinMax: { min: -100, max: 100, @@ -406,7 +406,7 @@ GraphConfig.getDefaultCurveForField = function (flightLog, fieldName) { } else if (fieldName == "rcCommand[3]") { // Throttle return { - power: 1.0, + power: 1, MinMax: { min: 1000, max: 2000, @@ -414,7 +414,7 @@ GraphConfig.getDefaultCurveForField = function (flightLog, fieldName) { }; } else if (fieldName.match(/^rcCommand\[/)) { return { - power: 1.0, + power: 1, MinMax: { min: 1000, max: 2000, @@ -422,7 +422,7 @@ GraphConfig.getDefaultCurveForField = function (flightLog, fieldName) { }; } else if (fieldName == "heading[2]") { return { - power: 1.0, + power: 1, MinMax: { min: 0, max: 360, @@ -430,7 +430,7 @@ GraphConfig.getDefaultCurveForField = function (flightLog, fieldName) { }; } else if (fieldName.match(/^heading\[/)) { return { - power: 1.0, + power: 1, MinMax: { min: -180, max: 180, @@ -438,7 +438,7 @@ GraphConfig.getDefaultCurveForField = function (flightLog, fieldName) { }; } else if (fieldName.match(/^sonar.*/)) { return { - power: 1.0, + power: 1, MinMax: { min: 0, max: 400, @@ -446,7 +446,7 @@ GraphConfig.getDefaultCurveForField = function (flightLog, fieldName) { }; } else if (fieldName.match(/^rssi.*/)) { return { - power: 1.0, + power: 1, MinMax: { min: 0, max: 100, @@ -454,7 +454,7 @@ GraphConfig.getDefaultCurveForField = function (flightLog, fieldName) { }; } else if (fieldName == "GPS_ground_course") { return { - power: 1.0, + power: 1, MinMax: { min: 0, max: 360, @@ -462,7 +462,7 @@ GraphConfig.getDefaultCurveForField = function (flightLog, fieldName) { }; } else if (fieldName == "GPS_numSat") { return { - power: 1.0, + power: 1, MinMax: { min: 0, max: 40, @@ -470,7 +470,7 @@ GraphConfig.getDefaultCurveForField = function (flightLog, fieldName) { }; } else if (fieldName == "GPS_speed") { return { - power: 1.0, + power: 1, MinMax: { min: -100, max: 100, @@ -478,7 +478,7 @@ GraphConfig.getDefaultCurveForField = function (flightLog, fieldName) { }; } else if (fieldName == "gpsHomeAzimuth") { return { - power: 1.0, + power: 1, MinMax: { min: 0, max: 360, @@ -486,7 +486,7 @@ GraphConfig.getDefaultCurveForField = function (flightLog, fieldName) { }; } else if (fieldName.match(/^GPS_velned\[/)) { return { - power: 1.0, + power: 1, MinMax: { min: -25, max: 25, @@ -494,7 +494,7 @@ GraphConfig.getDefaultCurveForField = function (flightLog, fieldName) { }; } else if (fieldName == "gpsTrajectoryTiltAngle") { return { - power: 1.0, + power: 1, MinMax: { min: -90, max: 90, @@ -515,7 +515,7 @@ GraphConfig.getDefaultCurveForField = function (flightLog, fieldName) { }; default: return { - power: 1.0, + power: 1, MinMax: { min: 0, max: 2000, @@ -524,7 +524,7 @@ GraphConfig.getDefaultCurveForField = function (flightLog, fieldName) { } case "PIDLOOP": return { - power: 1.0, + power: 1, MinMax: { min: 0, max: 500, @@ -542,7 +542,7 @@ GraphConfig.getDefaultCurveForField = function (flightLog, fieldName) { case "AC_CORRECTION": case "AC_ERROR": return { - power: 1.0, + power: 1, MinMax: { min: -maxDegreesSecond(gyroScaleMargin), max: maxDegreesSecond(gyroScaleMargin), @@ -550,7 +550,7 @@ GraphConfig.getDefaultCurveForField = function (flightLog, fieldName) { }; case "ACCELEROMETER": return { - power: 1.0, + power: 1, MinMax: { min: -16, max: 16, @@ -558,7 +558,7 @@ GraphConfig.getDefaultCurveForField = function (flightLog, fieldName) { }; case "MIXER": return { - power: 1.0, + power: 1, MinMax: { min: -100, max: 100, @@ -568,7 +568,7 @@ GraphConfig.getDefaultCurveForField = function (flightLog, fieldName) { switch (fieldName) { case "debug[0]": //Raw Value (0-4095) return { - power: 1.0, + power: 1, MinMax: { min: 0, max: 4096, @@ -576,7 +576,7 @@ GraphConfig.getDefaultCurveForField = function (flightLog, fieldName) { }; default: return { - power: 1.0, + power: 1, MinMax: { min: 0, max: 26, @@ -599,7 +599,7 @@ GraphConfig.getDefaultCurveForField = function (flightLog, fieldName) { case "debug[3]": // throttle cutoff Hz case "debug[5]": // smoothed Rx Rate Hz, without steps return { - power: 1.0, + power: 1, MinMax: { min: 0, max: 1200, @@ -607,7 +607,7 @@ GraphConfig.getDefaultCurveForField = function (flightLog, fieldName) { }; case "debug[4]": // pt1K 0-1 return { - power: 1.0, + power: 1, MinMax: { min: 0, max: 1, @@ -616,7 +616,7 @@ GraphConfig.getDefaultCurveForField = function (flightLog, fieldName) { case "debug[6]": // outlier count 0-3 case "debug[7]": // valid count 0-3 return { - power: 1.0, + power: 1, MinMax: { min: 0, max: 50, // put them at the very bottom @@ -635,7 +635,7 @@ GraphConfig.getDefaultCurveForField = function (flightLog, fieldName) { } case "ANGLERATE": return { - power: 1.0, + power: 1, MinMax: { min: -maxDegreesSecond(gyroScaleMargin), max: maxDegreesSecond(gyroScaleMargin), @@ -645,7 +645,7 @@ GraphConfig.getDefaultCurveForField = function (flightLog, fieldName) { switch (fieldName) { case "debug[0]": // GPS Trust return { - power: 1.0, + power: 1, MinMax: { min: -200, max: 200, @@ -654,7 +654,7 @@ GraphConfig.getDefaultCurveForField = function (flightLog, fieldName) { case "debug[1]": // Baro Alt case "debug[2]": // GPS Alt return { - power: 1.0, + power: 1, MinMax: { min: -50, max: 50, @@ -662,7 +662,7 @@ GraphConfig.getDefaultCurveForField = function (flightLog, fieldName) { }; case "debug[3]": // vario return { - power: 1.0, + power: 1, MinMax: { min: -5, max: 5, @@ -677,7 +677,7 @@ GraphConfig.getDefaultCurveForField = function (flightLog, fieldName) { case "debug[1]": // post-dyn notch gyro [for gyro debug axis] case "debug[2]": // pre-dyn notch gyro downsampled for FFT [for gyro debug axis] return { - power: 1.0, + power: 1, MinMax: { min: -maxDegreesSecond(gyroScaleMargin), max: maxDegreesSecond(gyroScaleMargin), @@ -698,7 +698,7 @@ GraphConfig.getDefaultCurveForField = function (flightLog, fieldName) { ); case "debug[3]": // pre-dyn notch gyro [for gyro debug axis] return { - power: 1.0, + power: 1, MinMax: { min: -maxDegreesSecond(gyroScaleMargin), max: maxDegreesSecond(gyroScaleMargin), @@ -715,7 +715,7 @@ GraphConfig.getDefaultCurveForField = function (flightLog, fieldName) { case "debug[0]": // gyro scaled [for selected axis] case "debug[3]": // pre-dyn notch gyro [for selected axis] return { - power: 1.0, + power: 1, MinMax: { min: -maxDegreesSecond(gyroScaleMargin), max: maxDegreesSecond(gyroScaleMargin), @@ -726,7 +726,7 @@ GraphConfig.getDefaultCurveForField = function (flightLog, fieldName) { } case "FFT_TIME": return { - power: 1.0, + power: 1, MinMax: { min: -100, max: 100, @@ -766,7 +766,7 @@ GraphConfig.getDefaultCurveForField = function (flightLog, fieldName) { case "debug[1]": // AccelerationModified case "debug[2]": // Acceleration return { - power: 1.0, + power: 1, MinMax: { min: -1000, max: 1000, @@ -774,7 +774,7 @@ GraphConfig.getDefaultCurveForField = function (flightLog, fieldName) { }; case "debug[3]": // Clip or Count return { - power: 1.0, + power: 1, MinMax: { min: 0, max: 20, @@ -787,7 +787,7 @@ GraphConfig.getDefaultCurveForField = function (flightLog, fieldName) { switch (fieldName) { case "debug[0]": // in 4.3 is interpolated setpoint, now un-smoothed setpoint return { - power: 1.0, + power: 1, MinMax: { min: -maxDegreesSecond(gyroScaleMargin), max: maxDegreesSecond(gyroScaleMargin), @@ -796,7 +796,7 @@ GraphConfig.getDefaultCurveForField = function (flightLog, fieldName) { case "debug[1]": // feedforward delta element case "debug[2]": // feedforward boost element return { - power: 1.0, + power: 1, MinMax: { min: -200, max: 200, @@ -804,7 +804,7 @@ GraphConfig.getDefaultCurveForField = function (flightLog, fieldName) { }; case "debug[3]": // rcCommand deltaAbs return { - power: 1.0, + power: 1, MinMax: { min: 0, max: 100, @@ -812,7 +812,7 @@ GraphConfig.getDefaultCurveForField = function (flightLog, fieldName) { }; case "debug[4]": // Jitter Attenuator return { - power: 1.0, + power: 1, MinMax: { min: -100, max: 100, @@ -820,7 +820,7 @@ GraphConfig.getDefaultCurveForField = function (flightLog, fieldName) { }; case "debug[5]": // Packet Duplicate boolean return { - power: 1.0, + power: 1, MinMax: { min: 0, max: 10, @@ -829,7 +829,7 @@ GraphConfig.getDefaultCurveForField = function (flightLog, fieldName) { case "debug[6]": // Yaw feedforward case "debug[7]": // Yaw feedforward hold element return { - power: 1.0, + power: 1, MinMax: { min: -200, max: 200, @@ -843,7 +843,7 @@ GraphConfig.getDefaultCurveForField = function (flightLog, fieldName) { switch (fieldName) { case "debug[0]": // Jitter Attenuator return { - power: 1.0, + power: 1, MinMax: { min: -100, max: 100, @@ -852,7 +852,7 @@ GraphConfig.getDefaultCurveForField = function (flightLog, fieldName) { case "debug[1]": // Max setpoint rate for axis case "debug[2]": // Setpoint return { - power: 1.0, + power: 1, MinMax: { min: -maxDegreesSecond(gyroScaleMargin), max: maxDegreesSecond(gyroScaleMargin), @@ -862,7 +862,7 @@ GraphConfig.getDefaultCurveForField = function (flightLog, fieldName) { case "debug[4]": // setpoint speed unsmoothed case "debug[5]": // setpoint speed smoothed return { - power: 1.0, + power: 1, MinMax: { min: -200, max: 200, @@ -870,7 +870,7 @@ GraphConfig.getDefaultCurveForField = function (flightLog, fieldName) { }; case "debug[6]": // pt1K 0-1 return { - power: 1.0, + power: 1, MinMax: { min: 0, max: 1, @@ -878,7 +878,7 @@ GraphConfig.getDefaultCurveForField = function (flightLog, fieldName) { }; case "debug[7]": // smoothed Rx Rate Hz return { - power: 1.0, + power: 1, MinMax: { min: 0, max: 1200, @@ -891,7 +891,7 @@ GraphConfig.getDefaultCurveForField = function (flightLog, fieldName) { switch (fieldName) { case "debug[0]": // Baro state 0-10 return { - power: 1.0, + power: 1, MinMax: { min: -20, max: 20, @@ -901,7 +901,7 @@ GraphConfig.getDefaultCurveForField = function (flightLog, fieldName) { case "debug[2]": // Baro Raw case "debug[3]": // Baro smoothed return { - power: 1.0, + power: 1, MinMax: { min: -200, max: 200, @@ -915,7 +915,7 @@ GraphConfig.getDefaultCurveForField = function (flightLog, fieldName) { case "debug[0]": // Throttle P uS added case "debug[1]": // Throttle D uS added return { - power: 1.0, + power: 1, MinMax: { min: -200, max: 200, @@ -924,7 +924,7 @@ GraphConfig.getDefaultCurveForField = function (flightLog, fieldName) { case "debug[2]": // Altitude case "debug[3]": // Target Altitude return { - power: 1.0, + power: 1, MinMax: { min: -50, max: 50, @@ -939,7 +939,7 @@ GraphConfig.getDefaultCurveForField = function (flightLog, fieldName) { case "debug[1]": // in 4.3 is dyn idle I case "debug[2]": // in 4.3 is dyn idle D return { - power: 1.0, + power: 1, MinMax: { min: -1000, max: 1000, @@ -947,7 +947,7 @@ GraphConfig.getDefaultCurveForField = function (flightLog, fieldName) { }; case "debug[3]": // in 4.3 and 4.2 is minRPS return { - power: 1.0, + power: 1, MinMax: { min: 0, max: 12000, @@ -963,7 +963,7 @@ GraphConfig.getDefaultCurveForField = function (flightLog, fieldName) { case "debug[2]": // After RPM case "debug[3]": // After all but Dyn Notch return { - power: 1.0, + power: 1, MinMax: { min: -maxDegreesSecond(gyroScaleMargin * highResolutionScale), max: maxDegreesSecond(gyroScaleMargin * highResolutionScale), @@ -979,7 +979,7 @@ GraphConfig.getDefaultCurveForField = function (flightLog, fieldName) { case "debug[3]": // constrained interval in ms return { // start at bottom, scale up to 30ms - power: 1.0, + power: 1, MinMax: { min: 0, max: 30, @@ -988,7 +988,7 @@ GraphConfig.getDefaultCurveForField = function (flightLog, fieldName) { case "debug[2]": // IsRateValid boolean case "debug[7]": // isReceivingSignal boolean return { - power: 1.0, + power: 1, MinMax: { min: 0, max: 10, @@ -997,7 +997,7 @@ GraphConfig.getDefaultCurveForField = function (flightLog, fieldName) { case "debug[4]": // Rx Rate case "debug[5]": // Smoothed Rx Rate return { - power: 1.0, + power: 1, MinMax: { min: 0, max: 1200, @@ -1005,7 +1005,7 @@ GraphConfig.getDefaultCurveForField = function (flightLog, fieldName) { }; case "debug[6]": // LQ return { - power: 1.0, + power: 1, MinMax: { min: 0, max: 100, @@ -1021,7 +1021,7 @@ GraphConfig.getDefaultCurveForField = function (flightLog, fieldName) { return getCurveForMinMaxFieldsZeroOffset(fieldName); case "debug[2]": // RSSI return { - power: 1.0, + power: 1, MinMax: { min: -256, max: 0, @@ -1029,7 +1029,7 @@ GraphConfig.getDefaultCurveForField = function (flightLog, fieldName) { }; case "debug[3]": // LQ percent return { - power: 1.0, + power: 1, MinMax: { min: 0, max: 100, @@ -1042,7 +1042,7 @@ GraphConfig.getDefaultCurveForField = function (flightLog, fieldName) { switch (fieldName) { case "debug[0]": // Gyro task cycle us * 10 so 1250 = 125us return { - power: 1.0, + power: 1, MinMax: { min: 0, max: 1000, @@ -1051,7 +1051,7 @@ GraphConfig.getDefaultCurveForField = function (flightLog, fieldName) { case "debug[1]": // ID of late task case "debug[2]": // task delay time 100us in middle return { - power: 1.0, + power: 1, MinMax: { min: 0, max: 200, @@ -1059,7 +1059,7 @@ GraphConfig.getDefaultCurveForField = function (flightLog, fieldName) { }; case "debug[3]": // gyro skew 100 = 10us return { - power: 1.0, + power: 1, MinMax: { min: -50, max: 50, @@ -1073,7 +1073,7 @@ GraphConfig.getDefaultCurveForField = function (flightLog, fieldName) { case "debug[0]": // % CPU Busy case "debug[1]": // late tasks per second return { - power: 1.0, + power: 1, MinMax: { min: 0, max: 100, @@ -1081,7 +1081,7 @@ GraphConfig.getDefaultCurveForField = function (flightLog, fieldName) { }; case "debug[2]": // total delay in last second return { - power: 1.0, + power: 1, MinMax: { min: 0, max: 100, @@ -1089,7 +1089,7 @@ GraphConfig.getDefaultCurveForField = function (flightLog, fieldName) { }; case "debug[3]": // total tasks per second return { - power: 1.0, + power: 1, MinMax: { min: 0, max: 10000, @@ -1102,7 +1102,7 @@ GraphConfig.getDefaultCurveForField = function (flightLog, fieldName) { switch (fieldName) { case "debug[2]": // Uplink LQ return { - power: 1.0, + power: 1, MinMax: { min: 0, max: 100, @@ -1129,7 +1129,7 @@ GraphConfig.getDefaultCurveForField = function (flightLog, fieldName) { case "debug[0]": // Pitch P deg * 100 case "debug[1]": // Pitch D deg * 100 return { - power: 1.0, + power: 1, MinMax: { min: -20, max: 20, @@ -1138,7 +1138,7 @@ GraphConfig.getDefaultCurveForField = function (flightLog, fieldName) { case "debug[2]": // Velocity in cm/s case "debug[3]": // Velocity to home in cm/s return { - power: 1.0, + power: 1, MinMax: { min: -5, max: 5, @@ -1151,7 +1151,7 @@ GraphConfig.getDefaultCurveForField = function (flightLog, fieldName) { switch (fieldName) { case "debug[0]": // Groundspeed cm/s return { - power: 1.0, + power: 1, MinMax: { min: -100, max: 100, @@ -1162,7 +1162,7 @@ GraphConfig.getDefaultCurveForField = function (flightLog, fieldName) { case "debug[3]": // Angle to home * 10 case "debug[4]": // magYaw * 10 return { - power: 1.0, + power: 1, MinMax: { min: 0, max: 360, @@ -1170,7 +1170,7 @@ GraphConfig.getDefaultCurveForField = function (flightLog, fieldName) { }; case "debug[5]": // magYaw * 10 return { - power: 1.0, + power: 1, MinMax: { min: 0, max: 20, @@ -1178,7 +1178,7 @@ GraphConfig.getDefaultCurveForField = function (flightLog, fieldName) { }; case "debug[6]": // roll angle *100 return { - power: 1.0, + power: 1, MinMax: { min: 0, max: 180, @@ -1186,7 +1186,7 @@ GraphConfig.getDefaultCurveForField = function (flightLog, fieldName) { }; case "debug[7]": // yaw rate deg/s return { - power: 1.0, + power: 1, MinMax: { min: 0, max: 200, @@ -1199,7 +1199,7 @@ GraphConfig.getDefaultCurveForField = function (flightLog, fieldName) { switch (fieldName) { case "debug[0]": // Pitch angle, deg * 100 return { - power: 1.0, + power: 1, MinMax: { min: -4000, max: 4000, @@ -1208,7 +1208,7 @@ GraphConfig.getDefaultCurveForField = function (flightLog, fieldName) { case "debug[1]": // Rescue Phase case "debug[2]": // Failure code return { - power: 1.0, + power: 1, MinMax: { min: 0, max: 20, @@ -1216,7 +1216,7 @@ GraphConfig.getDefaultCurveForField = function (flightLog, fieldName) { }; case "debug[3]": // Failure counters coded return { - power: 1.0, + power: 1, MinMax: { min: 0, max: 4000, @@ -1230,7 +1230,7 @@ GraphConfig.getDefaultCurveForField = function (flightLog, fieldName) { case "debug[0]": // velocity to home cm/s case "debug[1]": // target velocity cm/s return { - power: 1.0, + power: 1, MinMax: { min: -10, max: 10, @@ -1239,7 +1239,7 @@ GraphConfig.getDefaultCurveForField = function (flightLog, fieldName) { case "debug[2]": // altitude m case "debug[3]": // Target altitude m return { - power: 1.0, + power: 1, MinMax: { min: -50, max: 50, @@ -1253,7 +1253,7 @@ GraphConfig.getDefaultCurveForField = function (flightLog, fieldName) { case "debug[0]": // GPS flight model case "debug[1]": // Nav Data interval return { - power: 1.0, + power: 1, MinMax: { min: -200, max: 200, @@ -1261,7 +1261,7 @@ GraphConfig.getDefaultCurveForField = function (flightLog, fieldName) { }; case "debug[2]": // task interval return { - power: 1.0, + power: 1, MinMax: { min: -200, max: 200, @@ -1272,7 +1272,7 @@ GraphConfig.getDefaultCurveForField = function (flightLog, fieldName) { return getCurveForMinMaxFields(fieldName); case "debug[5]": // ExecuteTimeUs return { - power: 1.0, + power: 1, MinMax: { min: -100, max: 100, @@ -1280,7 +1280,7 @@ GraphConfig.getDefaultCurveForField = function (flightLog, fieldName) { }; case "debug[6]": // ackState return { - power: 1.0, + power: 1, MinMax: { min: -10, max: 10, @@ -1288,7 +1288,7 @@ GraphConfig.getDefaultCurveForField = function (flightLog, fieldName) { }; case "debug[7]": // Incoming buffer return { - power: 1.0, + power: 1, MinMax: { min: -100, max: 100, @@ -1304,7 +1304,7 @@ GraphConfig.getDefaultCurveForField = function (flightLog, fieldName) { case "debug[2]": // hDOP case "debug[3]": // vDOP return { - power: 1.0, + power: 1, MinMax: { min: -200, max: 200, @@ -1320,7 +1320,7 @@ GraphConfig.getDefaultCurveForField = function (flightLog, fieldName) { case "debug[2]": case "debug[3]": return { - power: 1.0, + power: 1, MinMax: { min: -200, max: 200, @@ -1334,7 +1334,7 @@ GraphConfig.getDefaultCurveForField = function (flightLog, fieldName) { case "debug[0]": // angle target case "debug[3]": // angle achieved return { - power: 1.0, + power: 1, MinMax: { min: -100, max: 100, @@ -1343,7 +1343,7 @@ GraphConfig.getDefaultCurveForField = function (flightLog, fieldName) { case "debug[1]": // angle error correction case "debug[2]": // angle feedforward return { - power: 1.0, + power: 1, MinMax: { min: -500, max: 500, @@ -1359,7 +1359,7 @@ GraphConfig.getDefaultCurveForField = function (flightLog, fieldName) { case "debug[2]": case "debug[3]": return { - power: 1.0, + power: 1, MinMax: { min: -200, max: 200, @@ -1375,7 +1375,7 @@ GraphConfig.getDefaultCurveForField = function (flightLog, fieldName) { case "debug[2]": // Z case "debug[3]": // Field return { - power: 1.0, + power: 1, MinMax: { min: -2000, max: 2000, @@ -1385,7 +1385,7 @@ GraphConfig.getDefaultCurveForField = function (flightLog, fieldName) { case "debug[5]": // Y Cal case "debug[6]": // Z Cal return { - power: 1.0, + power: 1, MinMax: { min: -500, max: 500, @@ -1393,7 +1393,7 @@ GraphConfig.getDefaultCurveForField = function (flightLog, fieldName) { }; case "debug[7]": // Lambda return { - power: 1.0, + power: 1, MinMax: { min: 0, max: 4000, @@ -1407,7 +1407,7 @@ GraphConfig.getDefaultCurveForField = function (flightLog, fieldName) { case "debug[0]": // Task Rate case "debug[1]": // Data Rate return { - power: 1.0, + power: 1, MinMax: { min: -1000, max: 1000, @@ -1415,7 +1415,7 @@ GraphConfig.getDefaultCurveForField = function (flightLog, fieldName) { }; case "debug[2]": // Data Interval return { - power: 1.0, + power: 1, MinMax: { min: -10000, max: 10000, @@ -1423,7 +1423,7 @@ GraphConfig.getDefaultCurveForField = function (flightLog, fieldName) { }; case "debug[3]": // Execute Time return { - power: 1.0, + power: 1, MinMax: { min: -20, max: 20, @@ -1432,7 +1432,7 @@ GraphConfig.getDefaultCurveForField = function (flightLog, fieldName) { case "debug[4]": // Bus Busy Check case "debug[5]": // Read State Check return { - power: 1.0, + power: 1, MinMax: { min: -2, max: 2, @@ -1440,7 +1440,7 @@ GraphConfig.getDefaultCurveForField = function (flightLog, fieldName) { }; case "debug[6]": // Time since previous task uS return { - power: 1.0, + power: 1, MinMax: { min: -10000, max: 10000, @@ -1452,16 +1452,16 @@ GraphConfig.getDefaultCurveForField = function (flightLog, fieldName) { case "EZLANDING": return { offset: -5000, - power: 1.0, + power: 1, inputRange: 5000, - outputRange: 1.0, + outputRange: 1, }; case "ATTITUDE": switch (fieldName) { case "debug[0]": // Roll angle case "debug[1]": // Pitch angle return { - power: 1.0, + power: 1, MinMax: { min: -180, max: 180, @@ -1504,7 +1504,7 @@ GraphConfig.getDefaultCurveForField = function (flightLog, fieldName) { return getCurveForMinMaxFields(fieldName); } catch (e) { return { - power: 1.0, + power: 1, MinMax: { min: -500, max: 500, From 324105946659ad7eff2067be023bfe15a27dce74 Mon Sep 17 00:00:00 2001 From: demvlad Date: Thu, 18 Dec 2025 17:25:33 +0300 Subject: [PATCH 12/12] Trajectory tilt angle is added into GPS charts template --- src/graph_config.js | 1 + 1 file changed, 1 insertion(+) diff --git a/src/graph_config.js b/src/graph_config.js index 0a72c2b2..4168515a 100644 --- a/src/graph_config.js +++ b/src/graph_config.js @@ -1708,6 +1708,7 @@ GraphConfig.getExampleGraphConfigs = function (flightLog, graphNames) { "GPS_altitude", "GPS_speed", "GPS_ground_course", + "gpsTrajectoryTiltAngle", "GPS_coord[all]", ], });