Problem reporting SRP accelerations
I'm trying to Report the SRP accelerations for the plate Model and it does not seem to be any difference between the plate model and the cannonball model. Using different dummy_spacecrafts with the different SRP models attached produces the same output results.
Attached is set of GMAT functions.
Issues are related to script so I assign this ticket back to you to review.
In your script, you defined
GMAT RST_DUMMY_NP01.Attitude = CoordinateSystemFixed;
GMAT RST_DUMMY_NP01.AttitudeCoordinateSystem = EarthMJ2000Eq;
GMAT FB_1PPanel.PlateNormal = [ 0 0 -1 ];
That means face normal vector is [0 0 -1] in EarthMJ2000Eq coordinate system.
Vector from spacecraft RST_DUMMY_NP01 to the Sun in EarthMJ2000Eq coordinate system is
[83004954.19474498927593 -113239007.7999918907881 -49087333.67351654171944] km
Let: s = [82184015.0516943782568 -112119046.5287029445171 -48601848.0295388251543]
Let: shat = s/|s| = [0.558068216449833 -0.761341196179963 -0.330029466544679]
Therefore shat is unit vector pointing from the spacecraft to the Sun as presenting in EarthMJ2000Eq.
In your script, you need to define
GMAT FB_1PPanel.PlateNormal = [0.558068216449833 -0.761341196179963 -0.330029466544679];
instead of [0 0 -1]
I modified your script and attached to this ticket under file name “RST_Check_SRPaccel_CBvsNplate_newversion.script”. You may download and use Git diff option to see the changes in your script. You may run that script and look up on the result. It gets correct result as expected.
When you choose ‘SunFacing’ that means face normal vector pointing in direction from the plate to the Sun. In this case, Plate.PlateNormal parameter is not used. PlateNormal parameter is only applied to ‘FixedInBody’.
Good Morning Tuan. Yes, I was playing with the code yesterday and saw what you are seeing here too.
With SunFacing Plate (ps = 0, pd = 0) the cannonball is 2* nplate SRP
CB SRP acceleration = acceleration with Cannon ball SRP - acceleration w/o SRP
6.351782157489465983575e-12 1.481392427583675417241e-24 1.608316991790115332685e-24
NP SRP acceleration = acceleration with N-Plate - acceleration w/o SRP
3.175891078747136985443e-12 -1.124903029070679298328e-24 -5.1193917305222782124e-25
I must say that I do not see any difference between defining the SRP with Sun-Facing and (n=[0,0,1] and n= [0,0,-1]). Which I guess makes sense as the setting of the plate is set to that it is always sun pointing.
However, when I change that to plate type GMAT FB_1PPanel.Type = 'FixedInBody'; There are some inconsistencies. In this case I need to orient the plate, so I use the function RST_SetSunAngles to set the attitude, all angles to zero vSunRol = 0; vSunPit = 0; vSunYaw = 0; sets the plate perpendicular to the Sun line. I do the same as before, to compute the SRP acceleration, and there I get:
For comparison CB srp
[ 6.351782157489465983575e-12 1.481392427583675417241e-24 1.608316991790115332685e-24 ]
if n = [0,0,-1] (as you can see there is no factor 2) Nplate srp
[ 1.048137638523165331262e-12 -5.774966697197147863169e-25 6.346228210321995772176e-25 ]
if n = [0, 0, 1] (now the SRP is zero)
[ 0 0 0 ]
Shouldn’t the SRP also have a factor 2 here? Is it maybe because I’m not properly setting the attitude correctly. How can I check that if this is the case?
The only check I could think of in this case is to propagate the trajectory for a small period of time. Like 10 days and see the difference in the end trajectory. And I see almost the same results for n = [0 0 1] and n = [0 0 -1] but the SRP accelerations are different … So I’m not sure how to trust or validate the results.
I ran your test case with pd = 0 and ps = 0. I saw nothing wrong. I get result
NPlate SRP acceleration = 0.5 * Cannonball SRP acceleration
This is the result from report file:
acceleration w/o SRP = [-5.121234992836103174397e-08 3.089026894175191695023e-08 -1.561086162554709157274e-09]
acceleration with Connon ball SRP = [-5.120599814620354602534e-08 3.089026894175191033279e-08 -1.561086162554705848551e-09]
acceleration with Nplate SRP = [-5.120917403728228226721e-08 3.089026894175191033279e-08 -1.561086162554709157274e-09]
Cannonball SRP acceleration = acceleration with Connon ball SRP - acceleration w/o SRP = [-6.35178215748572e-12 6.61744490042422e-24 -3.30872245021211e-24]
NPlate SRP acceleration = acceleration with NPlate SRP - acceleration w/o SRP = [-3.17589107873624e-12 0 -3.30872245021211e-24] = 0.5 * Cannonball SRP acceleration.
You saw spacecraft trajectory nearly the same due to SRP force is small compare to gravity force. If you want to see the effect of SRP force clearly. You need to make face area really big about 1000000 time more.