Please Note This forum exists for community support for the Mango product family and the Radix IoT Platform. Although Radix IoT employees participate in this forum from time to time, there is no guarantee of a response to anything posted here, nor can Radix IoT, LLC guarantee the accuracy of any information expressed or conveyed. Specific project questions from customers with active support contracts are asked to send requests to support@radixiot.com.

Radix IoT Website Mango 3 Documentation Website Mango 4 Documentation Website

How to Change the time from a timezone to mission time?


  • I.e. I want to have the time to be plotted from 0 to t seconds.


  • Hi shirinig, welcome to the forum!

    Can you say a little more about what you're asking? To me, it sounds like you're asking if it's possible to chart the X-axis as "seconds since the start of the chart" instead of complete dates, but it is unclear.


  • Hi Phildunlap,

    Sorry for the confusion. You are 100% on the spot, that is exactly what I am asking.


  • No worries. It is generally best to say more than one sentence, though, even if you're only saying the same thing twice in two different ways, since it may be more obvious in another phrasing.

    I did not run this solution to its end, but I think what I would do is create a new filter in a userModule to decorate a point values list with its seconds since the period start and then copy the serialChart.js directive to create another serialMissionChart.js such that you could change references from "timestamp" to "secondsFromStart" and configure the X-axis formatting options such that it doesn't attempt to parse them into dates for you.

    Here's a filter defined in a user module to decorate a point values list with time since period start,

    define(['angular', 'require'], function(angular, require) {
    'use strict';
    
    var userModule = angular.module('userModule', ['maUiApp']);
    
    userModule.filter('timeFilter', function() {return function(pointValueList) {
        if(typeof pointValueList === 'undefined' || typeof pointValueList.length !== 'number')
            return pointValueList;
        for(var k = 0; k < pointValueList.length; k+=1) {
            pointValueList[k].secondsFromStart = Math.round((pointValueList[k].timestamp - pointValueList[0].timestamp)/1000);
        }
        return pointValueList;
    };
    });
    
    return userModule;
    
    }); // define
    

    Hope that helps!


  • Hi Phildunlap,

    I have an update. The mission time is being received through serial communication and is saved as a data point. How can I use that to configure the axis?