Meadville Space Center
Welcome, Guest. Please login or register.
October 31, 2020, 08:27:39 PM

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 (Moderators: movieman, Tschachim, Swatch, lassombra)
| | |-+  P11 Error Needles
« previous next »
Pages: [1] 2 3 4 Print
Author Topic: P11 Error Needles  (Read 11065 times)
kneecaps
Project Team Member
Full Member
****
Posts: 217


36711000 kneecaps@shockpulse.co.uk
View Profile
« on: April 28, 2008, 04:19:22 AM »

Hi All,
     I noticed that P11 error needles are not being driven. I think this is a simple Wink problem.

Looking into the routine which does this it appears as if some polynomials are pad loaded so the AGC can calculate the LV errors. The results of these calculations are passed to routines which convert from the LV axis/rates to the CSM axis/rates.

POLYNUM from the assembly listing is given as EMEM E6,1661 (hwadd 3261)
I beleive the launch polynomials are to be pad loaded (I quote from the code below)

I do not currently know how to convert the double precision values listed below so they can be loaded across two emem locations.

Secondly, I have been testing by pad loading the memory locations:
POLYNUM through POLYNUM +8 would yield memory addresses E6,1661 through E6,1671.

I load some test values but am not expecting anything to happen until I can input the values below correctly. Looking through the code it appears as if thats all the pad loads needed, but I won't know until I can pad load the correct values.


" #   THE FOLLOWING PAD LOADED COEFFICIENTS ARE
#   USED TO COMPUTE THE PITCH POLYNOMIAL
#
#   ----- SUNDISK SI COEFS -----
#   POLYNUM      FIVE            POLYNOMIAL DEGREE -1
#      +1   2DEC   -.469184028   E-4   A0
#      +3   2DEC   .137571556    E-2   A1
#      +5   2DEC   .231502280    E-1   A2
#      +7   2DEC   -.205929365   E-1   A3
#      +9D   2DEC   0         A4
#      +11D   2DEC   0         A5
#      +13D   2DEC   0         A6
« Last Edit: April 29, 2008, 05:17:32 AM by kneecaps » Logged

"Okay. As soon as we find the Earth, we will do it."
- Frank Borman, Apollo 8

Current Work: ?? What next??

Future Work:
I know the AGC pretty well so anything need doing there?

On Hold/Completed:
SPS TVC in P40 issues.
P11 FDAI Error Needles (98%) complete. Comitted. Working A7 scenario.
P06 AGC Standby. Concluded. It's done by the AGC PSU.
Got us a complete AOH Volume II
dseagrav
Project Admin
Hero Member
*****
Posts: 1118


View Profile
« Reply #1 on: April 28, 2008, 08:44:01 AM »

If it's the time-pitch polynomial, there's a valid one in the LVDC++ code that you can copy. It's supposedly for Apollo 8.

« Last Edit: May 01, 2008, 01:00:34 PM by dseagrav » Logged
kneecaps
Project Team Member
Full Member
****
Posts: 217


36711000 kneecaps@shockpulse.co.uk
View Profile
« Reply #2 on: April 28, 2008, 09:10:47 AM »

If it's the time-pitch polynomial, there's a valid one in the vLVDC code that you can copy. It's supposedly for Apollo 8.



Thanks! I'll take a look. Is it in Octal?
Logged

"Okay. As soon as we find the Earth, we will do it."
- Frank Borman, Apollo 8

Current Work: ?? What next??

Future Work:
I know the AGC pretty well so anything need doing there?

On Hold/Completed:
SPS TVC in P40 issues.
P11 FDAI Error Needles (98%) complete. Comitted. Working A7 scenario.
P06 AGC Standby. Concluded. It's done by the AGC PSU.
Got us a complete AOH Volume II
irnenginer
Project Team Member
Sr. Member
****
Posts: 271



View Profile
« Reply #3 on: April 28, 2008, 10:23:16 AM »

The error needles have been a low level frustration for me for some time. I loaded the values you mentioned into Apollo 7 plus some other lavues that are needed for P11 error needeles and nothing happens. I have attempted to determine what the problem is a couple times and have been unsussesful.

There are 10 vaules used in the polynomial routine in P11.

POLYNUM-POLYNUM+12: The polynomials mentioned earlier
SATRLRT: Rate of roll, the roll rate of the roll porgram
RPSTART: Start time of the roll program
POLYSTOP: stop time of the polynomials, which happens before staging.

The calulation are in the VAGC CSM PAD LOAD Worksheet located in the Doc/Checklists.

I have had plenty of other fish to fry so I have left this on the shelf for some time. maybe you guys can figure it out. good luck.
Logged
dseagrav
Project Admin
Hero Member
*****
Posts: 1118


View Profile
« Reply #4 on: April 28, 2008, 10:43:38 AM »

Thanks! I'll take a look. Is it in Octal?

No, it's in decimal. You can find it in the pad load section of the code, I don't have a copy in front of me.

Logged
kneecaps
Project Team Member
Full Member
****
Posts: 217


36711000 kneecaps@shockpulse.co.uk
View Profile
« Reply #5 on: April 28, 2008, 12:09:13 PM »

The error needles have been a low level frustration for me for some time. I loaded the values you mentioned into Apollo 7 plus some other lavues that are needed for P11 error needeles and nothing happens. I have attempted to determine what the problem is a couple times and have been unsussesful.

Same here, I put totally bogus loads into the POLYNUM through POLYNUM+12. I would have expected SOMETHING to happen. I'm not sure the function is being called...i'll investigate.

Quote
POLYNUM-POLYNUM+12: The polynomials mentioned earlier
SATRLRT: Rate of roll, the roll rate of the roll porgram
RPSTART: Start time of the roll program
POLYSTOP: stop time of the polynomials, which happens before staging.

Right, it looks like it should be working..but it's not. I'll debug with yaAGC directly and see what P11's doing.

Quote
The calulation are in the VAGC CSM PAD LOAD Worksheet located in the Doc/Checklists.

I'm having the excel 2007 oct2dec issue with that sheet. Can you provide me with the octal loads as you see them please?

Edit : IGNORE --> I notice you have maybe have the wrong emems in that sheet too..i  make POLYNUM to start at 1661....the worksheet has 3262. 

I just noticed it's in switched bank six DOH! So apologies, you are quite correct.

Peter





« Last Edit: April 29, 2008, 05:12:03 AM by kneecaps » Logged

"Okay. As soon as we find the Earth, we will do it."
- Frank Borman, Apollo 8

Current Work: ?? What next??

Future Work:
I know the AGC pretty well so anything need doing there?

On Hold/Completed:
SPS TVC in P40 issues.
P11 FDAI Error Needles (98%) complete. Comitted. Working A7 scenario.
P06 AGC Standby. Concluded. It's done by the AGC PSU.
Got us a complete AOH Volume II
kneecaps
Project Team Member
Full Member
****
Posts: 217


36711000 kneecaps@shockpulse.co.uk
View Profile
« Reply #6 on: April 29, 2008, 07:34:10 AM »

More testing. I discover that during launch with the new pad loads the comp acty light in P11 behaves very differently when they are not loaded. I believe the maths is being crunched at the moment but somehow the FDAI stuff isn't being called/called correctly in software.

I need to find a way to do some debugging of the yaAGC while it's running in the sim...other than that I'm left to wade through the code...but I do have some starting points there.
Logged

"Okay. As soon as we find the Earth, we will do it."
- Frank Borman, Apollo 8

Current Work: ?? What next??

Future Work:
I know the AGC pretty well so anything need doing there?

On Hold/Completed:
SPS TVC in P40 issues.
P11 FDAI Error Needles (98%) complete. Comitted. Working A7 scenario.
P06 AGC Standby. Concluded. It's done by the AGC PSU.
Got us a complete AOH Volume II
irnenginer
Project Team Member
Sr. Member
****
Posts: 271



View Profile
« Reply #7 on: April 29, 2008, 09:55:09 AM »

Here are the numbers:
Code:
EMEM3261 77776
EMEM3262 70462
EMEM3263 26
EMEM3264 21213
EMEM3265 573
EMEM3266 11306
EMEM3267 77256
EMEM3270 54501
EMEM3300 44
EMEM3301 2126
EMEM3302 1750
EMEM3303 31764

All this is based on the source code numbers.
The address is, at least I believe, correct. Remember that the full address is E6,1661. The earsable memory banks have 2 "fixed" banks in 800o (octal) chinks addresses 1-1399. Banks 3-7 are "switched" (1400-1777) in 400o chunks. When you express a memory locatiion in the EMEM/CMPAD format it is expressed sequentially witout the switching. Therefore you have to add 400(octal) to the address for each earsable bank.

E6=400o*3=1400o
address:1661o

E6,1661 = EMEM3261

In order to debug the vAGC with yaAGC you use a memory dump button in the PAMFD.
Logged
kneecaps
Project Team Member
Full Member
****
Posts: 217


36711000 kneecaps@shockpulse.co.uk
View Profile
« Reply #8 on: April 30, 2008, 07:15:05 AM »

Here are the numbers:
Code:
EMEM3261 77776
EMEM3262 70462
EMEM3263 26
EMEM3264 21213
EMEM3265 573
EMEM3266 11306
EMEM3267 77256
EMEM3270 54501
EMEM3300 44
EMEM3301 2126
EMEM3302 1750
EMEM3303 31764

Thanks for that! I've got some driven deflection on the pitch needle now as the roll program starts. Which is progress of some sort Happy Prior to the loads I was only seeing 77777 on AK1 (FDAI error pitch register). I'm not seeing it driven 'down' a slight amount to 76652 and there abouts. So only small deflections. I don't think it's running properly still though because I can kill the LV thrust and not produce any great deflections.

I'm not a maths person so I don't know how the polynomials should work, but I think the issue relates to the loads. I'm going to experiment with some different pad loads.

Something i've noticed, concerning the location of POLYNUM. Irnenginer your pads start at POLYNUM, but the code indicates that the values you've provided should start at POLYNUM+1. However a padload at POLYNUM itself is required it would seem! See code below, notice that it gives POLYNUM FIVE..I'm not sure what is to be loaded here. Prehaps a minus -1?

I think i'm going to have to understand basically what polynomials are and what they do to solve this one.

Code:
# POLYNUM FIVE POLYNOMIAL DEGREE -1     (EMEM3261, POLYNUM      E6,1661)
# +1 2DEC -.469184028 E-4 A0                              (EMEM3262, POLYNUM+1....etc)
# +3 2DEC .137571556 E-2 A1                             
# +5 2DEC .231502280 E-1 A2
# +7 2DEC -.205929365 E-1 A3
# +9D 2DEC 0 A4
# +11D 2DEC 0 A5
# +13D 2DEC 0 A6

Logged

"Okay. As soon as we find the Earth, we will do it."
- Frank Borman, Apollo 8

Current Work: ?? What next??

Future Work:
I know the AGC pretty well so anything need doing there?

On Hold/Completed:
SPS TVC in P40 issues.
P11 FDAI Error Needles (98%) complete. Comitted. Working A7 scenario.
P06 AGC Standby. Concluded. It's done by the AGC PSU.
Got us a complete AOH Volume II
kneecaps
Project Team Member
Full Member
****
Posts: 217


36711000 kneecaps@shockpulse.co.uk
View Profile
« Reply #9 on: April 30, 2008, 09:11:07 AM »

Progress. I've looked at what the program is doing...and it's also there in plain english  Duh!
"#   THE FOLLOWING PAD LOADED COEFFICIENTS ARE
#   USED TO COMPUTE THE PITCH POLYNOMIAL

POLYNUM through POLYNUM+9D CALCULATES/EVALUATES the polynomial. It's not the pitch polynomial itself...that appears to begin as a padload at POLYLOC (which makes more sense actually!). POLYLOC is POLYNUM +10D.

What to put there though Happy
Logged

"Okay. As soon as we find the Earth, we will do it."
- Frank Borman, Apollo 8

Current Work: ?? What next??

Future Work:
I know the AGC pretty well so anything need doing there?

On Hold/Completed:
SPS TVC in P40 issues.
P11 FDAI Error Needles (98%) complete. Comitted. Working A7 scenario.
P06 AGC Standby. Concluded. It's done by the AGC PSU.
Got us a complete AOH Volume II
irnenginer
Project Team Member
Sr. Member
****
Posts: 271



View Profile
« Reply #10 on: April 30, 2008, 05:09:26 PM »

I think you are partly wrong but mostly right.

POLYLOC is not a varible in itself but a pointer to a location in memory ie (POLYNUM +10D). After loocing at the code some more it all makes sense to me know. POLYNUM needs to be 5 and the values I indicated easrlier are incremented by 1 in location. It is all used to invoke POWRSERS (Double Percision Polynomial Evaluator) and it need 5 (which is loaded into L) which is need for the polynmial order. I would suggest you try

Code:
EMEM3261 5
EMEM3262 77776
EMEM3263 70462
EMEM3264 26
EMEM3265 21213
EMEM3266 573
EMEM3267 11306
EMEM3270 77256
EMEM3271 54501
EMEM3300 44
EMEM3301 2126
EMEM3302 1750
EMEM3303 31764
Logged
lassombra
Moderator
Sr. Member
****
Posts: 410


View Profile Email
« Reply #11 on: May 01, 2008, 02:54:24 AM »

Are we seriously solving the error needles?

Ok, I am seriously psyched about what you guys have managed to solve here.  You guys are doing amazing.

I may know computers, but this math stuff is WAY over my head, and I thought I was pretty good at math...
Logged

My current Project Apollo work:

Quickstart to the Moon initiative (Quickstart_to_the_Moon): Done through earth orbit.  Working on new method of calculating TLI.

Checklist Controller: 
  • MFD Interface 99%(Minor cleanup and future features remain)
  • Panel Interface 99%
  • Excel interface and logic 99%
  • LEM Event code.0%
  • DSKY Interface code. Framework complete, creating "buttons"
  Approximately 80% done. (Checklist Controller
kneecaps
Project Team Member
Full Member
****
Posts: 217


36711000 kneecaps@shockpulse.co.uk
View Profile
« Reply #12 on: May 01, 2008, 04:00:32 AM »

Are we seriously solving the error needles?

I'm making good progress! I've determined that its 99% a pad loading issue. The memory addresses referred to not only provide the polynomial coefficients but one of the memory locations actually gets used to initialise the counter which actually loads the polynomials. 

Quote
Ok, I am seriously psyched about what you guys have managed to solve here.  You guys are doing amazing.

The fact that i've got needle deflection (if incorrect at the moment) shows me that the end to end 'processing' that drives the error needles is working. From what I now understand of the code it HAS to be the pad loads. I'm need to fully understand the code a little more.

Quote
I may know computers, but this math stuff is WAY over my head, and I thought I was pretty good at math...

I didn't even know what a polynomial when I started this little job. I still don't REALLY understand what they are but I have an idea of what they are used for in context of computing the pitch error. On a side note I currently only see code relating to the pitch and roll error needles. I don't think the YAW needle is driven in error during P11.

I'll summarise my findings so far in the next post. I prefer to keep my information in the thread for others to learn from.
Logged

"Okay. As soon as we find the Earth, we will do it."
- Frank Borman, Apollo 8

Current Work: ?? What next??

Future Work:
I know the AGC pretty well so anything need doing there?

On Hold/Completed:
SPS TVC in P40 issues.
P11 FDAI Error Needles (98%) complete. Comitted. Working A7 scenario.
P06 AGC Standby. Concluded. It's done by the AGC PSU.
Got us a complete AOH Volume II
kneecaps
Project Team Member
Full Member
****
Posts: 217


36711000 kneecaps@shockpulse.co.uk
View Profile
« Reply #13 on: May 01, 2008, 05:29:32 AM »

I will describe how I beleive the FDAI error stuff works so far (what I don't know is WHY it's not working yet, but I have some ideas), I made a breakthrough after starting the post but will continue!)

1) RPSTART is subtracted from TIME1. (if the result is positive it means that we are out of the initial launch attitude hold and into the roll program, this begins the FDAI error calculation code).

2) The result of the calculation above is then stored into the MPAC (Multi Purpose Accumulator). This load of RPSTART - TIME1 is very important to the computation of the pitch error as it is later read as input to the polynomial evaluator code (POWRSERS). The POWRSERS code takes the value found in MPAC as the Argument of the polynomial.

RPSTART - TIME1 is also saved to the location SPOLYARG (for use in the roll calculations according to the code but i've not investigated roll yet).

3) POLYSTOP is then added to the accumulator which currently contains the result of RPSTART - TIME1. This MUST yield a NEGATIVE value if processing of the FDAI errors is to continue. If this yields POSITIVE then then it is assumed time is past POLYSTOP.

4) POLYNUM (the number of polynomial degrees to be crunched) is then loaded into A and transferred to L to for further input into the later called POWRSERS. POWRSERS takes the value stored in L as the N degree of the power series later specified.

5) Next COEFPOLY (is the same address as POLYLOC which is itself POLYNUM+10 decimal locations) is loaded into the Accumulator (A) . This memory location (E6,1673 or HWADDR 3272) must actually contain the memory address of POLYNUM+1 which is the start of the polynomial coefficients in memory. I have set this to OCTAL 1662 in memory.

6) Control is then passed to POWRSERS to actually crunch the numbers.

Recap. As POWRSERS is entered the important registers and memory locations are set as follows (and POWRSERS expects it this way!):
A = Address of POLYNUM+1 (which in our case is OCTAL 1662)
L = The degree of the polynomials to be crunched (in our case 5..I'm going with the code here, don't have the maths skill to be sure!).
MPAC = The result of RPSTART - TIME1.

So the numbers get passed to POWRSERS which crunches the polynomial with the padloaded coefficients and the time into the Roll program (RPSTART - TIME1). The result is set into the MPAC.

The program then goes off and does a load of axis transforms and things to convert the outputs into the CSM axis and then stores attitude errors in AK,AK1 and AK2 and finally calls NEEDLER (which drives the FDAI error needles).

#   THE FOLLOWING PAD LOADED COEFFICIENTS ARE
#   USED TO COMPUTE THE PITCH POLYNOMIAL
#
#   ----- SUNDISK SI COEFS -----
#   POLYNUM      FIVE            POLYNOMIAL DEGREE -1   //PASSED TO POWRSERS via the L register)
#      +1   2DEC   -.469184028   E-4   A0
#      +3   2DEC   .137571556    E-2   A1
#      +5   2DEC   .231502280    E-1   A2
#      +7   2DEC   -.205929365   E-1   A3
#      +9D   2DEC   0         A4
#  POLYLOC+10D                                     THIS MUST CONTAIN THE MEMORY ADDRESS OF POLYNUM +1  //PADLOAD
#      +11D   2DEC   0         A5
#      +13D   2DEC   0         A6
#    POLYLOC      =   POLYNUM   +10D
Logged

"Okay. As soon as we find the Earth, we will do it."
- Frank Borman, Apollo 8

Current Work: ?? What next??

Future Work:
I know the AGC pretty well so anything need doing there?

On Hold/Completed:
SPS TVC in P40 issues.
P11 FDAI Error Needles (98%) complete. Comitted. Working A7 scenario.
P06 AGC Standby. Concluded. It's done by the AGC PSU.
Got us a complete AOH Volume II
kneecaps
Project Team Member
Full Member
****
Posts: 217


36711000 kneecaps@shockpulse.co.uk
View Profile
« Reply #14 on: May 01, 2008, 05:38:30 AM »

FIRST BREAKTHROUGH!!!! The needles are ALIVE!! ALIVE!!

The initial problem was the padload of POLYSTOP. The padload was positive 133 (in octal of course!). However looking at the code told me that when POLYSTOP was added to RPSTART - TIME1 the result was always going to be positive. At this point of the program a negative value is required to cause the program jump to begin crunching the attitude errors. Also I notice the code says

"AD   POLYSTOP   # NEG PITCHOVER TIME IN CSEC" The key is NEGATIVE. Pad loading a value of -133 means that the result of RPSTART - TIME1 + POLYSTOP (-133) is going to be negative until 133 seconds after the start of the roll program. EXACTLY WHAT WE WANT!

A postive 133 load here causes the program to thing the time has already passed to compute the attitude error and it never crunches the numbers.

Try adding these EMEMs to your Apollo7 launch scenarios if you want to see what happens so far. Things are not working right still....be we do have a lot of FDAI error needle activity Happy Stay tuned! I'll have this cracked soon!

EDIT: Corrected the value below. It should be EMEM3303 46013

Made a few test runs and it looks good!
 
Code:
EMEM3261 5     
EMEM3262 77776
EMEM3263 70462
EMEM3264 26
EMEM3265 21213
EMEM3266 573
EMEM3267 11306
EMEM3270 77256
EMEM3271 54501
EMEM3273 1662
EMEM3300 44
EMEM3301 2126
EMEM3302 1750
EMEM3303 46013

« Last Edit: May 01, 2008, 08:19:11 AM by kneecaps » Logged

"Okay. As soon as we find the Earth, we will do it."
- Frank Borman, Apollo 8

Current Work: ?? What next??

Future Work:
I know the AGC pretty well so anything need doing there?

On Hold/Completed:
SPS TVC in P40 issues.
P11 FDAI Error Needles (98%) complete. Comitted. Working A7 scenario.
P06 AGC Standby. Concluded. It's done by the AGC PSU.
Got us a complete AOH Volume II
Pages: [1] 2 3 4 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!