Meadville Space Center
Welcome, Guest. Please login or register.
July 08, 2020, 07:13:41 AM

Login with username, password and session length
Search:     Advanced search
Welcome to the new Meadville Space Center forums!
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/DSKY interface revamp
« previous next »
Pages: [1] 2 Print
Author Topic: AGC/DSKY interface revamp  (Read 3490 times)
movieman
Moderator
Hero Member
****
Posts: 1710



View Profile
« on: August 08, 2005, 05:37:49 PM »

I've just checked in the first stages in revamping the AGC<->DSKY interface to use the same I/O channels as the real AGC. This means that some functions for which you used to make direct calls into the DSKY (e.g. to set and clear the lights) are now calls in the AGC itself, which go to dskyinterface.cpp. Those then set and clear the appropriate bits in the I/O channels and other code reads the channels to determine what to display on the DSKY.

The upside is that before long it won't be too hard to conditionally wire-in the Virtual AGC, since we'll understand the I/O channels it uses. The downside is that it may break old scenarios over time as the 'intelligence' that's currently in the DSKY will be moved into the AGC code.
Logged
LazyD
Project Admin
Sr. Member
*****
Posts: 412


View Profile Email
« Reply #1 on: August 08, 2005, 08:06:19 PM »

movieman - this sounds like a good idea to me - I will keep my stuff up to date with your changes.  At this point my code knows how to fly but the AGC interaction is pretty rough, so break it - I'll fix it.  (might need some advice, though)

D.
Logged
movieman
Moderator
Hero Member
****
Posts: 1710



View Profile
« Reply #2 on: August 08, 2005, 08:25:23 PM »

Well, I'll make the code in CVS work, but any local changes you have may break Happy. Mostly it means removing 'dsky.' from most code that calls the dsky.

I actually have most of the CSM code working now locally, once I get the remaining bugs out I'll do the LEM code too.

Edit: LOL, wiring up the '+' key on the DSKY to the AGC would have helped Happy. Hopefully I can check in this new version tomorrow.
Logged
movieman
Moderator
Hero Member
****
Posts: 1710



View Profile
« Reply #3 on: August 08, 2005, 09:29:08 PM »

Ok, I think that's now working. Let me know if there are any bugs I missed Happy.

There are a couple of minor issues that I haven't sorted out, but basically we should be able to plug the Virtual AGC in now and wire it up directly to the DSKY... and it should just work if those issues are fixed. AFAIR we basically just need to track the key release on the DSKY and process that as well as the key-press: at the moment I just have a key-release happen immediately after the key-press.
Logged
Tschachim
Project Apollo - NASSP
Administrator
Hero Member
*****
Posts: 3700


nassp.sf.net


View Profile WWW
« Reply #4 on: August 09, 2005, 03:20:07 AM »

Movieman - that's great!  Very Happy
Looking forward to see the Virtual AGC back again!

Thanks
Tschachim
Logged

x15
Project Team Member
Full Member
****
Posts: 65


View Profile
« Reply #5 on: August 09, 2005, 06:11:14 AM »

Movieman


I think there is a problem saving computer state for the LEM only.

Data saved in Current State scenario is ok for the CSM but corrupted for the LM


Besides this, I think the perspective of getting the virtual AGC integrated is great  Happy

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



View Profile
« Reply #6 on: August 09, 2005, 06:20:30 AM »

Weird: the state-saving code is pretty much identical for both. I'll have a look tonight, I only really tested the state-saving code on the CSM, not the LEM, since most of it is in the apolloguidance class which is shared.

What specific problem are you getting?
Logged
x15
Project Team Member
Full Member
****
Posts: 65


View Profile
« Reply #7 on: August 09, 2005, 06:29:45 AM »

This is the data I got in the Current state scenario for the LM

AS-506-LM:sat5_LMPKD
  STATUS Orbiting Moon
  RPOS 799320.79 -55645.94 1562624.53
  RVEL 1494.900 100.408 -769.964
  AROT 169.64 -69.18 -141.06
  VROT 1.85 0.21 12.45
  PRPLEVEL 0:1.000 1:0.983
  THLEVEL 11:0.015 13:0.015 14:0.015 16:0.015 34:0.488 35:0.488 40:0.488 41:0.488 42:0.136 43:0.136 44:0.136 45:0.136
  NAVFREQ 0 0 0 0
  CONFIGURATION 1
  CSWITCH 277322752
  SSWITCH 326106880
  LPSWITCH 66125767
  RPSWITCH 0
  MISSNTIME 365832.175
  LANG English
  PANEL_ID 0
  REALISM 0
  APOLLONO 12
DSKY_BEGIN
  PROG 630618-01687-00007+00079
  VERB 0618-01687-00007+00079
  NOUN 18-01687-00007+00079
  R1 -01687-00007+00079
  R2 -00007+00079
  R3 +00079
  STATE 0
DSKY_END
AGC_BEGIN
  YAAGC 0
  BRNTIME 365928.890
  BRNSTIME 365928.969
  BRNETIME 366408.910
  EVTTIME 365833.984
  CUTFVEL 0.000


not a huge problem but i discovered it while trying to restart from where i Was during a landing (still working on apollo 15 landing sound)

the Computer was doing a self test on restart instead on running P63

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



View Profile
« Reply #8 on: August 09, 2005, 06:34:34 AM »

Oops Happy. I suspect the problem is that there's no '\0' at the end of the string. I guess I was just lucky that there happened to be a zero in the memory that the CSM allocated for the string, but not the LEM.

Note that old scenarios may no longer be compatible, as various things that used to be saved in the DSKY block in the scenario are now in the AGC block.
Logged
x15
Project Team Member
Full Member
****
Posts: 65


View Profile
« Reply #9 on: August 09, 2005, 07:44:46 AM »

better with initialization but not perfect

Prog is blank and AGC section is not finishing properly

see data below

DSKY_BEGIN
  PROG  
  VERB 06
  NOUN 64
  R1 +62 45
  R2 -00149
  R3 +00523
  STATE 5120
DSKY_END
AGC_BEGIN
  YAAGC 0
  BRNTIME 4.767
  BRNSTIME 366438.844
  BRNETIME 366574.269
  EVTTIME 366499.201
  CUTFVEL 62045.000


I checked and LastAlt is not intialized properly

I just added these init  and the last problem remaining
is that Prog is blank

I am ready to commit these modifs to CVS

please let me know if you prefer that i let you modify the code

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



View Profile
« Reply #10 on: August 09, 2005, 07:51:15 AM »

Sure, check it in. The Prog value won't be resent to the DSKY until a new program runs, so if you're loading an old scenario that was running a program at the time then it won't get updated.

Try running Prog 63 from orbit after running Prog 00 and check that it's saved and restored correctly then.

Quote
I checked and LastAlt is not intialized properly


Yeah, there's a bug where uninitialised floats can blow away oapiWriteScenario_float(): odd that I didn't see that problem when exiting after testing the LEM descent, guess I was just lucky.

Edit: another option would be to no longer save the DSKY display state and instead call UpdateAll() from the AGC after its loaded its own state. That would force everything through from the AGC to the DSKY, but would break older scenarios even worse.

Ah, no, we can't do that as the Virtual AGC won't resend state after being loaded.
Logged
movieman
Moderator
Hero Member
****
Posts: 1710



View Profile
« Reply #11 on: August 10, 2005, 07:04:26 AM »

I'll have a go at dropping in the IMU next: it shouldn't be too hard to wire up, but I'd like to convert it to a C++ class in the process.
Logged
Tschachim
Project Apollo - NASSP
Administrator
Hero Member
*****
Posts: 3700


nassp.sf.net


View Profile WWW
« Reply #12 on: August 10, 2005, 12:09:09 PM »

The Virtual Apollo IMU? Great!  Very Happy
And yes, please do a C++ class, originally I did it in the "Virtual AGC environment" (MSys/MinGW), this is why it's in plain C...

Cheers
Tschachim
Logged

movieman
Moderator
Hero Member
****
Posts: 1710



View Profile
« Reply #13 on: August 10, 2005, 12:14:00 PM »

Yeah, I wasn't planning to write it again from scratch Happy.
Logged
movieman
Moderator
Hero Member
****
Posts: 1710



View Profile
« Reply #14 on: August 10, 2005, 04:54:58 PM »

Ok, the IMU is now in. It's not doing anything much useful, but it is in Happy.
Logged
Pages: [1] 2 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!