[15:21:03] NASSP Logging has been started by indy91 [15:21:05] hello hello [16:39:15] hey Niklas [16:39:30] Guenter! [16:40:09] n7275! [16:45:22] discord is busy today [16:53:42] I just made it busier [17:32:26] I have to admit, I like the relative peace of the IRC channel :P [17:35:18] same [17:35:38] my brain isn't great with multi threading [17:40:16] I can not write NASSP code and answer 10 NASSP questions at the same time :D [17:40:55] but speaking of NASSP code, this moon-centered RTE code looks better by the minute. No feature creep and all my test cases work. [17:41:01] hahaha yeah [17:41:02] nice! [17:41:09] gone are the days where it randomly decides to use the other way around the Moon [17:41:16] that's awesome :D [17:42:03] I had a branch for this where I was a lot closer to the RTCC Requirements document already [17:42:08] but I didn't 100% trust it [17:43:08] writing code first (from a source) and understand exactly what it does second is not a good development method [17:43:45] but with this new, more limited attempt I think I know what I am doing [17:44:00] still more stuff I want to implement, but that can come in the next update [17:45:04] hahahaha that's the approach I use for pyul :P [17:45:27] but porting the actual code is a bit more forgiving than the flowcharts or whatever you're dealing with [17:53:19] https://archive.org/details/scans_171.png/page/n119/mode/2up?view=theater [17:53:22] mostly this [17:54:01] clearly a mature document because it accounts for many edge cases. But also full of typos. [18:01:12] these RTCC Requirements documents have not been great in terms of typos, definitely by greatest enemy [18:01:15] my* [18:04:28] yeah typos in this stuff are the worst [18:04:55] at least for me, they make me question my own sanity for quite a while before I start to really question if there are typos [18:08:45] the worst one in these flowcharts is when the typo is in the page number or letter of the code path [18:09:03] some of these are obvious [18:09:06] others not [18:09:38] I've definitely been stuck in a loop before when implementing this stuff in code :D [18:12:38] hahahah oh man [18:12:51] yeah that is very bad :D [20:47:09] night! [17:34:55] hey [17:40:30] 06rn5ng! [17:40:35] nope [17:40:38] morning! [17:40:39] there we go [17:42:20] hey Mike [17:42:41] 0 = m, 6 = o, 5 = i [17:42:46] I am cracking your code [17:44:58] interesting email about LVDC flowcharts [17:45:21] could be quite useful for us. Although I don't have a full grasp yet how detailed they would be. [17:46:53] I asked my 7094 guy about those. [17:47:15] brand new sentence right there... [17:47:20] aren't you your own 7094 guy? [17:47:38] Rich Cornwell [17:48:14] right [17:54:54] hahaha [17:56:22] I have seen some examples of automatically created flowcharts from the time [17:56:53] by IBM even [17:57:03] and I think Rich got a lot of his info from Paul Pierce who donated the 7094 that CHM has [17:57:56] why 7094? Is that what they used for LVDC development? [17:59:48] it's a guess. early LVDC work definitely precedes the existance of the 360. also the AGS cross assembler "LEMAP" ran on the 7094 [18:05:21] plus there's that PDF you found that lists the "compatibility" of the LVDC [19:08:21] which now I can't find [19:18:55] https://ntrs.nasa.gov/api/citations/19660025415/downloads/19660025415.pdf [20:49:13] night! [00:03:36] thewonderidiot, oh that one. [02:25:51] were you thinking of a different one? [03:56:52] nope that's the one, I was just rather surprised that I'd completely forgotten [04:01:19] yeah, and other computers like the 4π mention compatibility with the 360, but the LVDC page does not [14:30:40] hey [15:08:10] morning! [15:09:42] hey Mike [15:10:52] what's up? [15:11:05] finding good scenarios to test the RTE [15:11:35] I have many scenarios [15:11:40] just need to find the useful ones :D [15:11:48] hehehe [15:13:05] and you? [15:14:06] revisiting LVDC booting [15:14:55] the documentation clearly explicitly states that you put a hop constant at location 000 that says where to start execution [15:15:21] but I can't see how that would possibly work given the more detailed descriptions and the schematics [15:15:52] haha oh man [15:16:03] like the very initial thing with the computer [15:16:11] and we still have no LVDC software that actually runs at boot, so no clear answer from that [15:16:13] yup [15:16:14] already running into documentation issues... [15:17:03] most of the documentation is great [15:17:10] it's just this one sentence that I take issue with haha [15:17:48] careful, not that the lawyers are suddenly faster than you [15:17:53] like, in a good way [15:18:05] everything suddenly available... still no booting LVDC :D [15:18:45] lol [15:18:49] so according to the more detailed descriptions [15:18:53] how should it actually work? [15:19:36] what I'm seeing in the simulator is that the address gets set to 000 in module 0 [15:19:56] but then when you let it start executing, it just loads the first instruction from address 000 and begins execution there [15:20:08] instead of performing a literal HOP to some hop constant stored there [15:20:52] and so far everything I've found the simulator to be doing lines up well with the detailed descriptions [15:21:41] exactly how it gets there is weirdly complicated... as are many things in the LVDC [15:22:30] is anything interesting at address 000 in the software? [15:22:50] not in any software we have [15:23:01] presumably the preflight program would have stuff there, but we don't have that [15:24:18] so write your own preflight program. One line of code. Jumping to where you want it to actually start? [15:25:52] yeah, the goal is to write my own preflight program. it's not quite that simple, I think I need to call a couple of things in the flight program before finally jumping to it [15:26:17] but I want to make a preflight program that works in both yaLVDC and my simulator [15:26:30] which isn't going to happen until we figure out how the darn thing boots :P [15:28:34] I remember I had to load the address to start somewhere when I implemented yaAEA in NASSP [15:29:10] managed to figure out how that was done. Very proud of myself, didn't want to deal with that sort of stuff :D [15:29:34] very easy with a working emulator and complete software... [15:31:14] haha nice [15:31:20] yeah right now for the LVDC I have neither :P [15:32:43] ah I am misremembering, it was probably the Block I emulator [15:33:35] Block II: vagc.Erasable[0][05] = 04000; // Z [15:33:44] Block I: vagc->memory[02] = 02030; // Z [15:33:49] ok, not exactly complicated [15:33:55] but I was happy that it worked on the first try :D [15:34:44] nice :D [15:37:06] regarding LVDC flowcharts, with our LVDC it was in many cases not that we couldn't figure out how to make something work. [15:37:34] It was more, if we have to come up with it ourselves (lacking documentation), how do we think it works in the real thing [15:38:15] so even if those flowcharts don't go to an equation by equation level, they could probably tell us the overall flow [15:38:32] like, what would make sense to put in a subfunction etc [15:39:37] just a bit of restructuring things at a higher code level where we came up with our own way previously [15:39:41] right, yeah [15:40:08] as long as the parts in question are actually covered by this flowchart annotation. it's sadly not exhaustive [15:40:15] hmm right [15:41:08] especially the attitude timeline is quite a mystery to me [15:41:26] one thing I implemented with some pretty made up code is TD&E in Earth orbit [15:41:42] I know there was an uplink that could disable TLI in case of a failure and would then enable TD&E for Earth orbit [15:41:51] but which attitude and when does the LVDC maneuver to it [15:42:09] that's maybe something that could be found in a flowchart [15:42:38] not the exact numbers, but the overall logic to it [15:43:50] it's not something I could really ask you to search for, I'd really have to look at it myself. I don't yet know what I am even looking for [15:43:58] not like the presettings [15:44:15] or some highly specific questions I have asked you before [15:44:22] oh weird [16:46:08] I'm working on writing a github issue about LVDC booting... half to justify it to Ron, but half to convince myself haha [16:46:30] and the convincing myself is working. I'm understanding how this all works a lot better as I go :D [16:51:11] the descriptive text in the documentation is pretty hand-wavey [16:51:40] "RUNVN inhibits memory operation during phase A" -- actually only bit times 6 through 12 of phase A [16:52:07] "RUNVN and HOP inhibit memory operation in phases B and C" -- this actually fully inhibits them in all of phase A as well, instead of just part of it [17:03:44] what phases are these? [17:10:59] LVDC instruction cycles are complicated [17:11:08] each instruction has three phases, A, B, and C [17:11:19] each phase has 14 bit times, 1 through 14 [17:11:28] each bit time has for clocks, W through Z [17:11:51] so to specify when something occurs time-wise in the circuitry, you need to give all three. instruction reads begin at A-7-Z [17:13:37] they're essentially progressively faster frequencies of clocks [17:14:10] yeah sounds weird haha [17:16:47] timing in general in the LVDC [17:18:10] * everything in the LVDC [17:18:12] :D [17:38:55] weirdest thing of all, it crashes into the Moon sometimes [18:31:06] hey guys [18:35:03] yo [18:36:03] hey Matt [18:36:05] ah [18:36:06] https://github.com/virtualagc/virtualagc/issues/1082 [18:36:08] oh wow I lied actually [18:36:10] this already exists :D [18:36:16] they also tried to release Colossus 234 [18:36:37] that one didn't even have a chance to be manufactured into rope modules though [18:37:14] 236 gets more complicated [18:37:17] COLOSSUS Memo #81, "COLOSSUS Revisions 233 through 236, COL 236 Revisions 1 and 2", 08/19/1968, by P. Rye. [18:37:37] ???? [18:38:03] really? I had no idea that 236 had revisions! [18:38:11] if they make revisions to revisions they (think they) are close to launch :D [18:38:46] but then they ended up on 237 anyways? [18:38:51] that is super weird [18:38:53] [07:00:35] .tell indy91 I'm trying to figure out what changed between Colossus 236 and 237... no luck so far. GAP apparently didn't do the asterisk thing in mid-68 [18:38:56] [07:03:24] .tell indy91 it's in bank 31, which narrows it down to R34, P23, S30.1, S31.1, or R35 [18:39:09] oh thanks past me :D [18:39:46] hmmmmmmmmmm [18:40:56] do we have Colossus anomaly reports this early? [18:42:16] well [18:42:20] we have COL-1 and COL-2 [18:42:30] COL-1 was for Colossus 224, and COL-2 is already for 237 [18:42:59] and COL-1 was user error apparently [18:43:13] so the real question is, did they even bother filing anomaly reports this early [18:43:39] hmm, I guess not [18:51:00] well, darn. maybe we don't have enough new info for that one yet [18:51:21] no distractions from LVDC for me :D [18:56:23] good :D [18:58:56] I am getting pretty excited to try this repeatable flight simulation mode [19:03:11] if the emulator works right it should do pretty fun things, once it starts up [19:04:02] well I know the emulator does not work right currently for multiply at the very least [19:04:07] almost certainly that means divide too :D [19:05:35] I bet those two instructions are used on the way to orbit [19:06:55] more like, milliseconds after GRR [19:21:07] hahaha yeah [19:21:11] and not even just for math [19:21:21] kind of like the AGC, multiply gets used for shifting and masking [19:21:51] and because it's the LVDC, that shifting is kind of used to construct instructions [19:22:03] so, very bad things happen if multiply is off [14:16:54] hello [14:20:14] hey Matt [14:20:59] trying to come up with a better solution for the texture size multiplier in the VC pull request. It gets used in timesteps, which I don't like [14:21:21] it's a constant integer, no real need to do any calculation there [14:22:22] all I can come up with is adding separate texture size variables for VC vs. the 2D panel though [14:25:25] I know that if it gets merged like this a future NASSP developer having to work on texture blitting is going to be really annoyed :D [14:33:37] multiplying by a constant in a timestep is probably better than checking a conditional in a timestep, but neither are really ideal. [14:34:08] some way we could do those calculations in an init function? [14:36:49] yes, but then it needs to be separate size variables for 2D and VC [14:37:05] so adding more variables vs. unnecessary calculations in timesteps [14:37:42] like for talkbacks. size is set in the Init function as the variables "x" and "y" [14:38:01] This is in the 2D timestep: [14:38:02] oapiBlt(drawSurface, switchSurface, x, y, width * (int) displayState, 0, width, height); [14:38:11] this for the VC right now: [14:38:15] oapiBlt(drawSurface, switchsurfacevc, x*TexMul, y*TexMul, width * (int)displayState*TexMul, 0, width*TexMul, height*TexMul); [14:38:22] separate timestep functions for 2D and VC anyway [14:38:45] and all those multiply by TexMul, for every talkback, every timestep... [14:38:52] and a bunch of other classes with the same thing [14:38:54] not ideal [14:39:07] so like you said, in the Init function it could do [14:39:14] x_vc = x*TexMul [14:39:31] and then in the VC timestep the function would be the same as in 2D, except use x_vc etc. [14:39:39] that's one idea [14:41:01] so for x, y, width and height it would need to have separate VC variables [14:41:32] multiplying by texmul might be less code to undo later actually [14:42:11] at least it's once per timestep, not per substeps like the systems stuff [14:42:57] by later you mean when we get rid of the 2D panels? [14:43:37] yes. when we get rid of them or when move to the 2d mesh method [14:44:14] if we do that TexMul can be removed. Or it could be done with Mike's favourite solution then, the calculation is done during compilation [14:44:32] true [14:44:47] that would be easier to switch from 4k to 8k [14:44:52] make it* [14:45:04] just a define somewhere [14:46:19] yeah. Can't be done right now sadly. [14:46:50] over all it is not such a big deal in the timesteps right now [14:46:55] eventually the VC should use animations for stuff like talkbacks, tape meters, etc [14:47:54] the most problematic case is the IndicatorSwitch class, for talkbacks. We have a bunch of them. All the other cases where TexMul gets used in the timestep right now are a few specialized classes, where we have only 1 object of a class. [14:48:17] so it's really not a huge deal in terms of performance [14:50:27] yeah [15:00:32] so in that branch how does one select between 4 and 8k textures? is there a config file option or is it on the PA configurator page? [15:02:02] I thought it was a separate set of textures actually [15:02:08] in a different branch? [15:02:15] now I am not sure. Would have to ask Jordan [15:02:45] in the branch that there is a pull request for. [15:03:24] Jordan posted a link to the textures on Discord [15:03:31] ooooh [15:03:33] and then you change TexMul in NASSP code to 8 I guess [15:05:28] I thought the pull request added both. that makes more sense [15:06:02] that's one good way for the NASSP install size to skyrocket, supply all sets of possible textures [15:06:15] then it has become a modern video "game" I guess [15:10:07] not that it's huge deal. NASSP just went past 300MB with the added Apollo 12 flight plan [15:10:13] still small [15:10:35] yeah I'm sure we're far from the largest release there [15:10:45] on GitHub [15:11:01] just the number of our releases is high haha [15:11:52] There is really not much need to keep anything but the NASSP 7.0.1 and maybe the past few NASSP 8 releases. But as long as Github doesn't complain... [15:22:43] morning! [15:22:59] if history is any evidence, if we really want to preserve our software long-term, we should print it. [15:23:03] hey Mike [15:24:31] hey Mike [15:24:34] haha oh no [15:25:03] Visual Studio has a print option [15:25:10] I wonder how many pages the whole NASSP code would be [15:25:26] I probably run out of paper with the RTCC code alone [15:25:33] I've never tried haha [15:26:37] at least you didn't say core rope modules as long term preservation [15:30:12] I think you'd need a rather large rope module to fit one of our DLLs [15:34:39] I got to thinking about valve and tank sizes again last night while trying to update systems config things [15:35:54] we save those in the scenerio because there is a few isolated cases where they can be changed by other code [15:37:06] but they're always changed something that has a defined range like a proportional valve or a handle [15:39:05] I think it might be possible to eliminate saving those parameters [15:39:46] yeah that would definitely be good for scenarios not getting outdated [15:44:36] I'm thinking of giving the valves a function to set a pointer to an external device like a handle angular position. size would never change, but it would be multiplied by a 0-1 scaling factor [15:44:46] % open or closed [15:44:58] could also be a voltage [15:45:21] just a double* [15:59:18] I do like the idea of having it as a separate variable [15:59:24] it could be derived class that has that [15:59:32] normal class doesn't save/load valve size [15:59:49] the additional variable gets multiplied with the valve size [16:07:02] in not sure it would even need to be a derived class. handle positions get saved already, and voltages are all saved for eObjects [16:09:29] what might be useful is something like our toggle switch classes, but for pipes. like an expansion of mixingpipe but something that an external "signal" could control. [16:09:59] basically selecting different in and out valves [16:11:21] only if it lets us remove the complicated ECS code for doing what the spool valves do [19:23:59] thewonderidiot, it's legal to have two labels in AGC code with the same name? [19:24:07] VERB69 TC VERB69 # VB69 CAUSE RESTART [19:24:14] I don't understand this in extended verbs... [19:24:41] and where does it even jump [19:24:53] oh [19:25:00] this isn't doing what I think it is doing [19:25:29] this isn't causing an infinite loop on purpose... or does it? :D [19:57:31] yes it is [19:57:36] just jumping to itself [19:57:41] it's the fastest way to crash the computer [19:58:33] that's why V69 is "hardware restart" -- it's triggering the TC Trap hardware alarm which causes the computer to immediately reboot from address 4000 [19:58:47] it's a full GOJAM so most of the internal hardware state gets reset as well [20:00:04] I guess I was expecting something more like V36 :D [20:01:50] no V36 is significantly more invasive [20:02:13] that's a "fresh start" that initializes a ton of software state to 0 [20:02:46] V69, because it causes a crash, is treated like one -- the software picks up from the last phases saved in the restart tables [20:06:06] ah so when doing a V69, it eventually also goes through some code that V36 uses? [20:08:37] they're different types of restarts, and there is a bit of shared code [20:08:59] I see [20:09:02] but V36 is not going to try to restart anything [20:09:21] it's going to clean up memory so you have a fresh, reproducible starting point [20:12:19] "The RESTART routines perform a general reinitialization of the machine rather similar to that done by a Fresh Start (V36E) and in fact using common coding. This includes clearing out the EXECUTIVE's list of currently scheduled Jobs. While a Fresh Start leaves the computer in a basic initial condition requiring loading and operator activity to bring up useful activity such as a Mission Program, the RESTART routines pass off to anoth [20:12:21] tine which works in conjunction with the 'restart protection' of the interrupted program... to automatically put that program back into action at a logical point without loss of significant data such as the state vector and the PIPA's." [20:15:12] right, in the end, very different verbs [20:48:11] night! [22:09:58] thewonderidiot, that PCM decommunicator manual made some sense of a few things [22:10:07] nice! [22:11:01] the specs don't make it seem like it would have enough memory to hold a program complex enough decode the HBR frames and subframes [22:11:14] until you know how it works [22:16:04] I bought that manual because Jimmie has a huge pile of the radiation, inc. modules from what was presumably the JSC 540 Decom [22:16:26] but I'm glad that is is being useful in other ways too :D [14:21:20] hey [14:24:29] hey Niklas [14:29:02] cryo heaters weren't wired to anything? [14:37:59] they were wired directly to the busses [14:41:18] ah [14:53:50] the problem I was trying to solve (without looking as closely as I should've) was actually caused by the direct O2 valve being too big [16:03:31] cool, m,y rebase didn't break anything [16:03:42] my [16:08:54] there are actually a fair number of CBs that aren't hooked up still [16:15:04] the CSM has so many :D [16:17:27] morning! [16:23:25] hey Mike [16:35:38] hey [16:36:03] how goes the multiplication [16:43:36] annoying :D [16:43:50] at least it isn't divide! [16:44:08] I might try to tap into the circulation loops here so I can see the intermediate data [16:44:16] lol don't remind me, that is probably next [16:44:40] how does one even simulate circulation loops [16:45:01] I've struggled a lot in NASSP with any kind of delayed signals [16:46:04] verilog has an unsynthesizable feature that lets you delay any signal by a certain amount of time [16:46:15] so I'm using that in the simulator [16:46:21] for the FPGA I'm using a giant shift register [16:47:21] shift register kind of makes physical sense [16:48:13] just have to use something with regular timing [16:48:28] yeah [16:48:32] which is not that trivial in Orbiter [16:48:37] but can be done [16:48:41] in fact our LVDC does it [16:48:56] its timestep function gets called 100 times per simulated second, not matter what [16:49:22] I forgot why exactly that number, I think that's the finest timing I needed for anything :D [16:51:59] haha oh man [18:06:58] alright I have managed to intercept the multiplicand lol [18:08:30] weirdly: "When the sign of the multiplicand has entered the MD1 latch, the entry gates are disabled and the register loop is closed. Gate A1 is disabled at bit-time 1-Y when TBCV goes to a "0" and gate A4 is disabled by P2VN at bit time 1-Z. The low-order bit of the multiplicand returns to the MD1 latch at bit-time 3-Z. Thus, the previous contents of the register which entered MD1 at bit-times 1-Z and 2-Z are allowed to continue cir [18:08:31] ng. The values of these bits cannot be determined." [18:08:43] I think this means that you can expect the bottom two bits of the multiplicand to be random garbage [18:08:53] which is consistent with what I'm seeing in this intercepted value [18:10:40] oh no, I intercepted it one bit off [18:15:32] what a strange computer [18:17:37] yeah in the AGC I could have just directly looked at this number [18:17:51] instead of having to determine that it was circulated at the same period as the TMV timing signal [18:18:34] and then counting clocks after the TMV rising edge to find the point at which I can sample my shift register to grab the multiplicand value [18:21:10] but I'm almost there I think. hopefully the multiplier and partial product registers have similar enough timing [18:45:56] fun [20:32:37] well, my naive python implementation of the LVDC algorithm is matching the simulator in all cases [20:32:58] no weird off-by-one errors like I'm getting by using native multiplication [20:33:46] obvously will be less performant than a native multiply instruction, but the LVDC is a much slower computer than the AGC and it's only 6 iterations [20:43:09] it needs iterations? [20:44:30] well it's a serial computer, so if they did it the simplest way it would have needed 26 iterations [20:44:41] but they did it four / five bits at a time [20:45:22] oh I see [20:45:51] https://pastebin.com/raw/9Bh6sx9r [20:45:56] this is their algorithm [20:47:03] roughly speaking [20:47:07] looks like fairly efficient code, even if it's just for one instruction [20:47:20] the Virtual AGC does a lot worse on each cycle :D [20:47:23] haha yeah [20:47:45] so the LVDC is really much slower? Kind of impressive then that the managed to run the IGM on a similar time cycle as LGC powered descent guidance [20:48:42] I guess there is no DAP... [20:49:32] they both have the same basic clock frequency. but the LVDC takes ~82 microseconds for every single instruction, compared to the typical 23 microseconds for AGC instructions [20:49:51] LVDC has no DAP, but there is still a lot to do in the minor loop [20:51:23] not having an interpreter equivalent probably saves them a lot of time [20:52:40] hmm, I thought the servicer would be avoiding the interpreter as much as possible [20:52:52] but I guess with some of the vector math it's not really possible [21:08:29] night! [14:37:46] hello hello [14:38:06] n7275, I should do the same with my XRSound branch as you with your drifting IMU one [16:20:28] morning! [16:20:31] hey Niklas [16:20:34] hey Mike [16:20:56] something catastrophic has happened with my server [16:21:19] so I am without my trusty IRC bouncer today [16:21:46] but I have the logs [16:25:56] indy91, rebasing? [16:26:15] just putting it up on Github as a draft PR [16:26:19] hey Mike [16:26:24] ooooh [16:26:27] yes [16:26:31] good idea [16:27:10] GitHub sent me about 20 emails this morning, haven't looked at them in detail yet [16:39:06] speaking of that IMU branch, I recall a brief mention of our CDUs either here or on Discord a few days ago [16:39:56] I'm not super familiar with our CDU code. how much work do you think it would be to make those drive the IMU? [16:42:22] not a lot, more mental work, convincing ourselves that there is no chance that the CDUs are getting desynced from the IMU [16:42:56] if we want to also implement coarse align properly, being able to delete some of that cheaty Virtual AGC code, then our IMU might need to have inertia [16:43:32] I'm quite interested in trying that [16:46:45] hmm [16:46:56] now I am not sure how separate those two things can be [16:47:32] oh? [16:47:52] like, make the IMU use our CDU class without also implementing coarse align properly [16:48:08] ahh okay [16:48:33] although potentially we could first make the CDU drive the FDAI errors only, but during coarse align use the current cheaty code in Virtual AGC and IMU [16:48:49] and use the read counter already as well [16:50:47] that might be better [16:51:45] hmm [16:52:22] reading that Virtual AGC code now, maybe the problem is more that if you just add the coarse align increments directly to the IMU it appears like jerks [16:54:35] for RR and CSM optics the error counter content is used as a drive rate (speed) [16:55:06] that wouldn't move jerkily [17:02:27] how accurately would that hold position under time acceleration though? [17:04:18] that's what we have to test :D [17:08:09] :) [17:44:18] oooo new texture branch got merged [17:44:21] nice [17:52:06] yep [17:52:10] finally [20:43:14] night! [21:28:47] ...it was DNS [21:29:17] ah, a classic culprit [05:18:00] .ask indy91 does the mission file loading function work differently than it used to? I can't get it to load my drift rates any more. [11:40:55] .tell indy91 disregard... I figured it out [16:59:06] hey [17:00:13] hey Matt [17:00:31] the code is different [17:00:57] I chose the painful way of making the new mission file loading code backwards compatible, pretty ugly code now... [17:04:04] it will work for testing [17:06:01] it's a bit odd that there isn't much documentation on modern ways of doing this [17:06:25] other than just reading the ISO standard, I guess [17:08:20] I'm sure there are better ways. I just used the Orbiter config file loading function initially [17:08:38] that's how we got the format [17:08:40] CSMHasHGA=FALSE [17:08:41] and such [17:09:01] but the function doesn't work with having the same setting (like CSMHasHGA) more than once [17:09:14] which I wanted to use with the cue cards [17:09:40] there would have been a better way to do it from scratch, but I didn't want to break the mission files format [17:10:57] feel free to make it better, the code right now is not great [17:28:20] morning! [17:49:46] hey [17:49:52] what's up? [17:51:12] continuing a bit with the padload generator [17:51:19] need to make the pitch polynomial mission specific [17:51:53] theoretically it now supports all CMC versions we have, but I haven't verified it yet for a few ropes [17:52:20] and even one we don't have yet right? haha [17:52:25] yes [17:52:29] Comanche 67, 72 and 108 [17:52:36] oh you already support 108? [17:52:45] also not fully verified [17:52:56] hahaha it is hard to verify. that one is ambitious :D [17:52:59] have to type the whole flown padload into a file first [17:53:34] it's not that far away from 72 padload wise [17:53:50] definitely more address differences than between the previous missions, but not too bad [17:54:00] Comanche 72 that is :D [17:54:07] haha right [17:54:10] 72/3 [17:54:18] more precise and less ambiguous :D [17:54:26] for the padload it doesn't matter :D [17:54:32] I think? [17:54:39] if it does I'm going to be incredibly sad [17:54:46] but I'm quite confident that it doesn't [17:55:01] it mattered between Luminary 69 and 69/2 of course [17:55:25] and 131 and 131/1 [17:55:29] oh yeah [17:55:32] huge difference [17:55:44] ...and Sunburst 116 and 120. that one new padload got us [17:56:22] I didn't even bother implementing support for Luminary 131 [17:56:31] or using more precise naming :D [17:56:32] hahaha definitely fair [17:56:55] at some point maybe [17:57:23] I'll finish all the Colossus and then probably Zerlina and Skylark [17:57:49] Skylark potentially on a new GUI tab [17:58:25] oh right I forgot we had Skylark padloads [17:58:44] multiple ones even [17:59:20] there are definitely a few things I haven't worked out for it [17:59:55] I know I figured out the math to calculate the Earth inertial to Earth fixed matrix [17:59:58] LMATRIX [18:00:22] but the solar ephemeris, it uses the same method as Luminary, but most of it in erasable where Luminary has it fixed [18:00:31] so I didn't have to come up with a calculation for that previously [18:00:46] ahhh right [18:02:24] and a few other padloads I haven't even heard before. Hopefully they don't get changed between missions, then I can just hardcode them in the padload generator code [18:02:44] probably for the special Skylab docked DAP [18:04:27] well we have the Norton document too, so hopefully he will have described those well [18:04:33] ah right [18:04:38] so there should be no unknowns [18:04:47] just some math to work out, but should be no big problem [18:05:19] oh I think there are SGA memos about this solar ephemeris stuff [21:12:40] night! [14:51:22] hey [15:27:21] morning! [15:40:28] hey Mike [15:47:21] what's up? [15:48:20] trying to debug the Return-to-Earth case from MaxQ from yesterday. Apollo 11, TIG a few times before flying by the moon, result is 100 ft/s higher than optimum. [15:48:32] a few hours* [15:49:21] the calculation assumes the DV is nearly a quadratic function of reentry time, finding the minimum that way. But it's not super quadratic for me [15:49:27] in this specific case [15:53:46] hmmmm, weird [16:27:16] how is the LVDC treating you [16:27:23] and LVDA I guess [16:28:37] does it feel like having delay lines in your brain yet [16:37:37] didn't get a chance to work on it much last night [16:37:50] but the astrionics system handbook has a diagram for the LVDA that I wish I could find for the LVDC [16:38:45] hmm [16:38:50] checked the Systems Handbook? [16:39:16] https://i.imgur.com/0Wy8QjR.png [16:39:41] which bits are where in the delay line at each time [16:39:58] you mean the saturn systems handbook? [16:43:03] doesn't look like it goes into that detail if so [16:44:11] yeah, Saturn Systems Handbook [16:44:22] has some good details, but maybe not what you are looking for [18:30:37] I might try to divide for the first time tonight [18:30:51] I'm very comfortable now that yaLVDC and the simulator are producing correct results [18:31:15] with divide, it will be a mystery all over again if I'm getting correct results or not, with no easy way that I've found to determine correctness :D [18:31:22] I don't think we have any actual numerical examples [18:34:15] don't think I have seen any [18:34:42] I found exactly one way to prove correctness for multiply in the AS-512 software [18:35:07] there's a spot where they multiply by D.KB13 (a constant containing only bit 13), and it expects to shift syllable 1 into syllable 0 for an instruction word [18:35:25] so at least I can prove I get the right shift there :D [18:35:31] I doubt they use divide for anything like that though [18:37:28] > The product-quotient register has been assigned an address and is addressable from the operand address of the instructions SUB, AND, ADD, XOR, STO, RSU, and CLA. [18:37:45] there's another way to be mean to yaLVDC. I bet it lets you use 775 with all instructions [18:41:20] sounds very mean [18:43:15] about the repeatable flight simulation, there isn't an expected end result in the listing, is there? [18:43:28] not that I have seen [18:43:59] if it makes it too orbit then most instructions should work about right. But if there was an expected end result then having it bit by bit accurate would be a really good test. [18:44:03] it to* [18:44:35] do you know when exactly it's supposed to end the simulation? [18:46:56] EDD says it ends at 145 seconds after orbital insertion. For the Saturn IB [18:48:04] but Saturn V is different [18:48:15] it fires the APS ullage thrusters for a while [18:48:25] so it keeps accelerometers running longer then the Saturn IB LVDC [18:48:35] than* [18:49:06] so it takes a bit longer for the Saturn V to finish all the post insertion stuff [18:49:25] but 145 seconds would be long enough for it as well. Could be a different value though [18:52:40] the end of it might be triggered in the events processor [18:52:51] so maybe check that somewhere near TB5+145s [18:53:04] gotcha, will take a look [18:54:07] also I just ran a divide in the simulator out of curiosity. like I saw with multiply, the results are close to correct but off of perfect by up to 4 bits [18:54:32] ....which means I probably am going to have to implement their division algorithm for yaLVDC to get exactly correct results [18:54:55] if there isn't an error in the simulator. but I would kind of expect a simulator problem to cause a gross error, and not just "off by a little bit" [18:57:57] it does produce exactly correct results for very clean bit values, e.g. .125/.5 [18:59:16] ah interesting [18:59:35] well at least you have a "path to complete correctness" :D [19:00:49] it is a painful path that I wish I didn't have to take haha [19:01:22] the multiply algorithm was easy enough though [19:01:26] hopefully division isn't too much worse [19:02:17] considering how it was with the AGC, I don't have a positive feeling about that haha [19:04:40] luckily they don't appear to have had a Hugh on their team [19:05:25] the LVDC design seems a bit more mathematically driven than crazy optimization/hack driven if that makes sense? [19:07:42] hmm yeah, that seems better in some ways [19:09:48] yeah. the concept (at least for multiplication) was way more difficult to understand. but the implementation was actually quite simple after all of the math [19:17:16] hey guys [19:17:40] yo [19:20:03] hey Matt [19:49:24] cya! [15:59:54] hey [16:34:31] hey Niklas [16:37:53] morning! [16:40:08] hey Mike [16:48:33] so, there is a note in our IMU code that says that the gimbal angles are left-handed, which makes sense given the Orbiter functions involved in getting that data, but how does our AGC end up with the correct information? [17:21:38] I'm not sure [17:21:47] possible that it isn't actually left handed [17:24:12] I feel like getOrbiterLocalToNavigationBaseTransformation() might be converting it from left to right handed [17:27:38] I suspected it might be a case of: code gets updated, comment doesn't. [17:28:01] the AGC has many fun cases of that :D [17:29:03] SUNDISK REV 120 [17:29:07] in Artemis 72 code [17:30:43] I can check, but what getOrbiterLocalToNavigationBaseTransformation is doing looks a lot like the CSM left-handed coordinates in Orbiter to CSM right-handed coordinates commonly used [17:40:13] yeah, looking at that function it looks like that's exactly what it's doing [17:41:02] I can probably stop converting my drift rates to right handed angles then [18:25:25] yeah, should hopefully be a bit simpler than previously thought [18:51:21] yeal, significantly [18:51:26] *yeah [19:48:15] so weirdly DIV in the LVDC looks like it might be free, even with the simple implementation Ron put into yaLVDC (with a couple of minor fixes because he was a bit off on the shifting) [19:48:24] I think PIO is going to be my real problem instruction [19:48:45] the documentation for it is extremely bad, and when I run it in my simulator my instruction memory gets corrupted and it crashes [20:00:33] I think PIO is somewhat important :D [20:00:39] hahaha yes very [20:00:43] it corrupting memory is no good :D [20:55:48] night! [15:45:07] hey Niklas [15:46:24] hey [15:49:06] morning! [15:49:36] hello hello [15:51:31] what's up? [15:54:04] nothing yet. Was going to work more on the RTE. And you? [15:54:39] fixed a very dumb bug in my LVDC simulator last night. I have no idea how it was successfully passing the self-tests so far [15:55:24] memory connected wrong? [15:56:16] and are there instant good results? :D [15:57:10] yeah. memory buffer register A was getting bits 6, 9, 12, and 14 from modules 0, 2, 4, and 6, as it should. but all the rest of the bits were wired up to modules 0, 1, 2, and 3 [15:58:07] it mostly runs out of module 0 so that was unaffected, but it does take some hops through other memory modules and that working must have been sheer luck [15:58:39] I was blaming weird memory things I was seeing on PIO, but it was innocent [15:59:10] I understand how PIO works now. it is very strange, and makes me further surprised that the LVDC developers were able to put together such a complex program within these hardware constraints [15:59:17] haha [15:59:19] but it does appear to be working as expected in the simulator :) [15:59:24] nice! [15:59:45] only instruction I haven't tried yet is EXM [16:00:37] "Execute modified". In baseball terms, this is the "infield fly rule" of the LVDC: it clearly does something, but upon first acquaintance it's hard to grasp exactly what it does. [16:00:39] thanks Ron [16:00:57] I still have to write tests for MPY and DIV... probably can't write tests for PIO until I transcribe more LVDA schematics into verilog [16:00:59] lol yeah [16:01:03] he's not wrong [16:03:14] https://github.com/virtualagc/virtualagc/blob/master/yaASM.py/sample-1967.lvdc#L1250 [16:03:21] this is a good example of the kind of thing they do with EXM [16:04:26] it more or less makes up for the lack of an INDEX-like instruction [16:05:15] hmm right, seems like that, looking at it on a surface level [16:06:10] used quite a lot there [16:08:29] matrix transpose (MATTRA) a bit further up uses it even more [16:08:35] that function is almost entirely EXMs [16:42:59] I'm hopeful that I can get away with implementing very little of the LVDA here [16:43:18] I think for the repeatable simulation I might not need any more than address decoding and the interrupt processor [16:43:24] ...and the timers [16:45:52] yeah, no attitude or accelerometer data [16:46:02] no switch selector I guess [16:46:54] no external interrupts happening [17:11:52] the translated LVDC code has as an example the events processor tables for TB0 to TB3. Was kind of fun picking apart which event time is for a normal mission and which is for the flight simulation [17:12:25] TB0 is easy [17:20:45] hahaha I have to say, with all of the feature-cutting they did for Luminary and Artemis, it's impressive that they were able to dedicate all of this room for flight simulation in the LVDC [17:25:21] yeah true [17:26:13] even if the launch is a fairly contained flight phase to simulate, it's not that different from doing e.g. an onboard simulation of lunar ascent or descent [17:30:04] hmm, now I wonder if there is any simulation mode of TLI [17:38:05] it would be awesome if there was [16:05:57] hey [16:11:52] hey Niklas [16:15:29] what's up? [16:18:53] not too much, currently reattaching a shelf to my wall [16:22:35] I hope it didn't detach on its own [16:35:20] oh, it did. catastrophiclly. thankfully it was only clothes on it do nothing broke (other than the shelf). [16:37:43] oh no. That can end up dangerous [16:38:19] good that nobody got hurt. Wrong place, wrong time and such [16:45:48] yeah, could've been a lot worse. [16:50:19] so, what are up to? hopefully something more fun. [16:52:02] yes! [16:52:10] I implemented a very crude PTP mode for the RTE [16:52:18] not at all like the real one [16:52:48] it's very clear that the PTP mode was an afterthought and they made (from a modern coding perspective) bad hacks for all RTE functions to accomodate it [16:54:08] so it can now target specific splashdown latitude and longitude [16:54:24] and not just a target line like MPL, mid pacific line [16:55:03] there is a lot more to do to make it actually precise [16:55:29] also, if a site cannot be hit exactly, they had an input for an allowable miss distance. I don't have that working yet either [16:56:15] and this is all the moon-centered RTE logic [16:56:32] so you wouldn't be able to re-target the desired splashdown lat/long with midcourse corrections [16:56:36] but it's a start [16:57:03] I had previously implemented a fake PTP mode [16:57:13] where it would just target the longitude of it [16:57:16] but not the latitude [16:59:16] so you could already define an end-of-mission target in the RTCC config file [17:01:22] oh nice! that sounds very useful [17:02:39] yeah, but you do need to have a really good idea where it is possible to land [17:03:04] the band of latitudes that are possible within the inclination limits is just a few degrees [17:03:38] but hopefully the known lat/long combinations from the actual mission can be targeted [17:03:48] I think Apollo 11 still used the MPL, so not the PTP mode [17:04:01] but at one point, for the nominal TEI only, they target a specific site [17:04:20] with DV penalty hopefully being small, from it not being the 100% optimum return [17:10:41] Apollo 12 looks like MPL [17:11:32] 13 would have been the first to target a nominal site that is not on the MPL [17:11:43] and we have loaded EOM targets for 13-17 alreasy [17:11:47] already* [17:12:27] our RTE just wasn't targeting its latitude yet [18:44:33] so, from a workflow standpoint, would you use MPL first, and then use PTP to target a location "near" the line? [18:46:23] hmm for us, it might have to work like that for now [18:46:50] in reality, with the miss distance options, you could just turn up that distance and get a solution that way [18:48:34] I am also adding the option to change the ATP and PTP targets [18:49:08] so you could give yourself an ATP line with the longitude of your desired PTP site [18:49:19] basically how our PTP mode works right now [19:15:01] ahh okay [19:15:53] I'd just like to have a quite limited PTP mode over none at all haha [19:16:15] if it works with the planned splashdown sites for Apollo 13-17 I am happy for now [19:17:47] but one fun thing we might be able to do is use the original plan for reentry [19:18:01] if you have a skip reentry then the accessible area is much larger [19:18:16] so turn up the reentry range and you can land in many more places [19:19:52] ooooh cool [19:21:01] with a return from the Moon, any returning trajectory has its perigee roughly in the same location in space [19:21:16] with a short reentry range the splashdown site is fairly close to that perigee [19:21:24] that's what makes the range of latitudes limited [19:21:40] but with a longer reentry range that is less of an issue [19:50:29] I'm back to being confused by the IMU again. [19:54:30] oh no. left vs right handed? [19:55:42] looking at this document by George Schmidt, the drift rates should be as simple as a constant angular velocity about the 3 principal axes of the sm [19:57:03] it has to be a coordinate system thing [19:58:42] unless there's some "Oops we have a huge bug in the IMU compensation routines" memo that I don't know about [19:58:53] but I'm pretty sure it's me [20:01:38] the IMU compensation seems to match the drift rates, but only in some orientations, and sometimes it matches perfectly but Y or X are backwards [20:03:20] hmm [20:03:31] our gyro torquing code is no help? [20:04:11] I don't think it's out of the question that some part of our IMU code is bad [20:07:34] oh, just did a comparison for the range of latitudes that are accessible [20:07:49] Apollo 11 flyby maneuver to the actual splashdown site [20:08:04] with the standard range for that mission, 1285 NM [20:08:22] 4.1°S to -0.65°S are accessible [20:08:25] and then with 2500 NM [20:08:33] 4.1°S to -0.65°S [20:08:36] damn [20:08:38] 4.1°S to 0.65°S [20:08:40] that :D [20:08:44] and then with 2500 [20:08:58] 16.8°S to 11.1°N [20:09:04] huge difference [20:17:45] oh wow [20:20:18] yeah really opens up where you can land [20:35:11] hmm I think I'd previously tried to use something that looked like the gyro torquing code, and then simplified a bit too much [20:52:37] night! [13:51:20] hey [14:43:24] hey Matt [14:55:10] I have a small request for the telemetry client. [14:55:22] sure! [14:55:28] ah [14:55:30] which one? :D [14:56:48] resolver sin and cos [14:57:00] IMU resolver that is [14:57:06] ah [14:57:08] so both [14:58:40] oh, haha. maybe just CSM for now, if that's easier. [14:59:07] is it not processed at all right now? [14:59:17] and what does it display. sine and cosine or the actual angle? [15:00:44] I believe it's phase angle of the sine and cosine coils. the telemetry page in the systems handbook lists degrees [15:01:50] ah I found the RTCC function that does the conversion [15:03:49] hmm [15:04:01] I thought we had the CSM telemetry client buildable in VS2017 [15:04:43] did I get rid of VS2010 prematurely... [15:07:09] I've never been able to build it in 2017/19/22 [15:07:51] I know it was an achievement to even build it at all in VS2010 [15:08:27] might have been a strategic error on my part to delete VS2010 [15:08:42] I think I did that since I last did an update to the client [15:11:55] morning! [15:13:19] hey Mike [15:13:23] hmm that's a problem [15:13:40] not that it was really sustainable that we could only build it in 2010 [15:20:34] n7275: which systems handbook page? I'm curious how that works [15:22:46] oh I still have a VS2010 online installer [15:23:04] if Microsoft didn't cut off support I can maybe re-install it that way [15:24:04] thewonderidiot, CSM 104 pdf page 257 [15:24:46] ...somehow it thinks I still have it installed, doesn't let me install [15:26:48] pretty sure it's just the sine and cosine on telemetry [15:26:55] there is an automated process to convert it to an angle [15:26:59] I have the RTCC flowchart of it [15:29:21] hmm [15:29:25] there seems to be more to it [15:30:50] so the SCA is the thing that is generating this angle [15:30:55] https://archive.org/details/acelectroniclmma00acel_0/page/n373/mode/1up?view=theater [15:31:03] with Amplifier-Demodulator circuits [15:44:24] I'm trying to reinstall VS2010 [15:44:43] the alternative is making the client builable in a later version. Not sure if that is even possible [15:50:12] it's interesting that the handbook lists two angle ranges. that seems to imply to me that it is the sine and cosine values directly [15:50:45] thewonderidiot, do you have any more information on the demodulator circuit? [15:51:31] I really don't think it is angles [15:52:50] PDF page 361 [15:52:59] it say LM resolver, but I am pretty sure it is both CSM and LM [15:53:35] another document I have calls the function "Resolve attitudes for TLM" [15:53:38] TLM, not LM :D [15:54:15] that would make sense [15:55:43] so the systems handbook is vaguely implying: the sine and cosine resolver outputs corresponding to these angles [15:55:48] I think it just the sine value or the cosine value under certain circumstances [15:56:40] trying to find more about the SCA circuits... [15:56:45] also some interesting stuff in NTRS ID 19720018200 [15:56:51] I'm sure we have more about this, just gotta find it [16:08:41] reinstalled VS2010, even with the right file it wasn't that easy [16:08:43] trying to build now [16:08:52] Build: 1 succeeded, 0 failed, 0 up-to-date, 0 skipped [16:08:54] thank gof [16:08:56] god even [16:09:14] maybe I only worship gof, don't judge [16:09:32] but now I don't think we are quite sure yet how to unscale properly IMU data :D [16:12:47] my expectation would have been, with sine and cosine having values from -1 to 1, that they just put that on telemetry [16:14:10] it's not so easy though. the PCM wants 0-5VDC, and this is a direct measurement of the 1X resolver sine and cosine windings, which will vary from 0 to 28Vrms AC and switch between 0 and pi phase [16:15:28] so the SCA needs to turn both the amplitude and the phase into a DC level [16:15:31] the calibration curves document says for the sine measurement [16:15:43] "if CG2113V is 100 percent, SIN RANGE is 50 to 310" [16:15:52] "if CG2113V is 0 percent, SIN RANGE is 130 to 230" [16:15:58] CG2113V is the cosine [16:16:17] inner gimbal [16:16:32] so there must be something more going on indeed [16:17:48] uhhhh lol [16:17:53] yeah that sounds very strange :D [16:17:55] what are you doing SCA [16:19:05] I am, the strange stuff is probably evenly split with scaling in the spacecraft and unscaling on the ground haha [16:19:07] I mean* [16:28:43] there's a useful table that would be on a page of the procurement specification that we don't have [16:51:18] now I'm wondering if my method of calculating those resolver outputs is even right [16:54:00] how so? [17:01:03] I think my output is just 0-1 [17:19:52] the unscaling on the ground is switchable [17:20:04] can also be +/- 21 VRMS [17:21:05] I feel like both sine and cosine telemetry are off scale high/low for nearly half of the 0-360° range [17:21:14] so you have to pick the right one to get the actual angle [17:22:43] hmm yes [17:23:33] assumption: the telemetry scaling should go from -0.766044443118978 to +0.766044443118978 for both sine and cosine [17:23:39] that is sin(50°) [17:23:46] so let's say you have 0° [17:23:50] sin(0°) = 0 [17:23:55] cos(0°) = 1 [17:24:02] 0 would be in the middle of the range [17:24:11] 128 I guess (0-256 on telemetry) [17:24:17] 1 is offscale high [17:24:19] so 100% [17:24:24] "if CG2113V is 100 percent, SIN RANGE is 50 to 310" [17:24:56] I see. and you can do that because they're not independent variables [17:25:24] so on the telemetry the sine appears as 128 or something like that, and the cosine value as 255 [17:25:46] to get the actual angle, 0-360°, you will always need to look at both values [17:29:46] so get sine and cosine of angle from IMU, use our PCM scaling function with -0.766044443118978 to +0.766044443118978 range [17:30:03] and that's on telemetry [17:30:36] and the telemetry client, if it wants to show the actual angle, needs to do something like the RTCC function TLRESL [17:31:31] hmm [17:32:51] in the calibration curves document I see slightly different value [17:32:54] values [17:32:57] it's 45° [17:33:00] not 50° [17:33:11] at least for the actual calibrated range [17:47:52] hmm, I wonder why the difference [17:52:31] minor loop timer now works in my LVDA :D [17:53:11] most of the interrupt processor should be in place... although I don't think I have enough addressing to handle the interrupt enables [17:54:11] :D [17:58:23] or maybe not. this may be directly capture [17:58:28] but I'm not getting interrupts [17:58:32] hmmmmmmm [18:00:57] it does look like my interrupt enable was sent to the right place [18:01:57] ohhh PIO 032 [18:02:01] "reset limiting on all interrupts" [18:02:13] I wonder if they've come up naturally limited [18:10:54] so close to interrupts :D [18:11:44] so close.... and yet so far [18:15:57] speeking of the LVDC and IMUs, what does LVDC++ use for orientation? [18:16:39] we have a LV IMU class which is very close to the IMU class for the CSM and LM [18:21:44] the interrupt serializer sees that my interrupt has happened (apparently by the "it didn't happen" pulse going away) [18:24:04] so it did happen [18:24:14] it did not not happen [18:24:36] the interrupt happened. the LVDA just really does not want to tell the LVDC that it did [18:24:47] rude [18:24:53] it's very rude and not helpful [18:32:11] I feel like my interrupts are being immediately limited despite not occuring [18:32:53] if I reset all of the interrupt limits, the contents of that circulization loop channel change for one loop, and then go back to what they were [18:47:50] ah! [18:47:57] I have a "broken wire" on SINT [18:48:17] https://i.imgur.com/S3NBq38.png [18:48:26] those two SINTs are not the same haha [18:51:38] aha! it has requested a minor loop interrupt :D [18:52:13] don't start simulating broken wires, you've had enough of that with the AGC :D [18:53:42] lol I will try [18:54:00] also hell yeah, interrupt inhibit feature works as advertised! [18:54:05] :D [18:57:18] that seems like a breakthrough. Got EXM worked out yet? [18:57:22] weeee okay. so speaking of broken wires, I haven't actually hooked up this interrupt line to the LVDC [18:57:36] so I need to do that and make sure the LVDC is handling its interrupts correctly [18:57:43] I haven't messed with EXM yet [18:58:09] still more to do in the LVDA. there's currently no way for the LVDC to tell which interrupt it has gotten [18:58:27] and also it uses real time for a lot of things so I need to implement the real time processor for PIO 103 [18:58:43] oh, I had asked a question about something you said on Discord [18:58:47] "and also there's a couple of interrupts that can be triggered by multiple discretes, which had me thinking that if I combined all three flip-flop parts I'd have more than my quota of 12" [18:58:52] like the GRR interrupt, which during TLI gets used to receive from the CMC a signal to cut off the S-IVB engine? [18:58:59] oh uhh [18:59:45] I wondered if there is any kind of hardware switch between the two input signals for the same interrupt [19:00:01] or if in theory you could get a GRR by accident from the CMC :D [19:02:37] CRI1, CRI2, and ICSD all cause the same interrupt [19:02:42] that's what I was looking at [19:03:11] which one? [19:03:27] whichever interrupt is caused by CRI1, CRI2, and ICSD lol [19:03:33] looking at it... [19:03:39] CRI1/CRI2 = "command receiver interrupt interface line 1-2 input" [19:04:00] ooooh [19:04:02] ICSD = "inverter, one output addresses the command receiver input data lines during crca address" [19:04:09] ah yeah I see [19:04:22] Command Decoder Interrupt A and B [19:04:28] even the number is 8A and 8B [19:04:42] which is only the case for this interrupt [19:04:49] makes sense then :D [19:07:19] I know that one other dual purpose interrupt is handled in the EDS [19:07:43] so the LVDA and LVDC hardware don't really know about it being dual purpose [19:07:51] only other IU hardware and LVDC software [19:07:58] yeah [19:08:14] but the GRR vs. S-IVB cutoff from CMC seems a bit different [19:08:16] it's only circulated as a single bit that either discrete can set in the LVDA [19:08:19] which interrupt is that? [19:08:23] GRR [19:08:32] right but 1-12 haha [19:08:35] uhh [19:08:39] in my numbering system, 7 [19:08:45] if 12 is minor loop [19:08:59] Saturn flight manual [19:09:12] you never know with these things, from which end they start counting [19:09:16] ah yes, AS-512 listing says INT7 - CMC CUTOFF [19:09:21] your numbers agree with LVDA schematics [19:09:44] I guess the flight program doesn't really have to worry at all about INT7 being GRR [19:10:00] that one doesn't even get a name, it's just called INTR7 coming into the LVDA [19:10:10] let me see if anything else shares the same timeslice [19:10:45] INTR7 gets put into the interrupt serializer at G3DV & G2DVN [19:11:32] looks like it's just that one [19:11:54] the preflight program reacts to a GRR and then transfers to the flight program [19:12:13] oh wow this must have been reassigned after these LVDA schematics were drawn [19:12:19] looking at the LVDA connector pinout [19:12:48] for sure [19:12:50] "INTR4X J2-C GUIDANCE RELEASE" [19:12:51] "INTR7X J2-Y SPARE 3 INTERRUPT" [19:12:53] oh [19:12:56] hmm [19:13:23] all I know is that the CMC output for S-IVB cutoff wasn't sensed as an interrupt in the LVDC until Apollo 15 [19:13:47] P15 would send it [19:14:02] but interrupt 4 is SIVB engine out B [19:14:15] that is from the S-IVB itself [19:14:19] yeah this document is old [19:14:24] sensed S-IVB engine out [19:14:27] not a command to do it [19:15:35] from what I can tell that sensed S-IVB engine out was always interrupt 4 [19:15:39] even in the AS-502 ICD [19:16:24] what I could imagine for interrupt 7 is that there is a safeguard for the CMC signal [19:16:31] something like, a check on the umbilical being dropped out [19:16:42] so that there is really not chance that the CMC by accident causes GRR [19:16:53] all in EDS electronics of course [19:17:02] so not relevant for you haha [19:17:43] oh [19:17:50] and of course there are the interrupt inhibits [19:18:39] yeah, but you don't want to have that interrupt inhibited if you're waiting for GRR :D [19:19:04] even for interrupt 8, there is just one inhibit for all of interrupt 8. you can't pick and choose [19:19:27] the flight program is probably inhibiting it, very soon after having started up [19:20:18] Saturn IB EDD: "When the LVDC receives GRR, TB0 is started; this interrupt is then inhibited for the duration of the mission, and program control is transferred to the flight program" [19:20:25] so maybe still by the preflight program [19:20:37] in our Saturn V LVDC++ I do that too [19:20:55] and re-enable the interrupt for TLI [19:22:10] hmm kind of. GRR isn't handled with my interrupt logic [19:22:19] just calls a function through the LVDA to the ESE [19:22:45] so the GRR interrupt for us is only generated by the CMC S-IVB cutoff command [19:23:56] this command used to be a discrete input btw [19:24:08] before Apollo 15, although the LVDC software probably didn't use it yet [19:24:34] maybe the timing requirements for an interrupt are just shorter, gives more precise timing for S-IVB cutoff under CMC control [19:25:11] hmmm interesting [19:26:02] but I am distracting you, as this doesn't seem to be relevant to any multi input interrupt :D [19:26:22] nope! [19:26:36] I'm just looking at what my next thing to implement is going to be [19:26:52] I think it might be PIO 137 [19:27:09] which is how the LVDC reads which interrupt it got from the LVDA [19:27:29] right now my LVDA can interrupt the LVDC but not send it any data [19:28:38] "Command Module Computer Cutoff - Capability has been provided to issue the S-IVB cutoff switch selector command as a function of an interrupt from the command module computer after guidance reference failure and spacecraft control" [19:28:58] "REASON: Additional S-IVB TLI cutoff accuracy" [19:29:06] from the Apollo 15 flight evaluation report, list of IU changes [19:29:33] yeah know which interrupt it got seems important :D [19:30:44] knowing* [19:34:14] hehehe [19:34:33] so PIO 173 is group 4. sensed by DARO [19:38:05] I suppose one way to do this is find the serializer that produces DATAV and work backwards from that [19:38:15] everything must flow through DATAV eventually to reach the LVDC :) [19:42:02] oh man is that going to be a disaster of unconnected signals though [19:46:02] System Data Sampler (Multiplexer) Logic Diagram (26 Sheets) [19:46:05] System Data Sampler (Serializer-Selector) Logic Diagram (4 Sheets) [19:46:11] oh man I hope I don't need to implement 30 pages of logic for this [19:47:28] ouch [19:47:37] okay no [19:48:05] the multiplexer handles: RCA-110, Command Receiver, Control Distributor, Switch Selector, and DDAS inputs [19:48:10] I care about none of these for simulation [19:48:27] except maybe the RCA-110 to kick it off, but I can probably bypass that with GSE [19:48:56] control distributor will be all those external signals [19:49:03] S-IVB engine out sensed etc [19:49:15] all goes through that box [19:53:01] so nix the multiplexer, I can get away with just the serializer :D [19:53:29] ah, I think I remember the astrionics handbook having a good schematic showing where all signals are going and coming from for the LVDA [19:55:41] PDF page 350 is what I was thinking of [19:57:36] yeah that and pdf page 358 have been helpful [19:58:33] oh yeah, 358 looks like a more detailed version of something in the Saturn Systems Handbook [19:58:58] actually very similar, not much more detailed [20:00:02] but not terribly readable lol [20:00:26] I'll have to dig out that binder again and see if I can make a better scan of the page. I know the original wasn't super readable either [20:02:02] in that case [20:02:36] AS-508 Systems Handbook [20:02:59] PDF page 235 and 236 [20:03:18] ah yeah, that is very similar [20:08:01] okay cool, and as far as DARO latches go I'm pretty sure I only care about MBYPD [20:08:27] which means, as soon as I implement this serializer all of the PIO addresses that correspond to LVDA processors should magically start working [20:08:38] ...except for processors I haven't added yet, like real time [20:14:26] MBYPD being the Multiplexer Bypass :D [20:18:19] bypass sounds useful [20:53:10] night! [15:06:18] hey [15:24:41] hey Niklas [15:32:33] morning! [15:34:55] hey guys [15:35:29] what's up? [15:43:57] something I thought was more of a linear function looks actually like a cubic function [15:44:15] not good for my simple PTP targeting mode :D [15:44:49] hehehe [15:45:07] but also not really good for the actual one... have to read a bit more of it [15:45:12] and you? [15:46:32] reading real time from the LVDA is hard. it's developed by the accelerometer processors, and yet doesn't use the multiplexer bypass. when you read it, it pokes its way sequentially out of the system data sampler multiplexer [15:46:38] so I need to implement the multiplexer after all [15:47:09] I got one accelerometer processor in last night, and it does look like it is counting over the delay line which is promising [15:47:50] working now on the additional addressing logic I need to hit the right parts fo the multiplexer, and then will start in on the multiplexer tonight [15:48:46] what is "real time" again? [15:49:58] it's a reasonably fast timer in the LVDA [15:50:02] just counts up [15:50:09] the LVDC uses it as the measure for absolute time [15:50:32] as is most things with the LVDC/LVDA design, the choice of unit is..... interesting [15:50:35] oh [15:50:38] uhh [15:50:39] should have known [15:50:40] it counts in 246.1 microsecond increments [15:50:42] double RealTimeClock; [15:50:44] this :D [15:50:47] yeah that thing :D [15:51:23] very important even for the simulated flight, since the LVDC does math on it to schedule the timer interrupts [15:51:30] indeed [15:52:27] initial value of it might also be important for simulated flight [15:52:39] yeah I don't know how to change the initial value yet [15:53:09] I think this clock might be counting up from midnight GMT. There is a GMT synchronization with the ground computer some time before launch [15:53:25] so variable launch azimuth might prefer a reasonable value [15:53:46] so it must be able to be reset somehow. but how... [15:54:08] I'm not sure there's a PIO for it [15:55:33] there is something in the accelerometer processor logic that watches for you to perform a single instruction step on the LVDC, which I thought was very weird [15:55:43] maybe single-stepping the LVDC messes with the real time clock [15:57:16] oh, maybe it isn't actually GMT [15:57:20] check the EDD [15:57:30] page I-3-4 [16:00:35] does that say that the GMT synchronization just writes the difference between GMT and real time to some location in the LVDC? [16:00:44] and the conversion from "real time" to GMT uses that as an offset? [16:00:50] sounds like it [16:01:00] I'm sure it would be commonly used then [16:01:35] or at least you should be able to identify the variable name of it [16:04:27] the variable launch azimuth code uses D.PGMT, "GMT AT PTL ENTRY" [16:04:54] and there is also D.PFRC, "PTL REAL TIME CLOCK READ" [16:05:43] there is math that is looking at the real time clock reading at GRR, subtracting D.PFRC, converting to seconds, and adding D.PGMT [16:06:57] that will be to convert real time to GMT [16:07:50] and then it will subract P.TLO :D [16:08:50] or whatever the right first letter is [16:09:46] V.TLO [16:09:53] but yep, you got it [16:10:39] seems like there are a lot of time conversions necessary to get e.g. time since GRR [16:10:54] will have to be done somewhat frequently [16:13:41] for timebase stuff it probably calculates the time when the timebase was started in real time, so it has that as a constant offset [16:14:15] ah [16:14:22] and it might even do that for TB0 [16:14:31] so it could get time since GRR that way [16:17:23] yeah most of what I'm seeing is thinking in relative terms like that [16:25:21] it seems pretty obvious that my initial plan of "just jump to the flight program and hope" approach for a preflight program will certainly not work :D [16:25:32] at the very least I'll need to mess with time [16:31:05] careful Doc Brown [16:32:33] hahahaha [16:33:15] so the other thing I learned last night is that the accelerometer stuff in the LVDA isn't triple-redundant [16:33:41] if you want to see a nice linear function: https://i.imgur.com/OHQyE5H.png [16:33:59] oh yes, perfectly straight :D [16:34:40] attitude is triple redundant? [16:36:53] I think so [16:37:16] but each of the three mostly-redundant delay lines only stores two of the three velocity accumulations from the accelerometers [16:37:44] https://i.imgur.com/1WZFyxE.png [16:38:08] so channels 1-3 of the delay lines really are redundant and store the same information, but channel 4 is not really [16:38:36] right, the EDD is talking about "two redundant pulse trains",not 3 [16:38:52] there was some weird stuff going on with channel 4 in the system data sampler where it was grabbing specific instances of channel 4, instead of a common voted one like everything else [16:38:55] and this explains it :D [16:39:27] but also means that my efforts to de-triplicate things so far will lead to my LVDA responding to all three accelerometers with the same data [16:39:39] not that it matters for the repeatable simulation [16:39:55] but I might actually have to triplicate things later if I want all three accelerometer channels [16:40:21] "de-triplicate" is a great word [16:40:42] hehehe [16:46:11] the multiplexer actually isn't going to be as bad as it sounds [16:46:27] essentially half the pages are basically empty, so it's really only 13 pages [16:46:52] and those 13 pages for the most part each only have one (albeit large) latch on them [17:36:17] could be worse [18:07:50] well that seems not ideal haha [18:08:11] doesn't seem to be impacting IRC functionality though [18:08:19] indy91, I've made myself more confused about the RTC [18:08:50] fun [18:09:21] so each increment is 246.1 microseconds [18:09:25] and it's a 13 bit counter [18:09:35] ....doesn't this mean that it will overflow after only 2 seconds [18:10:23] the math checks out [18:12:12] weird [18:12:56] I mean I guess it makes sense why you wouldn't necessarily need/want to reset the RTC then, if it's going to be overflowing every 2 seconds anyways [18:16:26] there is a system time update routine [18:16:38] maybe it runs often enough that it reads the RTC into LVDC memory [18:16:53] and basically updates the actual real time in 26 bits in some way [18:19:01] ah yeah [18:19:08] D.VTMM is that 26-bit total time in mission [18:30:36] ah yeah, that sounds familiar from the translated LVDC code [21:28:46] night! [16:05:50] hey [16:30:03] morning! [16:34:44] hi Mike. [16:34:50] what's up? [16:36:05] making good progress on the LVDA [16:36:22] and understanding the design better as I go [16:36:43] hopefully tonight should be able to put in at least four more bits of the multiplexer [16:37:34] what are you up to? [16:42:05] very busy with work lately, hasn't left me much time. should calm down in a few weeks though [16:44:27] hey guys [16:45:33] hi Niklas [16:45:45] yo [16:46:36] did I see I have another Wikipedia page that needs fixing :) [16:47:17] that was just on the talk page for the LVDC. I was looking at it out of curiosity haha [16:48:14] oh haha [16:54:11] although I feel like this claim on the actual article is dubious: [16:54:12] Each logic system was split into a seven-stage pipeline. At each stage in the pipeline, a voting system would take a majority vote on the results, with the most popular result being passed on to the next stage in all pipelines. This meant that, for each of the seven stages, one module in any one of the three pipelines could fail, and the LVDC would still produce the correct results. [16:54:21] the LVDC having a pipeline is news to me :D [16:54:35] and what are the seven stages?? [16:55:38] I think somebody misunderstood what the documentation was trying to say lol [16:57:26] it's unfortunate, because there are a lot of articles that are both very detailed, and very wrong. [16:57:33] which is a bad combination [17:00:44] yeah [17:01:19] and being enough of an expert to realize that all of the articles in your subject area are bad and wrong, makes you question how bad all the other articles are :D [17:01:52] to be fair I think the LVDC page is less bad than the AGC one [17:02:09] true [17:03:05] I was looking because I was curious if this claim was still there: [17:03:08] Unlike the Apollo Guidance Computer software, the software which ran on the LVDC seems to have vanished. While the hardware would be fairly simple to emulate, the only remaining copies of the software are probably in the core memory of the Instrument Unit LVDCs of the remaining Saturn V rockets on display at NASA sites. [17:03:31] I just saw that one [17:04:10] also the list of interrupts... I'm pretty darn sure the Saturn IB still had the minor loop and switch selector interrupts haha [17:05:06] I would suspect the only IUs that still contain LVDCs are the ones that are reeeeally hard to get to [17:05:22] the one in Udvar-Hazy doesn't have one [17:06:12] it looks so complete, and then there's just an empty spot where the LVDC and LVDA should be [17:10:14] guess our only other option is to go track down SIVB-503 through 507. I'm down for a road trip. [17:21:56] hehehe [17:49:45] I'm having a lot of fun getting the LVDA to work. it's going to be hard to stop and pivot to flight simulation... I'm very tempted to just keep going until I have a mostly fully-functional LVDA [17:50:47] I was thinking about how it might be fun to try to tap into the actual telemetry stream for display flight simulation progress [17:54:11] haha I think we differ in what we perceive of the fun part in getting this to work :D [17:54:17] perceive as* [17:54:47] lol [17:54:56] telemetry would be great to see [17:55:06] I need the PIOs for it then! [17:56:15] I think the flight program will also be fun [17:56:44] but it is very gratifying to see life spring out of these logic circuits, and it's fun to poke at them and understand what they're really doing [17:57:31] yeah seems you make great progress from "nothing makes sense" to "I understand this part now" haha [18:00:38] I was very happy about deriving the RTC frequency last night [18:00:58] I still don't fully understand the reasoning behind it, but I know what they were doing now [18:35:30] so RTC actually only has 13 bits and the software needs to deal with that fact to be able to update its absolute time? [19:06:19] it only has 13 bits, and the upper 13 bits are random garbage [19:06:31] so yeah, the software has to update is absolute time periodically before the RTC overflows [19:06:41] and it has to mask off those upper 13 bits every single time it uses an RTC reading [19:18:25] and it overflows every 2 seconds. That is quite often :D [19:21:39] yeah. not very user-friendly in any sense [19:22:04] arbitrary time units, frequent overflows, random garbage that must be masked out [19:22:18] all of this is reinforcing my feelings that the LVDC/LVDA are a very janky system [19:37:13] yeah [19:37:24] I'll never complain about the AGS K-Factor again :D [19:39:05] it would be fascinating to see what would have happened in the alternate history where IBM won the argument and had the AGC replaced with the LVDC in the spacecraft [19:40:18] did they want to put it in the LM too? [19:40:23] or only CSM [19:40:29] I'm pretty sure they wanted it in the LM [19:41:05] add that to your project list for the year 2040 [19:41:16] write lunar descent guidance in LVDC assembly [19:43:03] lol nope [19:43:04] not a chance [20:03:01] that sounds like a project we could talk James in to :) [20:03:18] hahaha [16:38:03] morning! [16:57:56] hey guys [16:58:42] what's up? [17:46:01] hey [17:47:20] yo [17:51:15] went back to the basics with the PTP mode. There is a part of it I understand quite well now, but there is another part of it that makes so little sense to me that I am going to pause the work on this project for now :D [17:51:32] hahaha oh man [17:53:59] how is the LVDC treating you? Or LVDA. Or both. [17:54:16] I finished the system data sampler this morning! so the full RTC is working [17:55:48] I'm now at the point of deciding if I really want to keep pushing on LVDA (and if so, what part? probably telemetry?) or pivot back to the LVDC and start trying to get the flight program going [17:57:59] telemetry would also help with the flight program, but maybe having it start to actually process the flight program first makes more sense. [17:59:50] I'm going to have to start adding an LVDA implementation to yaLVDC here shortly too, because while I *can* load the flight program in my simulator, having to wait 8 seconds for a 20 millisecond simulation to finish is going to become untenable quickly [18:00:39] also need to reverse engineer the bits for D.FMDI, which I haven't found anywhere. that is really the word that is controlling the flight mode. D.FLT gets set by the flight program itself based on the bits that are set in D.FMDI [18:01:40] unless you know of a place that specifies those bits? [18:02:24] e.g. bit 12 controls whether or not the LVDC stores compressed telemetry (doing so overwrites the preflight program with said telemetry, which wasn't always desirable) [18:03:03] bit 18 is used in a branch with the comment "SET UP TO RESTART ON 1ST ORBIT?" [18:03:33] bit 1 controls whether the switch selector is driven [18:04:15] sounds like a flagword [18:04:23] I think the LVDC calls that "mode codes" [18:04:32] I know the format of some of them, but maybe not this one [18:04:48] "SET UP TO RESTART ON 1ST ORBIT" sounds interesting :D [18:05:06] yeah it does! but I don't quite know what it means haha [18:05:26] bit 11 is the repeatable bit [18:05:41] bit 13 is whether the platform is up [18:06:20] oh bit 15 is the "latitude bit", which selects huntsville or the cape [18:08:24] so we might be able to launch from both? [18:09:00] the flight program also monkeys around with this word a bit, so it's not necessarily left in its pristine condition from how the RCA-110A loaded it [18:11:21] I think I only know the format of the flagwords that are sent on telemetry and this one doesn't seem to be on teleemtry [18:12:19] I guess that isn't surprising [18:12:30] if you don't know exactly what this word is when you launch, you're going to have a very bad time :D [18:15:42] the EDD describes what this word contains, but not exactly which bit does what [18:17:31] rude [18:18:05] hmm [18:18:11] actually this is probably good enough [18:18:18] I think I found it in the translated code [18:18:27] called DFMDI there [18:18:40] oh yes, that is it [18:18:43] it has named masks [18:19:28] what page are you looking at for the masks? [18:20:13] ahh looks like they're kind of spread out [18:20:28] I think this should all be enough to go on though :) [18:21:02] yeah, for the mode codes the masks are listed numerically. But all others (including for DFMDI) they are mixed and sorted alphabetically [18:21:11] so not really helpful [18:21:41] like, there is a [18:21:50] IF DFMDI LAND MSKFMDREP NQ 0 [18:21:53] in code [18:22:08] MSKFMDREP is octal 00100000 [18:22:16] that's all we could derive from this :D [18:24:22] right, so not terribly helpful haha [18:25:25] it looks like there are some checks in the code too [18:25:29] EDD lists as options: flight simulation selected, switch selector status, repeatable/non-repeatable option, data compression status, platform status, test site indicator [18:25:37] if we set the repeatable bit, it will automatically take down the platform bit [18:25:51] but what about the restart on 1st orbit bit?? [18:26:06] expecting too much from a Saturn IB EDD :D [18:26:10] hehehe [18:28:21] I also don't think the test site indicator is really relevant for the repeatable flight simulation [18:28:55] does it force you to use huntsville? [18:29:26] for accelerometer and gimbal interface tests, yes [18:29:45] same reason why your AGC erasable memory had the MSC latitude [18:29:48] also that "1st orbit restart" bit selects between the following two constants: [18:30:17] P.CHIL EQU (P.TSTA) [18:30:19] * TIME FROM TB5 TO BEGIN SDOT*TP TEST - 1ST OPPORTUNITY [18:30:19] and [18:30:20] P.CHLL EQU (P.TSTA-5300) [18:30:20] * ONE ORBIT RESTART SDOT*TP TEST TIME [18:30:50] I know what TSTA is, that's a presetting [18:31:27] the time to start TB6 is calculated geometrically. So you have to give it an earliest possible time to start doing those calculations, or else it finds TB6 one orbit too early [18:31:54] 1st orbit restart must mean literally that. It finds TB6 start one orbit earlier than normal [18:32:09] so maybe for flight simulation you can actually go launch through TLI [18:32:18] oh hell yeah. that would be suuuuuper cool [18:32:25] and to make it a bit faster you can force it to do TLI one orbit earlier? [18:32:48] hmm [18:33:01] now I wonder if this TSTA-5300 is actually simulation only [18:33:12] Apollo 17 also had the ability to perform a TLI-0 [18:33:39] I thought this was just in case of some leak that you have to do TLI quickly, getting initiated by the CMC, not LVDC [18:34:02] so I didn't expect this to be a LVDC software change [18:34:26] and it probably still isn't [18:34:47] does anything set that bit in the flight program? [18:34:55] maybe via uplink? [18:35:06] so this is bit 18... let's see [18:35:48] not that I can see [18:36:00] probably for simulation only then [18:36:07] it is chosen very early on in initialization (right after deciding whether to store compressed data based on that bit) [18:36:20] yeah it looks like this is in the sim flight initialize [18:36:48] yeah. "common, identical initialization unique to rep and non-rep mode" [18:36:55] saves you 1.5 hours on each simulation run I guess [18:37:09] awesome [18:37:43] I am so excited to have this simulation working :D [18:37:56] yeah it's getting there :D [19:59:14] interrupts appear to be working fine in the LVDC too (I hadn't actually wired up INTCV from the LVDA to the LVDC yet) [19:59:39] still need to do testing to understand exactly how the interrupt inhibit and limiting PIOs work [20:01:22] the minor loop and switch selector interrupts behave differently from each other in hardware [20:01:44] minor loop just resets itself automatically but switch selector is a tratch that seems to get permanently stuck in its third state when an interrupt occurs [20:02:06] so definitely need to be careful to pick up software-visible behavioral differences between those two [20:02:58] that difference sounds familiar from the astrionics handbook [20:03:44] "The Timer 1 Counter is a continuously [20:03:47] operating wrap-around counter. which wili automa [20:03:47] tically generate an interrupt every 4.032 seconds [20:03:48] (maximum counter value) if not under program con [20:03:48] trol. The Timer 2 Counter is not a wrap-around [20:03:49] counter. It will generate an interrupt only if ini [20:03:50] tiated under program control." [20:04:00] oh, cool. that makes sense haha [20:04:02] thanks! [20:04:31] I implemented that wrong in our LVDC actually :D [20:05:21] hehehe [20:05:48] but even in the real software it would be safe [20:06:23] it sets the timer 2 function indicator to a number that isn't used [20:06:31] either that or I made this code up. Would have to check. [20:07:17] I should probably change that, it's a bit inefficient. Not bad, it just calls the Timer2Interrupt every 4 seconds just to find out there is nothing to do. [20:07:26] Not bad though* [20:09:58] ah with timer 2/switch selector it actually does that in code anyway [20:10:05] schedule itself in 4.032 seconds [20:10:20] with timer 1 it's just a hardware function [20:17:43] oh does it? lol [20:17:46] amazing [20:18:50] looks like it from the translated code [20:23:17] TB6 is TLI? [20:23:59] TB6 starts TLI preparations [20:24:18] increasing pressures and all that fun stuff. TLI ignition is almost 10 minutes later [20:24:25] * FUNCTION THIS MODULE WILL INITIATE TIME BASE 6 UPON ENTRY [20:24:26] * FROM ONE OF THE FOLLOWING: [20:24:26] * 1.THE MODULE WHICH EXECUTES THE RESTART EQUATION [20:24:27] * WHEN THE EQUATION IS SOLVED. [20:24:27] * 2.THE INTERRUPT PROCESSOR ON OCCURRENCE OF THE [20:24:28] * TIMER 2 INTERRUPT SCHEDULES BY THE EVENTS PRO- [20:24:29] * CESSOR MODULE WHEN OPERATING IN THE REPEATABLE [20:24:29] * FLIGHT SIMULATION MODE. [20:24:37] oooh [20:24:45] TLI sim, confirmed [20:24:51] hell yeah :D [20:27:22] might be difficult to find out when exactly it is scheduled [20:27:35] but should be easy to observe from telemetry :P [20:27:38] haha [20:28:09] the TB5 events table will have it [20:28:19] I don't know how much else is going on there though [20:29:46] hmmm [20:32:33] I'm not finding it. probably not quite understanding something [20:34:22] yeah I am not surprised. The table is just times into, in this case, TB5 when something should happen [20:34:44] what happens is dynamic for stuff that doesn't always happen, like flight sim only [20:35:04] The translated code basically has "blank" as the jump location [20:35:32] and the flight sim init code would need to set up where it jumps at TB5+X seconds, in this case this TB6 init function [20:36:13] hmm, maybe we don't get it then :/ [20:36:17] but if you find the table of times for TB5, it would be a time larger than 100 seconds. But there could be many events there [20:37:58] there is a "simulation terminate" scheduled at.... 145 seconds? [20:38:04] but nothing about TB6 [20:38:41] ah, that same TB5+145s from the Saturn IB EDD [20:39:54] I wonder if they could start a simulation in orbit, for TLI only [20:39:56] ohhh wait a second [20:40:03] but that would need to set up quite a few things [20:40:58] so this thing scheduled at TB5+145s is an erasable value called G.TERM [20:41:25] there is a branch here that can set G.TERM to L.E305, which is the repeatable flight simulation termination function [20:41:29] that basically wipes everything [20:42:00] but there is a different branch that sets it to L.EP01 [20:42:50] which is a direct hook into the event processor that looks like it might just advance to the next timebase [20:44:24] so it's optional to stop the simulation there [20:44:28] what decides it? [20:45:46] it might be repeatable vs. non-repeatable [20:46:03] we might need to switch to non-repeatable to make it into TB6 [20:46:15] ...despite what that comments claims? [20:48:08] that might be the case [20:48:17] there is, of course, nothing stopping us from monkeying with the code [20:48:28] it's easy to remove the termination event from the TB5 table :P [20:48:44] haha oh no, are we already thinking in these terms [20:48:59] first have to get anything of the code that is actually there running :D [20:49:03] lol very far forward thinking [20:49:04] yeah [20:52:12] night! [20:52:16] night! [14:50:58] good afternoon [15:20:32] hey Niklas [15:52:05] thanks for approving. I have another one of these a bit later [15:52:16] and then I think the LM is free of using the Apollo number? Have to properly check [16:07:59] nice! [16:15:12] I have a few that I still need to bug Ryan for an approval or at least what I need to change. [16:51:27] we're going to need a mission editor if we keep adding to the mission files :) [17:20:12] I can already feel the feature creep for that one [17:20:20] mission editor? Why not a launch scenario editor? [17:20:33] ah, let's integrate the whole padload generator then [17:20:42] and LVDC launch targeting :D [17:37:20] morning! [17:37:49] hey Mike [17:38:23] interrupts work correctly in the LVDC, and I think I finally fully understand the LVDC<->LVDA interactions and the PIOs for it [17:38:38] :D [17:38:46] the information on the LVDC page on the website is definitely wrong :P [17:38:50] haha [17:39:09] so I think the last thing I haven't exercised is EXM [17:39:35] and after that the real fun can begin [17:39:46] well, unless you want to set up telemetry processing first [17:40:06] well, there's one more step in between, which is emulating all of this behavior I'm learning in yaLVDC [17:40:12] ah true [17:40:17] the hardware sim is far too slow to do anything interesting with the flight program [17:40:25] right was about to ask [17:40:39] I guess it can't quite do real time simulation [17:40:51] a 2-second simulation would take maybe half an hour to complete [17:40:54] so not quite [17:41:02] ouch [17:41:23] it will be able to do real time when I put it into an FPGA [17:41:47] but then I have the problem of not having great insight into how it's executing without also setting up a bunch of simulated GSE [17:42:54] so I think 1. learn how things work on small timescales in the hardware sim, 2. implement observed behaviors in yaLVDC, 3. simulate long timescales in yaLVDC where breakpointing is already readily available [17:43:01] ...is the best order of operations :) [17:43:33] breakpointing will be crucial I predict [17:43:49] oh yeah. especially while we learn what all the preflight program actually needs to do [17:44:02] I am certain that the first attempts will hit uninitialized erasables [17:44:06] not much hopefully for the repeatable flight sim [17:44:51] maybe the time related erasables [17:45:07] there will likely be some sort of trouble in Variable Launch Azimuth [17:45:27] yeah [17:45:29] which I would think it also calls in flight sim mode [17:47:11] with luck the flight sim initialization sets up some time related variables and variable launch azimuth runs without issues on its own [17:47:55] like, maybe something copies TLO (predicted time of GRR) to the erasable for actual time of GRR [17:59:21] ah no [17:59:33] that's not when the launch window actually starts :D [18:01:24] hehehe [18:03:33] you're right [18:03:40] well [18:03:43] kind of [18:04:18] the sim flight initialization has "set firing azimuth to sim firing azimuth" followed by "init inclination angle and descending node" [18:04:35] so it is directly setting the azimuth in place of what the variable launch azimuth code would have calculated [18:05:38] ah, so bypassing the azimuth calculation [18:06:04] and only doing the inclination and descending node calculations [18:06:16] sim firing azimuth, is that an erasable or fixed value? [18:10:09] fixed value [18:10:53] oh nice. what is it. 72°? [18:11:06] almost! [18:11:08] P.CFA EQU (72.029/180) CAPE FIRING AZIMUTH [18:15:16] interesting [18:15:30] that's not the planned launch azimuth for Apollo 17, that would be a bit larger [18:15:49] but for flight sim purposes good enough, maybe they didn't change it every time [18:16:25] AS-513 changes it to 40.88 [18:17:26] haha yeah, 50° inclination for Skylab [18:17:29] very different [18:18:00] the lunar missions all varied between 72.0° and 72.2° [18:18:12] azimuth [18:19:06] maybe 72.029° is like 1 second into the launch window or so [18:19:15] just to make it safely after the initial time [18:24:05] AS-513 does have 50 as the inclination angle [18:24:23] for the sim flight [18:25:05] oh but it might not get used? [18:25:08] makes sense, that's exactly what they were targeting [18:25:21] does AS-513 even have variable launch azimuth? [18:25:39] no [18:25:42] I don't think they would have launched to anything but the right azimuth for 50° inclination [18:26:19] ok 72.029° is 5 seconds into the launch window :D [18:26:22] I checked [18:30:27] nice :D [18:33:17] whatever that means. Any value beyond 72 is fine [19:46:49] :) [19:51:31] haha that is a very delayed smiley, unless a message before it didn't come through or something [19:53:24] https://www.ibiblio.org/apollo/changes.html [19:53:55] ohhhhhhh [19:53:59] I see lol [19:54:51] well have fun digging through that :D [19:56:01] I will :D [20:00:23] I like how many references to EDD equations there are [20:00:53] if I had a Saturn V EDD then in combination with these flowcharts we would really have something amazing [20:00:56] yeah. to an EDD that we don't have, and whose numbers don't line up with the AS-206 EDD [20:01:03] haha yeah for sure [20:01:11] an AS-512 EDD would be absolutely amazing to find now [20:01:40] numbers kind of line up with the Saturn IB EDD, at least chapter wise [20:01:52] yeah. they're off, but not too bad [20:02:04] that EDD skips chapters that don't apply to Saturn IBs, to stay somewhat consistent [20:02:46] largest flowchart file is IGM, followed by the switch selector. No surprise to me :D [20:08:06] this is definitely good enough to make some structural changes in our LVDC code [20:08:56] nice! [20:09:04] in many cases I can probably add these comments from the flowchart to our code and identify the order of every equation to be done [20:13:17] IN05 in phase initialization is the routine that I have been poking through this morning [20:16:30] I'll try to find it :D [20:16:42] 25% of the way down, leftmost branch [20:17:02] ah yeah [20:18:55] the "non-repeatable simulation, platform down" branch looks interesting to me [20:19:17] maybe that is how we get through TLI without having to simulate hardware [20:19:43] or change the program [20:20:57] I'm still trying to find where everything is haha [20:21:04] haven't found any interrupt processing yet [20:21:30] ah now I have [20:21:32] mission executive [20:21:44] same label names as the translated LVDC code [20:21:47] yep [20:21:54] they used this listing as a basis [20:21:57] Apollo 17 [20:22:10] oh did they? I thought they used AS-508 [20:22:17] nope [20:22:30] I think they even worked on the code [20:22:33] haha amazing [20:24:39] hmm although [20:24:58] the document seems to be from March 1972 [20:25:13] so maybe not exactly this listing [20:25:16] but very close [20:27:51] "spacecraft in control". three paths. yes, no and no label [20:28:01] probably "maybe" lol [20:28:22] hahahaha [20:32:09] I'd like a version of this where I can find what all jumps to a specific location [20:38:58] There are also several occasions where it looks like the logic could go in several directions but then it only goes into one [20:39:10] the flowcharts are definitely imperfect [20:39:32] a lot of it is based off of the column 71 markers [20:40:41] the one LVDC developer we are in contact with says he "did know about the markup in column 71, and markup like that was present in software versions he worked on, and he even probably added some marks like them himself.  But he had no idea what they were for, or what the rules for them were. " [20:40:55] haha [20:41:00] I'll have to digest this all for a while, but I can collect some things that look weird to me and send them to Ron [20:41:35] cool! yeah I think he has added a means of dealing with discrepencies like that [20:43:19] oh I think I found the PTC code :D [20:43:23] as in, passive thermal control [20:43:34] or rather, solar heating avoidance how they called it for the S-IVB [20:44:06] stabilize for 80 seconds, command a 180° roll, then turn off the FCC [20:44:36] I've seen several references to "HPC". Any idea what that is? [20:47:55] HPC is a Hop Constant [20:48:02] basically a CADR in AGC terms [20:50:36] ah ok. yeah, makes sense [21:02:26] night! [21:05:18] is that like a reset vector in more modern computers? [21:05:46] nah, more just like a pointer [21:06:22] ahh [21:07:06] there's just a lot that goes into a pointer in the LVDC. an HPC encodes instruction module, instruction sector, instruction address, instruction syllable, instruction simplex/duplex, data module, data sector, and data simplex/duplex [21:07:30] when you make an HPC for a label, the assembler figures out what the setting for all of the above is at the time of the label's creation, and encodes it into one big constant [21:07:42] and the HOP instruction takes such a constant as its argument [21:08:16] so with one instruction, you can change all of that in one go as part of a jump [21:08:54] there are other jump instructions (e.g. TRA) that do not do this, but that can only change syllables. if you want to go as far as leaving a sector you need to HOP out of it [21:09:50] it would be an interesting statistic to calculate what percentage of LVDC memory is taken up by hop constants, because it is a lot haha [15:27:40] hey Niklas [15:30:49] hey [16:24:20] oh great. CDUCHKWD is at address 1341 in every single CMC version we have padloads for, except Comanche 108... [16:25:26] what fun last minute fix was that caused by :D [16:36:55] oh interesting [16:39:44] must have been a change then that was done after Artemis was branched off. Or some temporary solution. [16:40:43] Artemis branched after 67, so everything in 72 and 108 was after [16:41:14] we probably have a colossus memo that talks about this [16:41:21] oh we do? [16:41:36] we have all of the change memos from 72-108 [16:41:55] it was still normal for 72 [16:42:13] yeah, so should be captured in the memos we have :D [16:49:30] "The order of the variables in unswitched erasable (EBANKs 0, 1, and 2) was changed to prepare for the use of the erasable programs for prelaunch performance tests. The new configuration is needed to avoid conflicts with the new programs which will be loaded into erasable memory via a K-start tape." [16:49:33] could have been that [17:45:58] didn't find anything better either [17:46:23] there is a bunch of talk about added P24 erasables, so potentially that was done differently than in Artemis and caused a shift for Comanche 108 only [17:47:12] could be yeah [17:56:25] and that by itself is an excellent example of why we'll never reconstruct Comanche 108 from 72 lol [17:58:55] haha [17:59:13] but I just finished support for it in the padload generator, all bits agree! All bits that I care about anyway [17:59:29] oh there is one annoying padload that somewhat randomly varies by one bit [17:59:37] the engineering value is the same on all missions [17:59:45] but they didn't do the conversion the same way all the time... [18:01:00] lol that is very annoying [18:01:50] I need to track which mission had which :D [18:02:46] oh [18:03:05] it's the direction of the ground alignment target [18:03:34] I wonder if it actually did vary because they also padloaded a slight variation on each mission how the CSM is rotated on the launchpad [18:04:16] I don't care enough about that I think [18:21:13] transcribing the Apollo 13 CMC padload. Just from this alone... we aren't going to reconstruct 108, so many address differences to 72 :D [18:30:34] hehehehe [19:51:40] Ron's use of python-graphviz makes me want to make some kind of automated graph generator for our systems config files [19:52:07] I had forgotten that package existed [19:54:46] https://nassp.space/index.php/File:CSM_systems_diagram.gif [19:54:54] but this was probably created manually? [20:27:13] I believe so [20:48:12] but, yes just like that [20:48:16] but automated [21:26:37] night! [13:46:43] good morning [13:51:04] hey Matt [13:51:20] don't call me crazy :D [13:51:23] https://github.com/indy91/AGCPadloadGenerator/commit/d1265cb0f670c2a87d419ebdfcbbeddad0743e17 [14:08:07] oooo [14:21:16] what are you up to? :) [14:23:45] just finishing support for any AGC padload I can think of haha [14:24:04] still have to properly verify Apollo 12 CMC and earlier padloads by direct comparison the flown one [14:24:38] and next probably adding some requested RTCC features [14:25:03] ... most of which are probably RTACF features [14:25:12] but I don't think people want a separate RTACF MFD :D [15:39:09] morning! [16:18:15] hey Mike [16:23:58] divide ended up being a problem after all :D [16:24:39] some calculations yaLVDC's implementation is great, but some calculations are off 1, or even off by 4 [16:28:16] of course :D [16:30:09] it was inevitable [17:48:24] you are allowed to find Skylark now btw [17:48:35] started adding support in the padload generator [17:49:25] hahaha oh good I've been holding off :P [17:53:11] Zerlina supported as well [17:53:25] I've mostly some verifying left to do [17:53:32] and adding a GUI for Skylark [18:06:34] getting close on that project :D [18:11:10] nice [18:12:11] indy91, can't remember if I have already asked. did you add drift rates and biases to your padload generator? [18:17:21] not really. They are being set to zero. All our current padloads just don't have them at all [18:17:32] I could fairly easily add the scaling and such [18:19:27] a good example of DIV being weird in the LVDC: 00000000 / 377777777 = 377777774 [18:19:40] I'd normally expect 0 divided by most things to just be 0 :P [18:19:49] you would think so :D [18:21:54] is this a bit of a special case in yaAGC as well? [18:21:57] my new implementation of DIV in yaLVDC gets that correct though! [18:22:00] uhhh I'm not sure [18:22:24] does the new DIV take a short iteration? [18:23:57] https://pastebin.com/Y7uEY0h7 [18:24:56] 24 iterations, so a bit "long", but it's just doing bit shifts, bitwise ORs, additions, and subtractions, which should all be fast [18:25:54] yeah, probably no issue [18:44:44] okay, I think I'm happy with DIV [18:45:00] that leaves EXM as the last instruction to self-test, and then it's on to implementing the LVDA for yaLVDC [18:48:25] :D [18:48:52] LVDA in yaLVDC will be interesting. Don't forget that we might eventually want to put yaLVDC in NASSP :D [18:49:32] so don't make the I/O too hard on us haha [18:54:02] oh I'm going to limit it to the two timers and the RTC for now [18:54:10] but already I think it's not bad [18:55:02] it is done by this processInterruptsAndIO function in a different file https://github.com/virtualagc/virtualagc/blob/master/yaLVDC/processInterruptsAndIO.c#L158 [18:55:49] Ron has it totally filled out with PTC stuff.... I'm probably going to make this split into one function for LVDA and a different one for PTC. and probably also will make it take in elapsed LVDC instruction cycles since that number is critically important for all of the timers [19:00:15] right [19:00:20] this is yaLVDC not yaPTC :D [19:00:40] they are one and the same because of how Ron made this lol [19:19:11] how likely are we to need "yaRCA110" at some point? [19:25:55] haha, not sure about need [19:26:21] I have the basics of a simulation of it in the optional LCC class [19:28:06] I know we have some code for it. [19:28:40] I've looked through it a bit. [19:29:03] I looked at it right now [19:29:14] it might as well have been written by someone else [19:29:19] I remember so little of it :D [19:29:52] there was/is a LCC MFD too, right? [19:29:56] yeah [19:30:09] does that not buid by default [19:30:10] if you put a LCC vessel in the simulation then it comes with that MFD [19:30:16] ahhhh [19:30:20] the MFD only exists within that vessel [19:31:22] the LCC vessel at least is likely going to have countdown information it will need to save/load [19:31:30] so eventually it's not going to be optional anymore [19:34:02] makes sense. so this is what we'd need to be working to elliminate the "missiontime" restrictions [19:47:33] most of the work on that will have to be in the CSM and LM, to not use mission time much anymore [20:09:47] he's definitely wrong about when SQEXT gets reset, at least [20:10:08] I wonder if this is a case of expander gates being on different schematic pages and therefore hard to find [20:12:30] ah yeah, INKBT1 has such a gate [20:13:07] on sheet 1 of module B21, not a place that is obvious to look [20:13:29] oh sheet 2 even [20:29:11] I think this is actually the second time I've gotten this question [20:29:22] that sneaky gate is hard to spot [20:29:51] haha [20:56:36] night! [12:30:37] hey [12:55:04] hey [12:55:56] was an easy PR to approve I guess :D [13:16:21] yes :) [15:14:07] morning! [15:17:24] hello hello [15:17:37] EXM is behaving? [15:18:07] shockingly yes [15:18:32] still have a decent amount of tests for it to write [15:18:39] but so far so good [15:19:35] great [15:28:46] I should be able to finish those today and get on to working on the LVDA for yaLVDC [19:07:42] everything still looking good for EXM [19:08:02] just a few more combinations to try on the addressing bits [19:09:42] I was going to say something, but I am not going to, to avoid jinxing it :D [19:10:15] hahaha [19:29:59] EXM-into-MPH works first try in the simulator and the emulator too :D [19:30:11] two weird instructions strung together [19:32:16] haha [19:34:25] is that a combination that occurs frequently or is it just a case of "it would work on the hardware" [19:34:41] I kind of doubt they would do this [19:35:45] in AS-512 they never do EXM->MPH but they do use EXM->MPY [20:12:27] I think I'm at a point in my IMU adventure where I have to either admit defeat, or start investigating what part of our IMU or yaAGC isn't quite matching up with reality [20:14:12] I'm down to be a rubber duck or help dig into yaAGC or what the IMU would really do [20:49:03] must be some strange coordinate system thing [20:49:19] who knows, maybe we even find general issues with our gyro torquing in the process [20:58:01] night! [21:16:50] thewonderidiot, I think I probably need to make a list of all the things I want to check so I don't miss something, but for starters https://github.com/orbiternassp/NASSP/blob/924f69590f0aeb4f26e4b7ac6d66e37906859c75/Orbitersdk/samples/ProjectApollo/src_sys/imu.cpp#L170 [21:20:20] looking at this https://www.ibiblio.org/apollo/assembly_language_manual.html#CPU_Architecture_Registers I'm nut sure we're even looking at the right address [21:20:40] *not [21:22:45] the right address for what specifically? [21:23:38] fine align [21:23:43] the 0177 [21:25:08] it's possible that I'm reading it very wrong.... [21:25:45] ah, yeah, you're looking at the wrong page for that [21:27:07] 177 isn't "real", it's something Ron came up with [21:27:14] he calls it a "fictitious I/O channel" [21:27:22] https://www.ibiblio.org/apollo/developer.html#Fictitious_IO_Channels [21:27:28] https://github.com/virtualagc/virtualagc/blob/master/yaAGC/agc_engine.c#L2254 [21:30:56] ahh I wasn't sure how fictitious it was. [21:31:14] extremely [21:32:20] makes sense. in that case it looks right then...at least insofar as that particular aspect of our IMU is concerned [22:29:42] I just ran another quick test of the magnitude of the total drift rate, vs drift compensation rate, and I'm coming up with very similar values. So maybe it *is* that I still have something backwards coordinte system-wise [15:19:04] morning! [15:19:18] hey [15:20:38] what's up? [15:21:36] https://www.orbiter-forum.com/threads/thread-calculation-fails-pc-2-update.41275/ [15:22:12] I guess I have some debugging to do :D [15:22:27] oh fun haha [15:34:59] hmm, seems to be a more difficult issue [15:37:40] conic solution converged without issue, but the integrated one runs into some weird trouble. Part of it looks like it has converged, but it really hasn't... [15:46:12] I'm going to blame hyperbolic orbits [15:56:27] can't trust those things [15:58:11] they tend to be a bit....eccentric [16:07:47] all very true [16:26:58] https://i.imgur.com/OjSplZs.png [16:36:20] so parabolic orbits are even less trustworthy [17:42:36] so I've started in on adding LVDA stuff to yaLVDC [17:43:37] I think I have most of what I need already implemented -- but I have fallen down a deep rabbit hole of "how do interrupts work in yaLVDC", which was quickly followed by "how does it select the next instruction to run", and "how does the automatic hop save work" [17:43:54] and to get things to really correctly work I need to refactor all three :P [17:46:19] I think I might be getting close, but am definitely expecting to go through a period of "everything is broken" before I make it through [17:49:10] hmm yeah, I know the feeling [18:09:39] I think I found the bug :D [18:09:46] oh nice! [18:09:53] stupid RTCC Requirements document, always full of errors [18:10:36] luckily I also have the same function in the IBM documents [18:11:11] https://i.imgur.com/0M4HssE.png [18:11:17] tolerance is 0.1 seconds [18:11:27] that looks significantly better :D [18:12:02] smaller eccentricity band, I was homing in on the discontinuity [18:12:37] ok now. This is not 1:1 related to where I saw the bug happen, so it's not 100% that this fixes it [18:18:08] it's fixed :D [18:18:36] very nice! [18:21:11] know what the Pythagorean identity is? [18:21:28] cos(x)² + sin(x)^2 = 1 [18:22:15] except with hyperbolic trigonometry it is [18:22:27] cosh(x)^2 – sinh(x)^2 = 1 [18:22:39] RTCC Requirements document didn't care [18:22:50] just used the first one for all orbits [18:23:06] but IBM flowchart had it right [18:34:43] oh no [18:34:54] that 'h' makes a big difference [18:37:22] yeah haha [18:37:51] it does the "cos(x)^2 + sin(x)^2 = 1" before it branches into eccentric vs. hyperbolic [18:38:16] IBM document does the two different equations in the branches of the flowchart [18:41:00] I'm pretty sure this was a bug that has been eluding me for a while [18:41:22] I remember that for a while I didn't want to use this function because of "issues" [18:41:43] but that was a long time ago already and in the mean time I had forgotten why :D [18:44:27] I've had a few instances recently where I find myself computing the probability that I got some particular math right [18:48:21] I prefer to do that based on possible inputs/functions/misspellings rather than historical data: I get better numbers that way [18:53:04] I'm not sure I would like the results of such probabilities for me... [18:55:58] thanks for approving! [18:57:38] no problem :) [18:57:55] is the DAP pad PR ready/tested? [18:59:44] yeah should be good. Always a bit annoying for old scenarios if I squeeze in a new MCC state [19:00:24] although in this case it was easy for testing. The Apollo 11 mission scenario for After Docking immediately does the new calculation [19:00:51] Oh don't wory, I have far better ways to break okd scenerios :) [19:01:08] I bet :D [19:01:40] and it's just old scenarios between docking and TEI that do a calculation again [19:13:01] I have similiar ways of breaking scenarios [19:13:38] on one of the tests with Turry for uplinks with the LM telemetry client I put a maxed out IMU bias compensation in his LGC [19:14:27] I was thinking of a terrible, yet subtle way to break his AGC [19:14:33] that's what came to my mind [19:16:24] hahaha that is evil [20:07:42] I think in the course of starting and stopping my IMU drift project, I managed to mix up angular rates of the SM with angular rates of the gimbals [20:08:02] which is probably the root of my coordinate system confusion [20:09:19] I'm blaming my poorly labled matlab graphs from last December [20:39:50] SM vs gimbals sounds like the differences you were noticing [21:11:29] oh nice, yeah, that would definitely do it [21:25:53] night! [02:53:06] oh? [03:42:07] oh? [04:29:30] .tell n7275 oh? [05:54:11] .tell thewonderidiot I saw a message come through here about something to do with matrix bridge support being down which I thought was odd since we don't have anything like that set up, and it didn't show up on any other client i have open [06:07:01] oh. [06:07:10] eeird [06:07:15] *weird [08:17:07] Hello. Who is Tschachim ? [15:12:03] hello [15:12:56] hey Niklas [15:16:52] understand IMU biases a bit better than 24 hours ago? :D [15:37:24] yes [15:37:27] definitely [15:39:45] that's the memo that begins "Some confusion still exists..." [16:31:55] morning! [16:41:44] hey Mike [16:42:36] what's up? [16:44:04] trying to decide how best to test the acceleration-sensitive drift rates [18:06:33] n7275, something I wanted to implement for a while now is IMU attitude verification. Probably based on a REFSMMAT and the actual attitude from the Orbiter API, calculate the expected IMU attitude. And then compare with actual. [18:06:55] or are you doing that already... [18:15:45] indy91, somehow my interrupt scheme appears to have worked out without too many headaches. I'm going to hit it with a bunch more self-tests tonight to confirm proper timer operation in the LVDA, but it's getting extremely close [18:15:52] first launch attempt probably in the next day or two [18:16:42] :O [18:16:46] that's awesome [18:17:01] can't wait to see in what fun ways it fails to work [18:17:05] hahaha yeah [18:17:25] how many hydrosynchronous orbits will be achieved before I make it to LEO [18:18:45] you think it makes it past the launchpad, that's good optimism [18:19:24] you probably want a lot of debug data. You can send me some output numbers to see if they make sense [18:19:33] like, calculated inclination etc. [18:19:50] that will be the first few things that have to be calculated right [18:20:19] yeah. I'm planning for starters on logging all of the PIO things it tries to telemetry to a file [18:20:27] *telemeter [18:21:03] we can compare to NASSP LV logs :D [18:21:23] I don't have the flight simulation mode implemented in our LVDC [18:21:27] although I kind of want to [18:22:57] oh that would be fun [19:32:57] indy91, I can add something like that. platform orientation is a rotation matrix WRT Orbiter's global frame, so that should be fairly easy to compare [19:33:48] sure. I wasn't sure if it should be a permanent thing in e.g. the RTCC MFD or just a few lines of code for a debug string. But if you can work it out, all the better [19:41:51] probably something simple for now, like a functon that takes a rotation matrix as an argument and returns angles between the input and IMU.Orbiter.AttitudeReference [19:51:20] and I'll get the resolvers outputting the voltages values they should be [19:51:30] as a bonus feature [20:02:44] in the long term, if we merge the IMU drift PR, then we probably want a simple way to evaluate how good the current alignment is and if it changes over time, for debugging purposes [20:03:10] maybe needs to be a utility in the RTCC MFD due to REFSMMATs being involved [20:13:12] stupid LM optics support display, why do you show PYR and not RPY... [20:25:36] does the RTCC class already have access to the IMU directly? [20:30:32] yeah, RTCC is a friend class in the IMU [20:31:01] although I don't see right now where that is getting used :D [20:31:49] ah [20:31:57] MCC uses it for gyro torquing angles [20:36:24] but that gyro torquing calculation isn't giving a perfect alignment relative to the REFSMMAT [20:36:30] it is based on the CSM IMU attitude [20:36:45] so if that is imperfect so will be the LM IMU attitude after the V42 [20:53:55] night! [15:05:49] good afternoon [15:22:16] morning! [15:22:37] hey Mike [15:23:23] good news: I cleared the pad :D [15:24:32] but if I'm interpreting the data right I may have shot straight up. I think I got up to ~2270km altitude or so and then started coming right back down [15:26:16] no way :D [15:26:18] hahaha [15:27:08] pitch polynomial got lazy [15:27:33] what about time bases [15:27:38] how far did it proceed there [15:29:08] I made it all the way to the end. time base 5 for ~145 seconds and then I hit the terminating case I had thought we were going to hit [15:33:40] I guess the simulated attitude was never updated!? [15:33:52] ladder ramp processor [15:34:18] that's my best guess, yeah [15:34:20] maybe there is some bit in that flight simulation word that needs to be set [15:34:36] did you have it set to launch from KSC? [15:34:59] hmm, I don't think so. I only set the repeatable bit [15:35:14] and we may actually not have choices there for repeatable -- let me check something real quick [15:35:25] oh ok [15:36:04] hmm [15:36:11] yeah so the very first repeatable simulation check it makes [15:36:19] now I am not sure if the ladder ramp processor is even used in the repeatable mode [15:36:22] it ANDs D.FMDI with bit 11 [15:36:28] might be only for the FCC checkout in non-repeatable [15:36:37] if it is set (meaning repeatable) it goes to the label GP000A [15:36:49] which immediately stores the accumulator back into D.FMDI [15:36:56] ah no, it does use ladder ramp [15:37:10] which I'm pretty sure means, if you select repeatable it automatically turns off all of the other flight mode bits [15:37:30] right [15:37:49] what it should do is replace "actual" attitude with the guidance attitude [15:38:29] so it always flies the desired attitude [15:39:03] yeah [15:39:21] so something may have messed that up somehow [15:41:05] hey guys [15:41:33] yo [15:41:42] hey Matt [15:44:50] I'm trying to find the place where that is done, use desired attitude as actual attitude [15:45:09] yeah I think my gimbal angles are never changing from 0,0,0 [15:45:24] unless this is only "real" gimbal angles [15:46:21] forget the ladder ramp processor, I think that is some additional steering commands, in addition to the desired attitude. More like the stroker test in the CMC [15:51:55] https://i.imgur.io/P0KGDKf_d.webp?maxwidth=640&shape=thumb&fidelity=medium [15:53:54] hehehe [16:00:48] wait, gimbal angles actually zero? [16:00:54] they should not be zero at liftoff [16:01:29] maybe it still does some reasonability test and with the angles zero it just never updates the actual attitude [16:03:31] yeah. I was looking at D.VTHX, D.VTHY, D.VTHZ there (X, Y, Z GIMBAL ANGLE) [16:05:53] I kind of expected that to be set by the simulation mode at the beginning [16:06:22] do you know if variable launch azimuth calculated reasonable things? [16:06:32] the part of it that gets used anyway [16:06:45] I did not call it at all haha [16:06:56] so no, it didn't :D [16:07:26] I thought most of that stuff got overwritten with hardcoded numbers for repeatable though [16:08:52] I thought it was at least partially using it [16:08:59] to calculated inclination and descending node angle [16:09:03] calculate* [16:09:34] nah, those two get replaced with hardcoded numbers in phase 1 initialization for the sim flights [16:10:06] azimuth too? [16:11:31] what hardcoded inclination does it use [16:11:59] I think we already talked about this :D [16:12:07] we did haha [16:12:55] P.LAMB EQU (123.147/180) [16:12:56] * DESCENDING NODE FOR SIM FLT [16:12:57] P.I EQU (32.54/180) [16:12:58] * INCLINATION ANGLE FOR SIM FLT [16:13:56] pretty standard [16:14:14] ok, it might have processed even less than I initially though [16:14:16] thought [16:14:31] maybe not much more than simulated accelerometer and boost navigation worked [16:17:14] so, chi computations (CC) comes up with the commanded attitude [16:17:29] did those CHI values change at all? [16:18:19] I see variables for delta chi, command chi, and guidance chi [16:18:28] which chi do you want to see? [16:19:05] uhh [16:20:06] all of them kind of. Although I don't know yet which one is which with the last two ones [16:20:15] what does it calculate and telemeter in chi computations? [16:21:34] uhh, command chi I think [16:21:42] is delta chi the difference between command and guidance, as calculated at the beginning of minor loop support [16:21:56] I know no variable names, we have to first establish a common language :D [16:23:10] looks like it yeah [16:23:58] then your "command chi" is the actually desired attitude at all times [16:24:25] where "guidance chi" is a sort of smoothed version of it, generate together in minor loop support and minor loop [16:24:35] generated* [16:24:48] so, does "command chi" ever change at all [16:25:25] starts out 0,0,0 [16:25:47] now getting some X [16:25:55] counted upt to 210410 [16:25:59] *2104140 [16:26:06] and then back down to 0 [16:26:24] now stuck at 0,0,0 again [16:27:10] when does the X command happen [16:27:24] could be the ladder ramp command at TB1+20 or so [16:28:47] that's a complicated question that is going to take some math :D [16:29:05] would you expect this to return to 0,0,0 after every command it tries to do? [16:29:11] no [16:29:17] I wouldn't even expect it to start at 0 at all [16:29:21] cool haha [16:29:28] I just checked in-sim [16:29:47] the expected attitude at liftoff is 342° roll, 0° in pitch and yaw [16:29:57] interesting, okay [16:30:22] I believe some prelaunch code should force it to hold attitude until you clear the tower [16:30:25] unfortunately I need to go to a meeting. job means I can't play with saturn stuff all day lol [16:30:28] haha ok [16:31:05] that might be one potential next step. Force it to have 342° roll. [16:31:27] I also want to look at what all it is reading from the LVDA [16:31:42] to see if it is expecting any more pieces there to be simulated [16:37:12] there is a lot of LVDA reading still even in repeatable mode. PIO channels 023, 053, 057, 107, 117, 127, 203, 273, 303 [16:37:19] all unsimulated, all just returning 0000000000 [16:37:28] so depending on what those are that could also be a problem [16:59:38] hmm right [17:11:40] all I can tell you right now that the boost navigation probably works right :D [17:30:38] what makes you say that? [17:31:09] well the initial value of the backup acceleration calculation also works [17:31:21] and if the attitude never changes and boost navigation works correctly [17:31:24] it just goes up [17:31:46] haha gotcha [17:31:51] not much more has to work to achieve that [17:32:54] bonus points if the mass is properly decremented for simulated accelerometers :D [17:42:46] my guidance chi starts going crazy in late TB3 [17:42:50] seems unhealthy heh [17:43:36] I think I probably have a lot of EDD reading ahead of me tonight [17:44:26] I just did a bit of EDD reading and it didn't help me much... [17:44:36] I should have learned more about flight simulation modes earlier [17:45:01] could be ladder ramp commands again in late TB3 [17:45:18] uhh so, guidance chi [17:45:31] does that change a lot during flight? [17:46:11] https://pastebin.com/raw/FDwmCsZJ [17:46:24] that is how command chi X changes in early TB1 [17:48:26] guidance chi starts at 0,0,0 at the beginning of simulation, and changes to this near the beginning of TB1: [17:48:27] X=0 [17:48:28] Y=376063710 [17:48:29] Z=707071 [17:49:04] Z goes to 0 after a bit, and Y gets slowly more negative as TB1 goes on [17:49:39] Y is pitch [17:49:43] so it does a pitch program [17:50:05] in yaw (Z) it would be a small yaw program [17:50:33] tower avoidance [17:50:54] so that doesn't seem unreasonable [17:51:09] might be outdated, but the yaw should start at TB1+1s and stop at TB1+9s [17:51:21] now into TB2.... [17:51:23] TB2+16.397719 [17:51:23] X=0 [17:51:24] Y=320771460 [17:51:25] Z=0 [17:51:30] seems normal [17:51:39] although I haven't figured out the scaling yet :D [17:51:52] and in TB3 it has stopped changing. it is stuck on [17:51:55] ------------------- [17:51:57] TB3+24.577875 [17:52:00] X=0 [17:52:01] Y=320214260 [17:52:02] Z=0 [17:52:03] attitude freeze after staging [17:52:05] until skirt sep [17:52:17] eventually the IGM should start [17:52:23] you would finally get changes in all axes [17:52:42] and then a very dramatic change at TB3+43 seconds or so [17:52:46] TB3+41.662688 [17:52:49] X=0 [17:52:52] Y=320214260 [17:52:56] that's the IGM [17:52:59] Z=0 [17:53:01] ------------------- [17:53:04] TB3+43.288876 [17:53:06] X=0 [17:53:09] Y=63517345 [17:53:13] Z=53141014 [17:53:15] uhh [17:53:18] I would not be surprised if there was an initial alignment issue [17:53:22] and it launched in the wrong direction [17:53:28] so the IGM tries to compensate [17:53:34] or alternatively [17:53:39] and now X is remaining 0, but Y and Z are wildly changing [17:53:47] as you said before, the attitude didn't actually change [17:53:52] and it was going straight up [17:53:57] even if this commanded attitude changes [17:54:51] yeah [17:54:58] and in any case with the IGM it tries closed loop steering [17:55:04] but something is off [17:56:08] if I understand the scaling the last reasonable pitch value is 292.89° [17:56:11] the Y=320214260 [17:58:27] well that gives me a place to start looking :D [17:58:53] if the IGM is going crazy, I can hopefully follow its math and figure out what it's missing or where it's going off the rails [17:59:07] that value is very normal for tilt arres at the end of S-IC flight! [17:59:17] oh nice! [17:59:24] so the pitch program works, at least in the commanded attitude [17:59:55] your initial roll attitude is definitely off, not idea though what should account for that [18:00:03] maybe something the prelaunch program takes care of [18:01:51] "and now X is remaining 0, but Y and Z are wildly changing" roll (X) is commanded to 0° throughout [18:03:03] ah, makes sense [18:03:57] hmm, I'm starting to have doubts about the initial roll being an issue [18:04:15] because it might just think it sits differently on the launchpad [18:04:39] but it could be relevant for one of the matrices that are calculated before launch [18:05:23] it's extremely possible that I need to do more in my preflight program [18:06:05] it currently: [18:06:08] 1. sets bit 11 in D.FMDI [18:06:09] 2. jumps to the flight program entry point E.GP0 [18:06:10] and that's it lol [18:11:05] hey that's as extensive as the preflight program that I had in mind [18:15:00] interesting [18:15:11] the pastebin you gave me [18:15:21] roll [18:15:23] starts at 0° [18:15:26] goes to exactly 3° max [18:15:28] back to 0° [18:15:49] I know that there was a change in the logic for the yaw program [18:16:01] originally it was only done in the actual yaw angle [18:16:22] but depending on the initial alignment, that's actually not away from the launchpad, not directly anyway [18:16:35] maybe this roll is part of that somehow [18:18:38] or a ladder ramp command [18:18:55] the Saturn IB version of it starts a roll at TB1+22 seconds, 5° max [18:30:37] might reduce confusion if you check the data for the ladder ramp processor, to see what commands it does [18:42:25] that will only reduce confusion once I learn about how the ladder ramp processor works :D [18:43:49] check the very, very last page of the EDD [18:43:56] not the bright red one [18:44:00] the one before that :D [18:45:33] hahahaha [18:46:11] aha, I see :D [18:46:31] I'm still somewhat confused by it [18:46:52] I feel like adding these commands to nominal, simulated attitudes would make you divert from the desired trajectory...