Meadville Space Center
Welcome,
Guest
. Please
login
or
register
.
May 20, 2013, 02:41:05 AM
1 Hour
1 Day
1 Week
1 Month
Forever
Login with username, password and session length
Search:
Advanced search
Project Apollo - NASSP 6.4.3 released!
http://nassp.sf.net
20010
Posts in
1929
Topics by
2250
Members
Latest Member:
mikegk
Meadville Space Center
Project Apollo - NASSP
Project Apollo - NASSP News & Discussion
(Moderators:
movieman
,
Tschachim
,
Swatch
,
lassombra
)
LVDC++ Software
« previous
next »
Pages:
1
2
[
3
]
4
5
...
18
Author
Topic: LVDC++ Software (Read 11955 times)
Tschachim
Project Apollo - NASSP
Administrator
Hero Member
Posts: 3687
nassp.sf.net
Re: LVDC++ Software
«
Reply #30 on:
March 24, 2012, 02:23:43 PM »
Do a CVS Update!
I moved lvdc_timestep to the newly introduced SaturnV::clbkPostStep. The old location is marked with the comment "// Nothing for now, the LVDC is called in PostStep", so you can move it back just in case. Also, in case some things are working better in PostStep (like lvimu.timestep and other things using getforce or comparing state vectors with the previous timestep) and others better in PreStep, i.e. the old location (like staging stuff) it might be worth to consider to split lvdc_timestep.
I'll try to figure out the S-IVB control functions you asked for the next days...
Cheers
Tschachim
Logged
meik84
Project Team Member
Sr. Member
Posts: 299
Re: LVDC++ Software
«
Reply #31 on:
March 24, 2012, 03:34:00 PM »
Ah! -but this IMU is still quite suspect to me. What do these 'CDURegisters' put out? The sensed accel? With compensation for gravity or 'raw' as it is?
Quote
I'll try to figure out the S-IVB control functions you asked for the next days...
If you are interested in it, you could also give me a brief 'command reference' for the SIB. AFAIK the flight software of SV and SIB didn't differ very much and I think I could adapt the code to fit for the SIB.
Oh, and where do I find the settings for the propellant flow rate? I need that for the artificial tau mode...
Logged
Tschachim
Project Apollo - NASSP
Administrator
Hero Member
Posts: 3687
nassp.sf.net
Re: LVDC++ Software
«
Reply #32 on:
March 24, 2012, 07:51:13 PM »
The CDU (Coupling Data Units) registers are the interface to the AGC (the lvimu is a direct copy of an older version of the CSM IMU, I have no clue if the IU really had an IMU like that). They contain both the attitude changes (LVRegCDUX/Y/Z) and the acceleration measured by the PIPAs (LVRegPIPAX/Y/Z in stable member coordinates, not vehicle coordinates). The acceleration is "raw", the IMU doesn't compute anything, it contains only sensors. In case of the CSM the AGC flight software does the "gravity compensation". The advantage of moving the lvimu.timestep function to PostStep is that GetForceVector isn't working correctly in PreStep (rapidly changing values which aren't correct also).
Using the LVDC++ for the Saturn 1B would be a great idea, the current "Autopilot" is quite a hack, reaching the historic orbit (as far as we know it) not exactly, especially incilnation-wise.
I'll try to post the commands, too. AFAIR most of the stuff is quite "Orbiter generic", i.e. SetThrusterLevel, SetThrusterDir etc., but I'll look for the details...
Cheers
Tschachim
Logged
meik84
Project Team Member
Sr. Member
Posts: 299
Re: LVDC++ Software
«
Reply #33 on:
March 25, 2012, 02:13:24 PM »
Quote
the current "Autopilot" is quite a hack, reaching the historic orbit (as far as we know it) not exactly, especially incilnation-wise.
Hm. Much of the precision for inc and LAN is done during the first few moments of boost, i.e. a bad azimuth can mess up a lot. I don't know if my LVDC++ will be better (I haven't brought it to orbit yet -the SIVB...) - but it doesn't do any wild yaw maneuvers, so at least it seems to
feel
confident in what it does...
Logged
dseagrav
Project Admin
Hero Member
Posts: 831
Re: LVDC++ Software
«
Reply #34 on:
March 26, 2012, 08:24:56 AM »
The first few seconds of launch is the Pre-IGM, and I had that working perfectly, as far as I could tell. I was even able to simulate engine failures and have them handled properly.
Logged
meik84
Project Team Member
Sr. Member
Posts: 299
Re: LVDC++ Software
«
Reply #35 on:
March 26, 2012, 03:54:07 PM »
As I said before: you did nothing wrong. The most important issues I solved were:
a) a bad calculation of the range angle. phi_T is calculated in radiants, not in degrees, even if the Boeing doc says different. This does not only apply to phi_T. Other angles are also declared in degrees, but are clearly calculated in radiants. I developed the rule of thumb that if an angle is pre-loaded, it's in degrees. If it is calculated, it's in radiants. Works in 99 of 100 cases.
b) a bad phi_T rotation matrix. The signs of the sinuses in the matrix have to be inverted, otherwise the following equations think that the rocket should fly westward and not eastward.
c) bad parameters. Numerous and endless, I've re-calculated most of them.
All in all I now read NASA docs with highly increased caution. When they are simple printouts of measured or calculated data, you can trust them. But when they are reports, manuals or other knowledge that has been 'ruminated' by somebody: big WARNING. Read them carefully and use your brain. Try to understand them and if you think "Hey, this guy doesn't know what he's writing about!": look for another doc, compare them and take what seems to be the most sensible.
Logged
meik84
Project Team Member
Sr. Member
Posts: 299
Re: LVDC++ Software
«
Reply #36 on:
March 30, 2012, 06:25:35 PM »
I can't help myself: there must be something wrong with the IMU. I've tried to compute F/m the way the real LVDC did: as the magnitude of the sensed acceleration vector, i.e. F/m = SQRT(accel.x^2 + accel.y^2 + accel.z^2). However, this does not deliver a constantly increasing value as you would expect it: I've drops of up to 1.7 m/s^2. In consequence, IGM is getting erratic, as tau (a important factor in IGM) is calculated by tau = Vex / (F/m). Dseagrav's 'hack' with thrust/mass makes the IGM work -but it doesn't solve the problem: when the magnitude of the acceleration vector is flawed, it's elements must be, too. In consequence, the position and velocity vectors will be wrong, too. And they are: comparing the log with the Ap9 operational trajectory brings position differences of more then 5 km and velocity differences of more then 60 m/s.
Interestingly, this has nothing to do with vehicle rates or so: it occurs during chi freeze the same way it occurs during roll/pitch program or IGM.
Logged
Tschachim
Project Apollo - NASSP
Administrator
Hero Member
Posts: 3687
nassp.sf.net
Re: LVDC++ Software
«
Reply #37 on:
April 02, 2012, 01:23:04 PM »
Could you post/attach a scenario, then I can take a look and compare with the CSM IMU?
Logged
meik84
Project Team Member
Sr. Member
Posts: 299
Re: LVDC++ Software
«
Reply #38 on:
April 17, 2012, 02:00:51 PM »
Forget it. Obviously navigation is carried out
every
simulation cycle. This is wrong. It's done every 'major cycle' or every 2 sec. I was up to change that switching logic anyway, but too lazy to do it.
Now I have to...
A 'Gretchen-Frage' regarding 'programing craftmanship': "Nun sag, wie hast du’s mit dem GOTO?"
Background is that it would be a lot easier to implement this LVDC stuff using it, but when they taught me programing, using GOTO was more then blasphemy. So I'm just asking before I'm placed on the stake...
Logged
dseagrav
Project Admin
Hero Member
Posts: 831
Re: LVDC++ Software
«
Reply #39 on:
April 18, 2012, 11:49:20 AM »
If you want to use a goto, go for it.
The computer still generates absolute jumps internally.
The "goto is evil" mentality comes from a common misinterpretation of a famous research paper.
Remember that you can't goto across contexts.
Logged
Tschachim
Project Apollo - NASSP
Administrator
Hero Member
Posts: 3687
nassp.sf.net
Re: LVDC++ Software
«
Reply #40 on:
April 18, 2012, 12:13:24 PM »
What dseagrav said. You should avoid writing "spagetti code" (
http://en.wikipedia.org/wiki/Spaghetti_code
), but if the code remains readable and especially if the real LVDC "code" or schematics / diagrams / whatever use goto's, it's fine for me.
Cheers
Tschachim
Logged
meik84
Project Team Member
Sr. Member
Posts: 299
Re: LVDC++ Software
«
Reply #41 on:
April 18, 2012, 02:13:47 PM »
Fine.
It's just that those flowcharts in the docs are a lot easier to realize with goto. Dijkstra and Wirth wrote their 'infamous' essay in 1968, well after LVDC's design had settled. I've seen a doc somewhere, written from the developers of the AGC, criticising the basic concept of the LVDC as an 'old computer': it was not capable of subroutines (a extensively used feature of the AGC), memory access was slow and complicated, the instruction set limited. Maybe this was only the retaliatory strike from the looser of the game (MIT competed with IBM for the LVDC and lost), but I can share some points of the MIT boys: IBM sold NASA a system which was barely capable to fulfill the task it was designed for and not more -but it was cheaper!
Logged
meik84
Project Team Member
Sr. Member
Posts: 299
Re: LVDC++ Software
«
Reply #42 on:
October 17, 2012, 12:51:22 AM »
One lifesign from me:
Quote
I can't help myself: there must be something wrong with the IMU.
I was right. It is. The problem is this here:
Code:
RemainingPIPA.X = pulses - (int) pulses;
This little line leads to the 'fluttering' F/m I experienced. I'm now providing the navigation routine with
double
type values instead of
integer
'PIPA pulses'. Works nicely, IGM is now smooth as silk.
The only thing I've got to find out is how this SIVB is started...
Logged
dseagrav
Project Admin
Hero Member
Posts: 831
Re: LVDC++ Software
«
Reply #43 on:
October 17, 2012, 07:42:16 AM »
I can do the staging when I get home, if you want.
Logged
meik84
Project Team Member
Sr. Member
Posts: 299
Re: LVDC++ Software
«
Reply #44 on:
October 17, 2012, 09:12:06 AM »
Thanks, but I guess it would be better if you'd answer me the questions I asked some months ago:
Quote
How do I:
- fire SIVB's ullage thrusters
- jettison them
- start SIVB's main engine
- shut it down again
- fire the APS after orbit insertion?
I've changed so much in the code, you wouldn't recognize anything. Just tell me which buttons I've got to press and I'll make sure they will be pressed.
Logged
Pages:
1
2
[
3
]
4
5
...
18
« previous
next »
Jump to:
Please select a destination:
-----------------------------
Meadville Space Center
-----------------------------
=> NEW MEMBER REGISTRATION
=> Site News
=> Project News
=> Orbiter
=> Off Topic
=> Rob Conley's Blog
-----------------------------
Project Apollo - NASSP
-----------------------------
=> Project Apollo - NASSP News & Discussion
===> News & Announcements
===> Support & Bugs
=> Project Apollo - NASSP Development
===> Planning
===> Programming
===> Modeling
===> Sounds
-----------------------------
Project Mercury
-----------------------------
=> Discussion & Help
=> Development
===> Planning
===> Programming
=> Mecury Mission Control
-----------------------------
Project Gemini
-----------------------------
=> Discussion & Help
=> Development
===> Programming
===> Modelling
===> Sounds
===> Planning
-----------------------------
Orbiter Mars Direct
-----------------------------
=> Planning
===> General News
=> Development
===> Programming
===> Modelling
===> Sounds
-----------------------------
General Projects
-----------------------------
=> The After Columbia Project
===> Sprint
===> Greenstar
===> Cyanstar
===> Bluestar
===> Mars Challenger
-----------------------------
Sol 2018
-----------------------------
=> Planning
Loading...