 # Analyze and begin updating Matlab prototypes to use more time precision

## Details

• Type: Bug
• Status: Open
• Priority: P2
• Resolution: Unresolved
• Affects Version/s: R2018A
• Fix Version/s:
• Component/s:
• Labels:

## Description

To help solve the Doppler noise issue, GMAT is performing many calculations with more precision.

Determine if changes need to be made to the matlab prototypes. Implement easy enhancements.

It may not be easy to get more matlab precision for a propagation - investigate. (The work estimate for this ticket can be reduced if we transfer the matlab propagation work to a different Sprint)

## Activity

Note from John on matlab routine sidereal.m: It looks like Vallado provides two different methods to calculate the rotation. I don’t have a copy of the book in front of me, but I believe that sidereal.m uses equation 3-43, while GMAT uses equation 3-45 (2nd edition). I could change sidereal.m to use equation 3-45 like we use in GMAT, but the epoch is only given in 1 word time, while the changes I made require 2 word time for the extra needed precision.

Note from John on what the GMAT code change:

In AxisSystem::ComputeSiderealTimeRotation() I changed the following:

Real ThetaGmst = ((67310.54841 * sec2deg) +
((876600 * hour2deg) + (8640184.812866 * sec2deg))*tUT1 +
(0.093104 * sec2deg)*tUT12 - (6.2e-06 * sec2deg)*tUT13 )

Became:

Real ThetaGmst = ((67310.54841 * sec2deg) +
(mjdUT1.GetSec() + mjdUT1.GetFracSec())/SECS_PER_DAY*TWO_PI_DEG +
(8640184.812866 * sec2deg)*tUT1 +
(0.093104 * sec2deg)*tUT12 - (6.2e-06 * sec2deg)*tUT13 )

Show Steve Cooley added a comment - - edited Note from John on matlab routine sidereal.m: It looks like Vallado provides two different methods to calculate the rotation. I don’t have a copy of the book in front of me, but I believe that sidereal.m uses equation 3-43, while GMAT uses equation 3-45 (2nd edition). I could change sidereal.m to use equation 3-45 like we use in GMAT, but the epoch is only given in 1 word time, while the changes I made require 2 word time for the extra needed precision. Note from John on what the GMAT code change: In AxisSystem::ComputeSiderealTimeRotation() I changed the following: Real ThetaGmst = ((67310.54841 * sec2deg) + ((876600 * hour2deg) + (8640184.812866 * sec2deg))*tUT1 + (0.093104 * sec2deg)*tUT12 - (6.2e-06 * sec2deg)*tUT13 ) RAD_PER_DEG; Became: Real ThetaGmst = ((67310.54841 * sec2deg) + (mjdUT1.GetSec() + mjdUT1.GetFracSec())/SECS_PER_DAY*TWO_PI_DEG + (8640184.812866 * sec2deg)*tUT1 + (0.093104 * sec2deg)*tUT12 - (6.2e-06 * sec2deg)*tUT13 ) RAD_PER_DEG;

## People

• Assignee: Tuan Nguyen
Reporter: Steve Cooley
Participants:
0 Vote for this issue
Watchers:
1 Start watching this issue

## Dates

• Created:
Updated:

## Time Tracking

Estimated: 1w
Remaining: 1w
Logged: Not Specified