# Difference between UTCGregorian and A1ModJulian or UTCModJulian in GMAT?

I have a question related to this question. I have computed several propulsive maneuvers required for GEO orbit acquisition using the Target feature of NASA GMAT 2022a and saved them to a maneuver list report using the *.Epoch.UTCGregorian variable. Now I want to reload this information and perturb this maneuvers to see the effect of thrust vector error and orientation missalignments but when I load the maneuvers and use the convert function from string to num as indicated in the answer I found out that the deltaV required for changing for example the apogee is not the same as before and whilerevisiting the classical orbit elements reports I found that the loaded maneuver is actually changing the elements 212 minutes after the target maneuver epoch and if I sustract this value from the loaded maneuver epoch then the maneuver performs as expected... is this behaviour normal? I dont think so... Thanks in advance for your thoughts on this...

In order to fully answer if the behavior is normal, we would likely need more information about the structure of the mission sequence and how you are interacting with the burns, as none of the differences in time formats should produce a delta as large as 212 minutes. If you can edit this post and include a screenshot or attachment of your script/burn data, I could provide a better answer.

To answer the question in the title of your post, the differences between UTCGregorian, A1ModJulian, and UTCModJulian, actually requires a two part answer.

To start, the time system component (i.e. UTC, A1, TDB, etc.) are different implementations of physical time with individuals precisions. There are understood conversions between these, that GMAT performs internally, and each has its own basis and (typically) purpose. I would suggest picking a single system to stick to throughout your script if possible, to avoid confusion. Section 2.1 of the GMAT Math Spec provides more details about the different systems and how they are formulated. As mentioned above, none of these time systems should have a delta as large as 212 minutes.

For the other component, time format (Gregorian vs. ModJulian) is discussed in Section 2.2 of the Math Spec, these are just the ways in which the time is represented for the system. Gregorian is the standard 01 Jan 2024 00:00:00.000 format, whereas ModJulian is a numeric representation derived from the Julian Date. Since Gregorian is a string representation, it is inconvenient for math calculations, but due to its straightforward presentation, it can be easy to use for presenting state information.

In GMAT, the ModJulian date (MJD) formulation differs from other standard ways, which may contribute to the error you are seeing. Standard methods (i.e. if you use an online converter to find ModJulian date) will calculate the Julian Date, and subtract 2400000.5, whereas GMAT has its own MJD formulation that subtract 2430000 from the Julian Date. For example, for the above date, January 1st 2024, the Julian Date would be 2460310.5. The standard MJD and GMAT MJD would differ as so:

Standard  :   MJD = JD - 2400000.5 = 60310.0
GMAT      :   MJD = JD - 2430000.0 = 30310.5


Back to the question about your maneuver epochs, I would ensure your time systems are accurate based on the burn information, and that your propagation stopping conditions prior to the burn are actually being hit. If you are running into issues with the internal conversion, it may be worth converting the times prior to input into the script.