Meadville Space Center
Welcome, Guest. Please login or register.
August 04, 2020, 10:31:58 AM

Login with username, password and session length
Search:     Advanced search
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)
| | | |-+  AGC++ reentry help
« previous next »
Pages: [1] 2 3 ... 6 Print
Author Topic: AGC++ reentry help  (Read 24608 times)
chode
Project Team Member
Full Member
****
Posts: 153


View Profile
« on: December 13, 2006, 02:19:00 AM »

I've been able to get some free time (finally!) to get back to some programming for Project Apollo.

So far, I've been able to incorporate C++ code that emulates the programs P61 through P67 into the existing code (in CSMcomputer.cpp and apolloguidance.cpp). The problem I have is that my old code for autopilot control of the RCS jets on the CM doesn't work anymore. I was using "SetAttitudeRotLevel" in my old code. Could someone point me in the right direction as to how to control the CM RCS system in the new code?

Regards
Logged
dseagrav
Moderator
Hero Member
****
Posts: 1118


View Profile
« Reply #1 on: December 13, 2006, 02:34:23 AM »

Just set and clear the bits in IO channels 5 and 6 to fire and stop thrusters.
Pitch and yaw jets are on channel 5, roll jets on 6.

To do this:
SetOutputChannelBit(0ch, xx, y);  ch = channel (The leading 0 is important), xx = bit number, y = value

Jet table (I think this is correct, I didn't look it up, this is just copipe)

Code:
CM# SM# INDEX# SWITCH GROUP ROT AXIS
CH 5
1 1 C3 1 PITCH +PITCH
2 2 A4 2 PITCH -PITCH
3 3 A3 3 PITCH +PITCH
4 4 C4 4 PITCH -PITCH
5 5 D3 5 YAW +YAW
6 6 B4 6 YAW -YAW
7 7 B3 7 YAW +YAW
8 8 D4 8 YAW -YAW
CH 6
1 9 B1 9 ROLL B/D +ROLL
2 10 D2 10 ROLL B/D -ROLL
3 11 D1 11 ROLL B/D +ROLL
4 12 B2 12 ROLL B/D -ROLL
5 xx A1 13 ROLL A/C +ROLL
6 xx A2 14 ROLL A/C -ROLL
7 xx C1 15 ROLL A/C +ROLL
8 xx C2 16 ROLL A/C -ROLL
Logged
chode
Project Team Member
Full Member
****
Posts: 153


View Profile
« Reply #2 on: December 13, 2006, 02:54:39 AM »

Thanks, I'll give it a go.

That jet table is actually very readable once I copied and pasted it into Notepad.

Regards
Logged
Swatch
Moderator
Hero Member
****
Posts: 1003


jasonims
View Profile
« Reply #3 on: December 13, 2006, 08:33:16 AM »

that is a very strange glitch....

Good to see ya back chode!
Logged

My Project Apollo Work:
CM Visual
 -VC (~75% complete: texture work beginning again; mesh-78%; texture-70%)
Propulsion Particle Improvements (Focused on S1B right now, BETA 1.0 has been commited)
New Docking Method (~50% complete: research complete; coding partially completed, testing not underway)

Future Work:  (if it's here, it's deemed unnecessary to upcoming release)

Older Work:  (if it's here, it's fair game to whoever wants to improve)
EMS Implementation (committed: minor flaws, but groundwork is there, needs extensive testing)
EMS scrolls (committed: not refined, but usable)
SM Visual (committed: mesh-finished, texture-60%; possibly revisited in future)
J2 Texture (commited: room for improvement)
LRV (committed: mesh-finished, texture-90%; in future a ground up rebuild may be in order, but not on my plans)
movieman
Moderator
Hero Member
****
Posts: 1710



View Profile
« Reply #4 on: December 13, 2006, 08:40:07 AM »

BTW, if that doesn't work, check that the SetOutputChannelBit() call goes through the correct path to process the RCS bits. The function that the Virtual AGC calls certainly does, but I'm not 100% sure that they all do and don't have access to the code at the moment.
Logged
dseagrav
Moderator
Hero Member
****
Posts: 1118


View Profile
« Reply #5 on: December 13, 2006, 08:41:14 AM »

BTW, if that doesn't work, check that the SetOutputChannelBit() call goes through the correct path to process the RCS bits. The function that the Virtual AGC calls certainly does, but I'm not 100% sure that they all do and don't have access to the code at the moment.


I checked before I posted. It does pass through the channel processing code.
Logged
chode
Project Team Member
Full Member
****
Posts: 153


View Profile
« Reply #6 on: December 19, 2006, 08:34:15 PM »

I tried using SetOutputChannelBit, but no success. I've tried to follow the path that call would take, and it looks like CSMComputer::SetOutputChannelBit calls ApolloGuidance::SetOutputChannelBit which calls ProcessChannel15. My rusty C++ may be showing here, but does this call ApolloGuidance::ProcessChannel15 or CSMComputer::ProcessChannel15? ApolloGuidance::ProcessChannel15 doesn't do anything, while CSMComputer::ProcessChannel15 looks like it fires the jets.

Any help or suggestions are greatly appreciated.

Regards
Logged
movieman
Moderator
Hero Member
****
Posts: 1710



View Profile
« Reply #7 on: December 19, 2006, 09:07:41 PM »

Quote
My rusty C++ may be showing here, but does this call ApolloGuidance::ProcessChannel15 or CSMComputer::ProcessChannel15?

It's virtual, so it goes into the CSMComputer version.

Is the CM RCS activated?
Logged
chode
Project Team Member
Full Member
****
Posts: 153


View Profile
« Reply #8 on: December 19, 2006, 09:12:35 PM »

I can control the CM RCS manually with the numpad, so I am assuming that it is activated. Also, manual control acts a little wierd, for example the KILLROT doesn't work right. Maybe that indicates that the autopilot is constantly setting all thrusters to zero?

Regards
« Last Edit: December 19, 2006, 09:14:23 PM by chode » Logged
dseagrav
Moderator
Hero Member
****
Posts: 1118


View Profile
« Reply #9 on: December 20, 2006, 12:02:16 AM »

Did you have the guidance mode set to CMC?

Also check that the RCS AUTO power is on to a live bus (left panel).

If the SCS has control it will probably override you, or if the RJEC lockout conditions are true (RHC is commanding DIRECT, etc) that will override either SCS or CMC.




« Last Edit: December 20, 2006, 12:05:53 AM by dseagrav » Logged
chode
Project Team Member
Full Member
****
Posts: 153


View Profile
« Reply #10 on: December 20, 2006, 03:10:28 PM »

Thanks for the help, it looks like I didn't have the RCS power connected up. I am now getting RCS action from P63, now I just have to get it to control properly, and not not send me into an uncotrollable tumble.

Regards
Logged
dseagrav
Moderator
Hero Member
****
Posts: 1118


View Profile
« Reply #11 on: December 20, 2006, 03:16:52 PM »

That's good, I was worried for a second that I had missed or forgotten something ^_^
Logged
chode
Project Team Member
Full Member
****
Posts: 153


View Profile
« Reply #12 on: December 21, 2006, 12:43:00 PM »

OK, new problem. It looks like the thrust vectors for the CM RCS jets are incorrect. For example, the pitch-up and pitch-down jets are all pointed in the -y direction, so the net effect is to push the CM in the -y direction when these jets fire, changing the orbit of the CM. I'm not sure what the correct vectors should be, other than my intuitive feeling that they should be perpendicular to the vector from the jet to the CM center of mass to maximize torque and minimize net thrust (although there will still be some net thrust). Does anyone have any source for this info? Otherwise, I'm going to try the perpendicular approach and see how that works.

Regards
Logged
dseagrav
Moderator
Hero Member
****
Posts: 1118


View Profile
« Reply #13 on: December 21, 2006, 05:10:43 PM »

I'll dig through my reference material when I get home (about an hour) - I know there was some net thrust because the AGC expects it, and it's mentioned in the source code. If you eliminate the net thrust (or change it too much) you'll break the vAGC.

Logged
dseagrav
Moderator
Hero Member
****
Posts: 1118


View Profile
« Reply #14 on: December 21, 2006, 06:44:43 PM »

CSM 104 SYSTEMS HANDBOOOK pages 472 and later show how the engines are mounted. They should point straight out through their holes. Honestly, I can't remember if I aimed them or not.

It looks like the ones on the sloped sections of wall (roll, plus pitch, yaw) point directly out their holes flush with the wall, and the minus pitch engines point straight up (page 474).

Logged
Pages: [1] 2 3 ... 6 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!