Skip to content

Commit 721ad97

Browse files
authored
Merge pull request #90 from spatzengr/NAV_Tracking_Scaling_Tweaks
Trace Scaling Tweaks
2 parents 2766a71 + dcac467 commit 721ad97

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

js/graph_config.js

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -278,14 +278,14 @@ GraphConfig.load = function(config) {
278278
return {
279279
offset: 0,
280280
power: 0.25, /* Make this 1.0 to scale linearly */
281-
inputRange: (2.0e-3 * Math.PI/180) / sysConfig.gyroScale, //scales based on max deg/s logged
281+
inputRange: Math.max(250, (2.0e-3 * Math.PI/180) / sysConfig.gyroScale), //scales based on max deg/s logged
282282
outputRange: 1.0
283283
};
284284
} else if (fieldName.match(/^gyroRaw\[/)) {
285285
return {
286286
offset: 0,
287287
power: 0.25, /* Make this 1.0 to scale linearly */
288-
inputRange: (2.0e-3 * Math.PI/180) / sysConfig.gyroScale, //scales based on max deg/s logged
288+
inputRange: Math.max(250, (2.0e-3 * Math.PI/180) / sysConfig.gyroScale), //scales based on max deg/s logged
289289
outputRange: 1.0
290290
};
291291
} else if (fieldName.match(/^accSmooth\[/)) {
@@ -306,7 +306,7 @@ GraphConfig.load = function(config) {
306306
return {
307307
offset: 0,
308308
power: 0.25,
309-
inputRange: (2.0e-3 * Math.PI/180) / sysConfig.gyroScale, //scales based on max deg/s logged
309+
inputRange: Math.max(250, (2.0e-3 * Math.PI/180) / sysConfig.gyroScale), //scales based on max deg/s logged
310310
outputRange: 1.0
311311
};
312312
} else if (fieldName == "rcCommand[3]") { // Throttle
@@ -333,7 +333,7 @@ GraphConfig.load = function(config) {
333333
//Roll NAV position data
334334
} else if (fieldName.match(/^navPos\[0/) ||
335335
fieldName.match(/^navTgtPos\[0/)) {
336-
var minMaxValues = getMinMax("navTgtPos[0]");
336+
var minMaxValues = getMinMax("navPos[0]");
337337
return {
338338
offset: minMaxValues.offset,
339339
power: minMaxValues.power,
@@ -351,7 +351,7 @@ GraphConfig.load = function(config) {
351351
};
352352
} else if (fieldName.match(/^mcVelAxis.*\[0/) ||
353353
fieldName.match(/^mcPosAxis.*\[0/)) {
354-
var minMaxValues = getMinMax("mcVelAxisP[0]");
354+
var minMaxValues = getMinMax("mcVelAxisOut[0]");
355355
return {
356356
offset: 0,
357357
power: minMaxValues.power,
@@ -361,7 +361,7 @@ GraphConfig.load = function(config) {
361361
//Pitch NAV position data
362362
} else if (fieldName.match(/^navPos\[1/) ||
363363
fieldName.match(/^navTgtPos\[1/)) {
364-
var minMaxValues = getMinMax("navTgtPos[1]");
364+
var minMaxValues = getMinMax("navPos[1]");
365365
return {
366366
offset: minMaxValues.offset,
367367
power: minMaxValues.power,
@@ -379,7 +379,7 @@ GraphConfig.load = function(config) {
379379
};
380380
} else if (fieldName.match(/^mcVelAxis.*\[1/) ||
381381
fieldName.match(/^mcPosAxis.*\[1/)) {
382-
var minMaxValues = getMinMax("mcVelAxisP[1]");
382+
var minMaxValues = getMinMax("mcVelAxisOut[1]");
383383
return {
384384
offset: 0,
385385
power: minMaxValues.power,
@@ -408,11 +408,11 @@ GraphConfig.load = function(config) {
408408
};
409409
} else if (fieldName.match(/^mcVelAxis.*\[2/) ||
410410
fieldName.match(/^mcPosAxis.*\[2/)) {
411-
var minMaxValues = getMinMax("mcVelAxisP[2]");
411+
var minMaxValues = getMinMax("mcVelAxisOut[2]");
412412
return {
413413
offset: 0,
414414
power: minMaxValues.power,
415-
inputRange: minMaxValues.inputRange,
415+
inputRange: minMaxValues.inputRange * 1.75,
416416
outputRange: minMaxValues.outputRange,
417417
};
418418
} else if (fieldName.match(/^debug.*/) && sysConfig.debug_mode!=null) {

0 commit comments

Comments
 (0)