Skip to content

Commit

Permalink
Merge pull request #90 from spatzengr/NAV_Tracking_Scaling_Tweaks
Browse files Browse the repository at this point in the history
Trace Scaling Tweaks
  • Loading branch information
DzikuVx authored Dec 4, 2023
2 parents 2766a71 + dcac467 commit 721ad97
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions js/graph_config.js
Original file line number Diff line number Diff line change
Expand Up @@ -278,14 +278,14 @@ GraphConfig.load = function(config) {
return {
offset: 0,
power: 0.25, /* Make this 1.0 to scale linearly */
inputRange: (2.0e-3 * Math.PI/180) / sysConfig.gyroScale, //scales based on max deg/s logged
inputRange: Math.max(250, (2.0e-3 * Math.PI/180) / sysConfig.gyroScale), //scales based on max deg/s logged
outputRange: 1.0
};
} else if (fieldName.match(/^gyroRaw\[/)) {
return {
offset: 0,
power: 0.25, /* Make this 1.0 to scale linearly */
inputRange: (2.0e-3 * Math.PI/180) / sysConfig.gyroScale, //scales based on max deg/s logged
inputRange: Math.max(250, (2.0e-3 * Math.PI/180) / sysConfig.gyroScale), //scales based on max deg/s logged
outputRange: 1.0
};
} else if (fieldName.match(/^accSmooth\[/)) {
Expand All @@ -306,7 +306,7 @@ GraphConfig.load = function(config) {
return {
offset: 0,
power: 0.25,
inputRange: (2.0e-3 * Math.PI/180) / sysConfig.gyroScale, //scales based on max deg/s logged
inputRange: Math.max(250, (2.0e-3 * Math.PI/180) / sysConfig.gyroScale), //scales based on max deg/s logged
outputRange: 1.0
};
} else if (fieldName == "rcCommand[3]") { // Throttle
Expand All @@ -333,7 +333,7 @@ GraphConfig.load = function(config) {
//Roll NAV position data
} else if (fieldName.match(/^navPos\[0/) ||
fieldName.match(/^navTgtPos\[0/)) {
var minMaxValues = getMinMax("navTgtPos[0]");
var minMaxValues = getMinMax("navPos[0]");
return {
offset: minMaxValues.offset,
power: minMaxValues.power,
Expand All @@ -351,7 +351,7 @@ GraphConfig.load = function(config) {
};
} else if (fieldName.match(/^mcVelAxis.*\[0/) ||
fieldName.match(/^mcPosAxis.*\[0/)) {
var minMaxValues = getMinMax("mcVelAxisP[0]");
var minMaxValues = getMinMax("mcVelAxisOut[0]");
return {
offset: 0,
power: minMaxValues.power,
Expand All @@ -361,7 +361,7 @@ GraphConfig.load = function(config) {
//Pitch NAV position data
} else if (fieldName.match(/^navPos\[1/) ||
fieldName.match(/^navTgtPos\[1/)) {
var minMaxValues = getMinMax("navTgtPos[1]");
var minMaxValues = getMinMax("navPos[1]");
return {
offset: minMaxValues.offset,
power: minMaxValues.power,
Expand All @@ -379,7 +379,7 @@ GraphConfig.load = function(config) {
};
} else if (fieldName.match(/^mcVelAxis.*\[1/) ||
fieldName.match(/^mcPosAxis.*\[1/)) {
var minMaxValues = getMinMax("mcVelAxisP[1]");
var minMaxValues = getMinMax("mcVelAxisOut[1]");
return {
offset: 0,
power: minMaxValues.power,
Expand Down Expand Up @@ -408,11 +408,11 @@ GraphConfig.load = function(config) {
};
} else if (fieldName.match(/^mcVelAxis.*\[2/) ||
fieldName.match(/^mcPosAxis.*\[2/)) {
var minMaxValues = getMinMax("mcVelAxisP[2]");
var minMaxValues = getMinMax("mcVelAxisOut[2]");
return {
offset: 0,
power: minMaxValues.power,
inputRange: minMaxValues.inputRange,
inputRange: minMaxValues.inputRange * 1.75,
outputRange: minMaxValues.outputRange,
};
} else if (fieldName.match(/^debug.*/) && sysConfig.debug_mode!=null) {
Expand Down

0 comments on commit 721ad97

Please sign in to comment.