Meadville Space Center
Welcome, Guest. Please login or register.
August 08, 2020, 04:42:56 AM

Login with username, password and session length
Search:     Advanced search
Project Apollo Beta 7.0 released!
http://nassp.sf.net/wiki/Installation
25068 Posts in 2094 Topics by 2266 Members
Latest Member: twa517
* Home Help Search Login Register
+  Meadville Space Center
|-+  Project Apollo - NASSP
| |-+  Project Apollo - NASSP Development
| | |-+  Programming (Moderators: movieman, dseagrav, Swatch, lassombra)
| | | |-+  Someone please fix the LM IMU for me please!
« previous next »
Pages: [1] Print
Author Topic: Someone please fix the LM IMU for me please!  (Read 1175 times)
Tschachim
Project Apollo - NASSP
Administrator
Hero Member
*****
Posts: 3700


nassp.sf.net


View Profile WWW
« on: April 23, 2006, 08:06:02 AM »

dseagrav wrote:

I just can't understand how that works. It's just plain out of my league. All I'm doing is wasting everyone's time. I disabled most of the electrical stuff to simplify things, and enabled the Orbiter rotation RCS controls. Add fdai.cpp to the LMPKD project or it won't build.

Drag a LM up to earth orbit and release it. You may have to cage and uncage the IMU to reset it to 0,0,0 first. All I can tell you for sure is that the LM IMU has roll and yaw swapped. You can see this if you program a DAP maneuver, it will switch the two axes when it generates the desired gyro angles. I added a LEM flag (named LEM) to the IMU class that is TRUE when the IMU is installed in a LEM, and changed the GetTotalAttitude function to return the axes in LM order in that case. The FDAI in the LM needs different bitmaps but it works, and it shows what the LGC is getting. The electricity is hardwired to batteries 1 and 2 and should last plenty long. Simply open the two SOV (tb will grey) and you have rotational RCS. The RCSes were moved to their proper positions, and when the LM does try to maneuver it is subject to very bad bell-ringing - I suspect the CG is incorrect, because I checked the RCSes. Ignore the messages about the LGC CH13, that was me trying to get the controllers working. It might work but I doubt it, it's very un-debugged and I know the values it generates are scaled wrong.

I'm sorry to dump this off on someone else like this, but I'm just running in circles with it.
Logged

Tschachim
Project Apollo - NASSP
Administrator
Hero Member
*****
Posts: 3700


nassp.sf.net


View Profile WWW
« Reply #1 on: April 23, 2006, 08:06:50 AM »

chode wrote:

I don't know enough to fix the problem you are having, but I have come across an issue that may be related to what you are seeing. Basically, the definitions of roll and yaw for the LM are swapped relative to the CM, according to NASA documents.

The directions of the (NASA) X, Y, and Z axes for the CM and LM coincide when the vehicle is sitting on the launch pad. X is up, Y is to the astronaut's right, and Z is toward their feet. This translates to the LM as X is up (toward the docking hatch), Y is to the astronauts right (as they are standing, looking out the windows), and Z is out the windows.

For the CM, the roll axis is defined as the X axis, Pitch is the Y axis, and Yaw is the Z axis. But for the LM, Roll is defined as rotation about the Z axis, Pitch is the Y axis, and Yaw is the X axis.

And if you need to reference the Orbiter coordinate system, things get even more interesting. In a nutshell:
For the CM:
Orbiter X = NASA Y
Orbiter Y = NASA -Z
Orbiter Z = NASA X
For the LM:
Orbiter X = NASA Y
Orbiter Y = NASA X
Orbiter Z = NASA Z

For both: Orbiter Roll axis is Z, Pitch is X, and Yaw is Y
Logged

Tschachim
Project Apollo - NASSP
Administrator
Hero Member
*****
Posts: 3700


nassp.sf.net


View Profile WWW
« Reply #2 on: April 23, 2006, 08:14:56 AM »

Sorry guys, I moved the topic to the wrong forum and can't move it back, so I re-created the topic here.

Looks like chode did the work already, I didn't test, but you can try to change the following functions in imumath.cpp for the LM:

Code:
IMU_Matrix3 IMU::getNavigationBaseToOrbiterLocalTransformation() {

IMU_Matrix3 m;
int i;

for (i = 0; i < 9; i++) {
m.data[i] = 0.0;
}
m.m12 = 1.0;
m.m21 = 1.0;
m.m33 = 1.0;
return m;
}

IMU_Matrix3 IMU::getOrbiterLocalToNavigationBaseTransformation() {

IMU_Matrix3 m;
int i;

for (i = 0; i < 9; i++) {
m.data[i] = 0.0;
}
m.m12 = 1.0;
m.m21 = 1.0;
m.m33 = 1.0;
return m;
}

Cheers
Tschachim
Logged

dseagrav
Moderator
Hero Member
****
Posts: 1118


View Profile
« Reply #3 on: April 23, 2006, 11:07:33 AM »

I get it. I thought the functions you point at were for changing sign on Orbiter axes, I didn't understand how to use it to reasign them.

It now works. I'm seeing if I can stop the bell-ringing - If I can't soon I'll commit anyway. As of right this moment the RHC works and the LM can navigate but it can't orient itself; The CG is wrong or something else is going on.
Logged
Pages: [1] Print 
« previous next »
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.10 | SMF © 2006-2009, Simple Machines LLC Valid XHTML 1.0! Valid CSS!