Meadville Space Center

Project Apollo - NASSP => Planning => Topic started by: eddievhfan1984 on January 13, 2017, 11:20:50 PM



Title: The great AGC++ purge: A proposal
Post by: eddievhfan1984 on January 13, 2017, 11:20:50 PM
So, I'm working on the code to better implement standby, and I just realized something: with all the C++ AGC legacy code floating around in all these classes, I have a hard time telling what's supposed to be vAGC-exclusive, AGC++-exclusive, or a combination of the two. So, I would like to propose that we should flush our codebase of the C++ AGC code, since I don't think we're ever going to return to that code anymore.

Is this a good idea, or am I talking madness?


Title: Re: The great AGC++ purge: A proposal
Post by: indy91 on January 14, 2017, 07:28:46 AM
No objection. I had some similar problems when I worked on the LM code. The old AGC/lunar landing autopilot was still interfering with the DSKY. That's why it used to display P70 sometimes, because of the inverted input channel logic the old AGC thought an abort has been called for. The lunar landing autopilot is actually still in the current version as well, so that can also be removed.

And once the LVDC code is completely moved into the IU and it can hold attitude for TD&E, then the old IU GNC stuff can be removed, too.


Title: Re: The great AGC++ purge: A proposal
Post by: dseagrav on January 14, 2017, 10:07:26 AM
As far as I know nobody is using it. We'll probably break it when we start dumping things for V8, so as far as I am concerned it can go away.

The only notable thing I can think of related to it was there was a bunch of de-Americanization stuff we were supposed to enable later in the project that was going to be done in the AGC++ only because doing it to the actual software would be too much effort. Nobody has complained about the lack of this (or even mentioned it) in several years so unless someone is still offended we can just pretend we forgot about it.


Title: Re: The great AGC++ purge: A proposal
Post by: indy91 on January 14, 2017, 10:13:02 AM
One reason to keep it might be Skylab. We don't have Skylark, the AGC version flown on these missions, and we might never find Skylark. I know a few good documents about the Skylark rendezvous programs, which are more extensive than for the lunar missions, so potentially I would be able to use the AGC++ to implement the rendzvous programs. But we might as well use an earlier AGC version, let the RTCC do some of the ground calculations and start the onboard phase with TPI or NCC2 or so. The ground solutions were the primary anyway, so it's not a terrible loss if we can't do it onboard.


Title: Re: The great AGC++ purge: A proposal
Post by: dseagrav on January 14, 2017, 10:16:00 AM
Which is newer, Skylark or Zerlina?


Title: Re: The great AGC++ purge: A proposal
Post by: indy91 on January 14, 2017, 10:19:55 AM
Zerlina is for the LGC. It was branched off some time before the J-Missions and then developed concurrently: http://www.ibiblio.org/apollo/AGC-versions.jpg


Title: Re: The great AGC++ purge: A proposal
Post by: dseagrav on January 14, 2017, 11:05:32 AM
Well,the idea was if Zerlina was found and was that late in the game, there's still a chance Skylark might turn up if they were developed in the same timeframe.


Title: Re: The great AGC++ purge: A proposal
Post by: indy91 on January 14, 2017, 11:15:57 AM
Potentially. Zerlina is from the private collection of Don Eyles, who was one of the LGC developers. I don't think he has anything about Colossus and derivates.


Title: Re: The great AGC++ purge: A proposal
Post by: eddievhfan1984 on January 16, 2017, 03:29:14 PM
OK, sounds like a consensus.

Now the tricky part—the AGC++ code is spread throughout multiple different source code files. The biggest offenders are:

  • CSMcomputer.cpp
  • apolloguidance.cpp
  • DSKY.cpp
  • dskyinterface.cpp

From what I can see, vAGC-related code and AGC++ related code is mixed freely. I originally thought certain source files were strictly AGC++ implementations and the others were interfaces to the vAGC engine, but it's more complicated than that.

Daniel, do you have a good guideline as to what I can excise safely? Unless I'm mistaken, some of the code comments dating back to 2004 are signed by you...


Title: Re: The great AGC++ purge: A proposal
Post by: dseagrav on January 16, 2017, 04:11:28 PM
Personally, I would comment out everything and see what blows up, then uncomment things one at a time. When it builds again check things out, and if it survives you can start eliminating what remains commented out. If we go too far we can always get things back from git history.


Title: Re: The great AGC++ purge: A proposal
Post by: eddievhfan1984 on January 16, 2017, 05:30:42 PM
Yeah, trying that. Problem is, there's so many external function calls, I can't figure out where I should kill them all.

I've been setting up a project to model a standalone CM, though, so we can add in systems elements a bit at a time, in a nicely modular fashion. If I can. :P


Title: Re: The great AGC++ purge: A proposal
Post by: dseagrav on January 16, 2017, 07:10:45 PM
That's going to need to happen eventually anyway, so make sure you're doing this in the V8 branch.


Title: Re: The great AGC++ purge: A proposal
Post by: eddievhfan1984 on January 16, 2017, 08:40:59 PM
I'm doing this in my own fork, Orbiter2015 branch. If anyone can help with the modularization, that'd be great. :P


Title: Re: The great AGC++ purge: A proposal
Post by: eddievhfan1984 on January 17, 2017, 06:02:37 AM
As far as I know nobody is using it. We'll probably break it when we start dumping things for V8, so as far as I am concerned it can go away.

The only notable thing I can think of related to it was there was a bunch of de-Americanization stuff we were supposed to enable later in the project that was going to be done in the AGC++ only because doing it to the actual software would be too much effort. Nobody has complained about the lack of this (or even mentioned it) in several years so unless someone is still offended we can just pretend we forgot about it.


De-Americanization? Was that just putting everything in metric?


Title: Re: The great AGC++ purge: A proposal
Post by: indy91 on January 17, 2017, 07:00:58 AM
I'm doing this in my own fork, Orbiter2015 branch. If anyone can help with the modularization, that'd be great. :P

I'll surely help with that. After NASSP 7.0 is released.

De-Americanization? Was that just putting everything in metric?

Yes. But who uses metric in aerospace anyway, just Russia and China. I can easily live with feet, feet per second and nautical miles.


Title: Re: The great AGC++ purge: A proposal
Post by: meik84 on January 17, 2017, 07:23:22 AM
Quote
But who uses metric in aerospace anyway
The CMC internally AFAIK; that imperial thing was just a concession to the astronauts, who where pilots and wanted to stay with the units they knew. The LVDC was completly metric.
Aren't US companies obliged to use metric when they contract with US government today? One thing that I still find most silly in the US is that some containers have 'odd' imperial, but round metric capacities. You Americans are already dealing with metric, but you'd never confess it... :ROTFL3453:


Title: Re: The great AGC++ purge: A proposal
Post by: indy91 on January 17, 2017, 07:49:31 AM
Oh, I just meant as a unit to be displayed to pilots/astronauts. That would have been the only difference noticable to a AGC++ user anyway. As an engineer I am well aware that most things are calculated in metric nowadays, here in Germany anyway. Documents about mass properties of the CSM still used scary units like "slug" or "stone". :D Nowadays even most US companies work with SI units.

Aircraft that fly into Chinese airspace have to change their displayed altitude unit from feet to meters. And they have to slightly adjust the flight level, too, FL300 is not exactly a flight level in thousand meters. But in most other countries ft, ft/s and NM are the standard for these things. Russia is even transitioning to feet based flight levels.


Title: Re: The great AGC++ purge: A proposal
Post by: dseagrav on January 17, 2017, 09:09:23 AM
De-Americanization? Was that just putting everything in metric?
No - Some people were offended that Apollo was an "American military" achievement and not instead an achievement of the entire world, or some other country. Everyone talks about the Americans landing on the moon, ignoring the fact that the major talent came from Germany, and that most of the tracking network was in other countries. Presenting the entire project as an American achievement is offensive and jingoistic. To atone for this, we were supposed to also allow replacement of the US flag and markings with those of the United Nations or other countries. This would allow those offended by the American items to replace them with something more to their liking.


Title: Re: The great AGC++ purge: A proposal
Post by: eddievhfan1984 on January 17, 2017, 03:31:24 PM
I see. I can understand that, although Eisenhower wanted to make sure NASA was a totally civilian operation (even if it did use military hardware in some cases).

It might be an issue, depending on what happens in the next four years, but we can worry about it later if no one's complaining.


Title: Re: The great AGC++ purge: A proposal
Post by: jalexb88 on January 17, 2017, 04:07:31 PM
My take on this is were aiming for realism, right? What the astronauts used in the instrumentation in the spacecraft and manuals and procedures, was all imperial units. I think trying to change it to metric would also create a nightmare since all the checklists and Apollo documentation is in feet, feet/sec, nautical miles, etc, etc. Why try and make it harder on ourselves?


Title: Re: The great AGC++ purge: A proposal
Post by: meik84 on January 17, 2017, 05:02:34 PM
Quote
But in most other countries ft, ft/s and NM are the standard for these things.
Well, german gliderpilots don't care about that. We use m, m/s and km(/h) since the old days at the Wasserkuppe when silly guys flipped sillier guys in even more sillier gliders in the air with a long bungee cord. :D