Skip to content

Commit 499e966

Browse files
Plotly: remove title of x axis
1 parent 6796eb9 commit 499e966

File tree

4 files changed

+21
-22
lines changed

4 files changed

+21
-22
lines changed

src/components/Plotly.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -653,7 +653,7 @@ export default {
653653
plotOptions.xaxis = {
654654
rangeslider: {},
655655
domain: this.calculateXAxisDomain(),
656-
title: 'time_boot (ms)',
656+
title: ' ',
657657
tickformat: ':04,2f'
658658
}
659659
if (this.plotInstance !== null) {

src/tools/dataflashDataExtractor.js

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -260,15 +260,15 @@ export class DataflashDataExtractor {
260260
}
261261
trajectory.push(
262262
[
263-
gpsData.Lng[i] / 1e7,
264-
gpsData.Lat[i] / 1e7,
263+
gpsData.Lng[i],
264+
gpsData.Lat[i],
265265
gpsData.Alt[i] - startAltitude,
266266
gpsData.time_boot_ms[i]
267267
]
268268
)
269269
timeTrajectory[gpsData.time_boot_ms[i]] = [
270-
gpsData.Lng[i] / 1e7,
271-
gpsData.Lat[i] / 1e7,
270+
gpsData.Lng[i],
271+
gpsData.Lat[i],
272272
(gpsData.Alt[i] - startAltitude) / 1000,
273273
gpsData.time_boot_ms[i]]
274274
}
@@ -293,15 +293,15 @@ export class DataflashDataExtractor {
293293
}
294294
trajectory.push(
295295
[
296-
gpsData.Lng[i] * 1e-7,
297-
gpsData.Lat[i] * 1e-7,
296+
gpsData.Lng[i],
297+
gpsData.Lat[i],
298298
gpsData.Alt[i] - startAltitude,
299299
gpsData.time_boot_ms[i]
300300
]
301301
)
302302
timeTrajectory[gpsData.time_boot_ms[i]] = [
303-
gpsData.Lng[i] * 1e-7,
304-
gpsData.Lat[i] * 1e-7,
303+
gpsData.Lng[i],
304+
gpsData.Lat[i],
305305
(gpsData.Alt[i] - startAltitude) / 1000,
306306
gpsData.time_boot_ms[i]]
307307
}
@@ -326,15 +326,15 @@ export class DataflashDataExtractor {
326326
}
327327
trajectory.push(
328328
[
329-
gpsData.Lng[i] / 1e7,
330-
gpsData.Lat[i] / 1e7,
329+
gpsData.Lng[i],
330+
gpsData.Lat[i],
331331
gpsData.Alt[i] - startAltitude,
332332
gpsData.time_boot_ms[i]
333333
]
334334
)
335335
timeTrajectory[gpsData.time_boot_ms[i]] = [
336-
gpsData.Lng[i] / 1e7,
337-
gpsData.Lat[i] / 1e7,
336+
gpsData.Lng[i],
337+
gpsData.Lat[i],
338338
gpsData.Alt[i] - startAltitude,
339339
gpsData.time_boot_ms[i]]
340340
}

src/tools/parsers/dataflashParser.js

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -563,13 +563,12 @@ export class DataflashParser {
563563
fixDataOnce (name) {
564564
if (['GPS', 'ATT', 'AHR2', 'MODE'].indexOf(name) === -1) {
565565
if (this.messageTypes.hasOwnProperty(name)) {
566-
let fields = this.messages[name][0].fieldnames
566+
let fields = this.messageTypes[name].complexFields
567567
if (this.messageTypes[name].hasOwnProperty('multipliers')) {
568-
for (let message in this.messages[name]) {
569-
for (let i = 1; i < fields.length; i++) {
570-
let fieldname = fields[i]
571-
if (!isNaN(this.messageTypes[name].multipliers[i])) {
572-
this.messages[name][message][fieldname] *= this.messageTypes[name].multipliers[i]
568+
for (let [fieldname, field] of Object.entries(fields)) {
569+
if (!isNaN(field.multiplier) && field.multiplier !== 0) {
570+
for (let i = 0; i < this.messages[name].length; i++) {
571+
this.messages[name][i][fieldname] *= field.multiplier
573572
}
574573
}
575574
}
@@ -668,15 +667,15 @@ export class DataflashParser {
668667
messageTypes[msg.Name + '[' + instance + ']'] = {
669668
expressions: fields,
670669
units: msg.units,
671-
multipiers: msg.multipliers,
670+
multipliers: msg.multipliers,
672671
complexFields: complexFields
673672
}
674673
}
675674
} else {
676675
messageTypes[msg.Name] = {
677676
expressions: fields,
678677
units: msg.units,
679-
multipiers: msg.multipliers,
678+
multipliers: msg.multipliers,
680679
complexFields: complexFields
681680
}
682681
}

src/tools/parsers/mavlinkParser.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -296,7 +296,7 @@ export class MavlinkParser {
296296
messageTypes[msg] = {
297297
expressions: fields,
298298
units: null,
299-
multipiers: null,
299+
multipliers: null,
300300
complexFields: complexFields
301301
}
302302
}

0 commit comments

Comments
 (0)