Different Format For Day/Time, Same Graph

Welcome to our Forums Technical Support Support Desk Different Format For Day/Time, Same Graph

  • This topic has 6 replies, 2 voices, and was last updated 3 years ago by charles phillips.
Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #5845
    charles phillips
    Participant

      While plotting different sets of data from different sources, they show the day/time as different formats. Format 1 is something that Dr Schultz showed me how to fix:

      ISON 37600
      1 90097U 14792A 20053.97364317 0.00010000 00000-0 12171+1 0 04
      2 90097 4.6647 207.5705 5370588 208.3620 151.6377 4.02772767 09

      This is an orbit from a Russian source, ISON is a satellite tracking system. This is object 90097 and the time of this set of numbers is 20053.9736 etc. So 2020, day 053, time is 0.9736 of a day. I have that working great.

      Another format from another source:

      1288, 62501,31012017,26012021 003745, 2, 24196.2, 21.067, 70.006,0.720945,359.9,114.478,5.39e-03, 10.9, 0.1, 1

      This is object 62501 (a different object), tracked on 2021, month 01, day 26 time 0.0037…

      I have a C++ application that takes both of these and generates perigee and apogee (low and high point of orbit) which I graph. It also does some things like add satellite number when needed, etc.

      So in my DG file I have two Dates – RawDate which converts to YYYY/MM/DD and ISONDate which is DD/MM/YYYY and then I have apogee and perigee. So I have two Date columns (becomes the X axis). Should I convert RawDate to DD/MM/YYYY or could I get Datagraph to transform that into YYYY/MM/DD? I have looked at some other questions about converting dates and there is a lot of flexibility but which path to go down?

      41941 Perigee

      #5885
      dgteam
      Moderator

        Hello Charles!

        The new data appears to be comma separated.  Thus, it looks like you can easily isolate the time data into one column.  Set the format for that column to a date format and use a format string to let DataGraph know how to interpret each digit in the column.

        Here is a test using a date format with the following options:

        Type = ‘ICU format’

        Format = ‘ddMMyyyy SSSSS’

        date1

        Note that ‘S’ is the format string for a fractional second and it will truncate at three digits.  All possible string format options are documented here: ICU Date/Time format.

        I plotted the Value column using the date column and it plots as it should!

        date2

        It does not matter that the format is set up differently for different columns, as long as the format it set to a date format and the options are setup correctly, you should be fine to plot the data together.

        Does this help?

        #5887
        charles phillips
        Participant

          That is a great improvement over my attempts, I had discarded the decimal day part (it is not really needed but using it is a more elegant solution) and that does a better job. Let me work on this a bit and get back to you.

           

          #6244
          charles phillips
          Participant

            I have just gotten back to this and it seems like a simple question but …

            The issue is the ,26012021 003745, part. I read a file and read 26012021 and 003745 as two variables and the space is driving me nuts. I tried to read a string in C++ but the space seems to be seen as white space and stops the reading of the string. I hack around at code but I am not a coder.

            In DataGraph, what I would like to do is find out how to take two columns and put them together, so the combined column would be 26012021 003745 with the space or even 26012021003745 without the space. I looked in the documentation and maybe I missed how to do that? I can read both of those numbers and output them but that space is still giving me fits. Once I have the numbers in a column I should be ok. The 003745 part is not really important, the most a value could be off is 24 hours out of 2 weeks but I’d like to get some more accuracy.

            Yes I did create a function column and put in both of the other columns, tried various characters to see what they did. + – / & etc. I think that I tried most of the standard characters.

            Charles

             

            • This reply was modified 3 years ago by charles phillips.
            #6249
            dgteam
            Moderator

              Hi Charles,

              When I take your copy the data as shown above:

              1288, 62501,31012017,26012021 003745, 2, 24196.2, 21.067, 70.006,0.720945,359.9,114.478,5.39e-03, 10.9, 0.1, 1

              and I paste that directly into DataGraph, the numbers “26012021 003745” are in one column.

              import

              That is what DataGraph should do by default (assumes comma separated).

              Is that not what you see?  Is the data coming from text files?

              #6253
              charles phillips
              Participant

                Yes the original data is in that format but I run it thru some software to generate apogee and perigee (two numbers that tell the highest and lowest points of the orbit) and then plot apogee and perigee. The software outputs the day, apogee, perigee, and some other numbers that I might plot later (like inclination).

                I am NOT a programmer and reading the full date (across that darn space!!) is causing me headaches. Right now the plot works great without the additional minutes of the day but it would be nice to have the point a bit more accurate.

                There are several work arounds but I would like to do it right so that it is more maintainable (the DataGraph entries).

                I could just import the original orbital descriptions and calculate apogee and perigee with DataGraph but then I need to import some other descriptions that are in those three line formats. Grrrr. My software really cleans up that three line format, the one line format stuff is a part of that application.

                #6254
                charles phillips
                Participant

                  Here I took OUT the “three line” data and just have the ISON “one line” data. I am still importing more data to fill in the gap!

                  41941 Apogee, ISON

                  • This reply was modified 3 years ago by charles phillips.
                Viewing 7 posts - 1 through 7 (of 7 total)
                • You must be logged in to reply to this topic.

                Welcome to our Forums Technical Support Support Desk Different Format For Day/Time, Same Graph