Skip to content

Commit

Permalink
Merge pull request #1030 from n7275/IMU_drift
Browse files Browse the repository at this point in the history
Add IMU and Gyro Drift Rates and Accelerometer Biases
  • Loading branch information
indy91 authored Jul 8, 2024
2 parents abb92fe + c7d1ffc commit 5428569
Show file tree
Hide file tree
Showing 122 changed files with 3,135 additions and 79 deletions.
32 changes: 31 additions & 1 deletion Missions/ProjectApollo/Apollo 10.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,34 @@ LMPVesselName=Gene Cernan
CDRSuitName=T. STAFFORD
CMPSuitName=J. YOUNG
LMPSuitName=E. CERNAN
CSMCueCard=1 SATURN_BOOST_A14
CSMCueCard=1 SATURN_BOOST_A14
CMPIPABIASX=-0.27
CMPIPASCALEX=-100
CMPIPABIASY=-0.07
CMPIPASCALEY=-230
CMPIPABIASZ=-0.05
CMPIPASCALEZ=-80
CMNBDX=0.4
CMNBDY=-1.3
CMNBDZ=1.2
CMADIAX=1
CMADIAY=13
CMADIAZ=11
CMADSRAX=10
CMADSRAY=3
CMADSRAZ=7
LMPIPABIASX=-0.41
LMPIPASCALEX=-430
LMPIPABIASY=0.18
LMPIPASCALEY=-840
LMPIPABIASZ=-0.03
LMPIPASCALEZ=-530
LMNBDX=-3.2
LMNBDY=1.5
LMNBDZ=-1.2
LMADIAX=1
LMADIAY=20
LMADIAZ=-24
LMADSRAX=5
LMADSRAY=2
LMADSRAZ=-1
32 changes: 31 additions & 1 deletion Missions/ProjectApollo/Apollo 11.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,34 @@ LMPVesselName=Buzz Aldrin
CDRSuitName=N. ARMSTRONG
CMPSuitName=M. COLLINS
LMPSuitName=E. ALDRIN
CSMCueCard=1 SATURN_BOOST_A14
CSMCueCard=1 SATURN_BOOST_A14
CMPIPABIASX=-0.26
CMPIPASCALEX=40
CMPIPABIASY=-0.13
CMPIPASCALEY=-80
CMPIPABIASZ=0.14
CMPIPASCALEZ=-30
CMNBDX=-1.8
CMNBDY=-0.6
CMNBDZ=-0.2
CMADIAX=15
CMADIAY=5
CMADIAZ=1
CMADSRAX=-6
CMADSRAY=3
CMADSRAZ=5
LMPIPABIASX=-0.12
LMPIPASCALEX=-210
LMPIPABIASY=0.17
LMPIPASCALEY=-210
LMPIPABIASZ=0.07
LMPIPASCALEZ=-920
LMNBDX=1.3
LMNBDY=-1.5
LMNBDZ=-1.9
LMADIAX=57
LMADIAY=-4
LMADIAZ=20
LMADSRAX=2
LMADSRAY=26
LMADSRAZ=-11
32 changes: 31 additions & 1 deletion Missions/ProjectApollo/Apollo 12.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,34 @@ LMPVesselName=Al Bean
CDRSuitName=C. CONRAD
CMPSuitName=R. GORDON
LMPSuitName=A. BEAN
CSMCueCard=1 SATURN_BOOST_A14
CSMCueCard=1 SATURN_BOOST_A14
CMPIPABIASX=-0.09
CMPIPASCALEX=-220
CMPIPABIASY=-0.09
CMPIPASCALEY=-350
CMPIPABIASZ=-0.160
CMPIPASCALEZ=-370
CMNBDX=-0.1
CMNBDY=-0.1
CMNBDZ=0.1
CMADIAX=13
CMADIAY=0
CMADIAZ=-1
CMADSRAX=-4
CMADSRAY=-4
CMADSRAZ=-6
LMPIPABIASX=-0.38
LMPIPASCALEX=-660
LMPIPABIASY=0.02
LMPIPASCALEY=-720
LMPIPABIASZ=0.62
LMPIPASCALEZ=-890
LMNBDX=0.1
LMNBDY=0.8
LMNBDZ=3.0
LMADIAX=17
LMADIAY=-15
LMADIAZ=13
LMADSRAX=-2
LMADSRAY=4
LMADSRAZ=-2
15 changes: 15 additions & 0 deletions Missions/ProjectApollo/Apollo 7.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,18 @@ LMPVesselName=Walt Cunningham
CDRSuitName=W. SCHIRRA
CMPSuitName=D. EISELE
LMPSuitName=W. CUNNINGHAM
CMPIPABIASX=0.24
CMPIPASCALEX=-300
CMPIPABIASY=0.24
CMPIPASCALEY=-190
CMPIPABIASZ=0.14
CMPIPASCALEZ=-340
CMNBDX=-0.5
CMNBDY=0
CMNBDZ=-0.6
CMADIAX=8.2
CMADIAY=11.6
CMADIAZ=20.8
CMADSRAX=3.9
CMADSRAY=-0.4
CMADSRAZ=-8.8
17 changes: 16 additions & 1 deletion Missions/ProjectApollo/Apollo 8.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,19 @@ LMPVesselName=Bill Anders
CDRSuitName=F. BORMAN
CMPSuitName=J. LOVELL
LMPSuitName=W. ANDERS
CSMCueCard=1 SATURN_BOOST_A14
CSMCueCard=1 SATURN_BOOST_A14
CMPIPABIASX=-0.0013
CMPIPASCALEX=-76.57
CMPIPABIASY=0.803
CMPIPASCALEY=-329.14
CMPIPABIASZ=0.631
CMPIPASCALEZ=-200.71
CMNBDX=2.18
CMNBDY=2.62
CMNBDZ=3.22
CMADIAX=17.88
CMADIAY=-3.22
CMADIAZ=28.23
CMADSRAX=-2.24
CMADSRAY=1.66
CMADSRAZ=-3.22
32 changes: 31 additions & 1 deletion Missions/ProjectApollo/Apollo 9.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,34 @@ LMPVesselName=Rusty Schweickart
CDRSuitName=J. MCDIVITT
CMPSuitName=D. SCOTT
LMPSuitName=R. SCHWEICKART
CSMCueCard=1 SATURN_BOOST_A14
CSMCueCard=1 SATURN_BOOST_A14
CMPIPABIASX=0.64
CMPIPASCALEX=-140
CMPIPABIASY=-0.1
CMPIPASCALEY=-330
CMPIPABIASZ=0.44
CMPIPASCALEZ=-280
CMNBDX=2.4
CMNBDY=0
CMNBDZ=2.4
CMADIAX=5
CMADIAY=8
CMADIAZ=-18
CMADSRAX=7
CMADSRAY=9
CMADSRAZ=-4
LMPIPABIASX=0.31
LMPIPASCALEX=-968
LMPIPABIASY=0.19
LMPIPASCALEY=-941
LMPIPABIASZ=0
LMPIPASCALEZ=-852
LMNBDX=4.6
LMNBDY=5
LMNBDZ=4.5
LMADIAX=5.4
LMADIAY=-0.3
LMADIAZ=19.6
LMADSRAX=-0.5
LMADSRAY=16.3
LMADSRAZ=-1.7
122 changes: 122 additions & 0 deletions Orbitersdk/samples/ProjectApollo/src_aux/Mission.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,14 @@ namespace mission {
iCMtoLMPowerConnectionVersion = 0;
EmptySMCG = _V(914.5916, -6.6712, 12.2940); //Includes: empty SM and SLA ring, but no SM RCS
bHasRateAidedOptics = false;

CM_IMUDriftRates = _M(0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0);
CM_PIPABias = _V(0.0, 0.0, 0.0);
CM_PIPAScale = _V(0.0, 0.0, 0.0);

LM_IMUDriftRates = _M(0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0);
LM_PIPABias = _V(0.0, 0.0, 0.0);;
LM_PIPAScale = _V(0.0, 0.0, 0.0);
bCrossPointerReversePolarity = false;
bCrossPointerShades = false;
iLMNumber = 5; //LM-5
Expand Down Expand Up @@ -313,12 +321,126 @@ namespace mission {
else if (!_strnicmp(line, "LMCueCard=", 10)) {
ReadCueCardLine(line + 10, 1);
}
else if (!_strnicmp(line, "CMNBDX=", 7)) {
sscanf(line + 7, "%lf", &CM_IMUDriftRates.m11);
}
else if (!_strnicmp(line, "CMNBDY=", 7)) {
sscanf(line + 7, "%lf", &CM_IMUDriftRates.m12);
}
else if (!_strnicmp(line, "CMNBDZ=", 7)) {
sscanf(line + 7, "%lf", &CM_IMUDriftRates.m13);
}
else if (!_strnicmp(line, "CMADSRAX=", 9)) {
sscanf(line + 9, "%lf", &CM_IMUDriftRates.m21);
}
else if (!_strnicmp(line, "CMADSRAY=", 9)) {
sscanf(line + 9, "%lf", &CM_IMUDriftRates.m22);
}
else if (!_strnicmp(line, "CMADSRAZ=", 9)) {
sscanf(line + 9, "%lf", &CM_IMUDriftRates.m23);
}
else if (!_strnicmp(line, "CMADIAX=", 8)) {
sscanf(line + 8, "%lf", &CM_IMUDriftRates.m31);
}
else if (!_strnicmp(line, "CMADIAY=", 8)) {
sscanf(line + 8, "%lf", &CM_IMUDriftRates.m32);
}
else if (!_strnicmp(line, "CMADIAZ=", 8)) {
sscanf(line + 8, "%lf", &CM_IMUDriftRates.m33);
}
else if (!_strnicmp(line, "CMPIPABIASX=", 12)) {
sscanf(line + 12, "%lf", &CM_PIPABias.x);
}
else if (!_strnicmp(line, "CMPIPABIASY=", 12)) {
sscanf(line + 12, "%lf", &CM_PIPABias.y);
}
else if (!_strnicmp(line, "CMPIPABIASZ=", 12)) {
sscanf(line + 12, "%lf", &CM_PIPABias.z);
}
else if (!_strnicmp(line, "CMPIPASCALEX=", 13)) {
sscanf(line + 13, "%lf", &CM_PIPAScale.x);
}
else if (!_strnicmp(line, "CMPIPASCALEY=", 13)) {
sscanf(line + 13, "%lf", &CM_PIPAScale.y);
}
else if (!_strnicmp(line, "CMPIPASCALEZ=", 13)) {
sscanf(line + 13, "%lf", &CM_PIPAScale.z);
}
else if (!_strnicmp(line, "LMNBDX=", 7)) {
sscanf(line + 7, "%lf", &LM_IMUDriftRates.m11);
}
else if (!_strnicmp(line, "LMNBDY=", 7)) {
sscanf(line + 7, "%lf", &LM_IMUDriftRates.m12);
}
else if (!_strnicmp(line, "LMNBDZ=", 7)) {
sscanf(line + 7, "%lf", &LM_IMUDriftRates.m13);
}
else if (!_strnicmp(line, "LMADSRAX=", 9)) {
sscanf(line + 9, "%lf", &LM_IMUDriftRates.m21);
}
else if (!_strnicmp(line, "LMADSRAY=", 9)) {
sscanf(line + 9, "%lf", &LM_IMUDriftRates.m22);
}
else if (!_strnicmp(line, "LMADSRAZ=", 9)) {
sscanf(line + 9, "%lf", &LM_IMUDriftRates.m23);
}
else if (!_strnicmp(line, "LMADIAX=", 8)) {
sscanf(line + 8, "%lf", &LM_IMUDriftRates.m31);
}
else if (!_strnicmp(line, "LMADIAY=", 8)) {
sscanf(line + 8, "%lf", &LM_IMUDriftRates.m32);
}
else if (!_strnicmp(line, "LMADIAZ=", 8)) {
sscanf(line + 8, "%lf", &LM_IMUDriftRates.m33);
}
else if (!_strnicmp(line, "LMPIPABIASX=", 12)) {
sscanf(line + 12, "%lf", &LM_PIPABias.x);
}
else if (!_strnicmp(line, "LMPIPABIASY=", 12)) {
sscanf(line + 12, "%lf", &LM_PIPABias.y);
}
else if (!_strnicmp(line, "LMPIPABIASZ=", 12)) {
sscanf(line + 12, "%lf", &LM_PIPABias.z);
}
else if (!_strnicmp(line, "LMPIPASCALEX=", 13)) {
sscanf(line + 13, "%lf", &LM_PIPAScale.x);
}
else if (!_strnicmp(line, "LMPIPASCALEY=", 13)) {
sscanf(line + 13, "%lf", &LM_PIPAScale.y);
}
else if (!_strnicmp(line, "LMPIPASCALEZ=", 13)) {
sscanf(line + 13, "%lf", &LM_PIPAScale.z);
}
}
hFile.close();

return true;
}

MATRIX3 Mission::GetCM_IMU_Drift() const {
return CM_IMUDriftRates;
}

MATRIX3 Mission::GetLM_IMU_Drift() const {
return LM_IMUDriftRates;
}

VECTOR3 Mission::GetCM_PIPA_Bias() const {
return CM_PIPABias;
}

VECTOR3 Mission::GetLM_PIPA_Bias() const {
return LM_PIPABias;
}

VECTOR3 Mission::GetCM_PIPA_Scale() const {
return CM_PIPAScale;
}

VECTOR3 Mission::GetLM_PIPA_Scale() const {
return LM_PIPAScale;
}

const std::string& Mission::GetMissionName(void) const
{
return strFileName;
Expand Down
22 changes: 21 additions & 1 deletion Orbitersdk/samples/ProjectApollo/src_aux/Mission.h
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,18 @@ namespace mission
VECTOR3 GetCGOfEmptySM() const;
//false = Optics mode switch is not bypassed for CMC to optics commands, true = optics mode switch is bypassed for CMC to optics commands (ECP 792)
bool HasRateAidedOptics() const;
//
MATRIX3 GetCM_IMU_Drift() const;
//
MATRIX3 GetLM_IMU_Drift() const;
//
VECTOR3 GetCM_PIPA_Bias() const;
//
VECTOR3 GetLM_PIPA_Bias() const;
//
VECTOR3 GetCM_PIPA_Scale() const;
//
VECTOR3 GetLM_PIPA_Scale() const;
//false = Normal polarity (Apollo 14 and earlier), Lateral axis for PGNS and LR input has switched polarity (Apollo 15 and later)
bool GetCrossPointerReversePolarity() const;
//false = No shades (Apollo 15 and earlier), Shades (Apollo 16 & 17)
Expand Down Expand Up @@ -164,11 +176,19 @@ namespace mission
int iLMNumber;
bool bLMEventTimerReverseAtZero;

MATRIX3 CM_IMUDriftRates;
VECTOR3 CM_PIPABias;
VECTOR3 CM_PIPAScale;

MATRIX3 LM_IMUDriftRates;
VECTOR3 LM_PIPABias;
VECTOR3 LM_PIPAScale;

void SetDefaultValues();
};
}

DLLCLBK mission::Mission* paGetDefaultMission();
DLLCLBK mission::Mission* paGetMission(const std::string& filename);
void ClearMissionManagementMemory();
void InitMissionManagementMemory();
void InitMissionManagementMemory();
Loading

0 comments on commit 5428569

Please sign in to comment.