Hi Rich,
Thanks for the help, after looking through all the C (C++ ?) programs in the two directories I was able to find a few "#define xxxx" lines, like, "#define CFGFILE /home/pete/config/mt_adc.conf", so that's great, I just need to change those to what I want, and put the config files in those spots, and that should be okay.
I also need to change ttyUSBO to ttyS0 inside "gps.c", so that's an easy one as well.
I do need to take care that my data directory (where data is stored) right now is "/home/data", that would currently be written to the pen drive ! (slow), I want it to rather go to the CF-card, I'm wondering if "/mnt/sda5/data" or something like that would work, or, perhaps in the future, maybe I should just install TC completely onto the CF card....
Just a couple of other things though, Peter defines a shared memory segment of 256 MBytes for the logger program, I'm not sure yet if he has this in a script file or something but in the comments of a C (C++) program called "shared_mem.c" he says that we can do this by typing "echo 268435456 > /proc/sys/kernel/shmmax".
I guess I could run that (or similar) with a script file called out of bootlocal.sh ?, or perhaps I could just edit sysctl.conf and make that change in there permanently ?, assuming that file exists in Tinycore ?
Then the only other thing relates to the good old PPS, I'm planning on using a TTL level PPS (0 to 3.3 V) whereas the current setup uses an RS232 level PPS which has been divided down from it's original ~ +6 to - 5 V range to a roughly symmetrical +/- 1.3 V (kind of messily done with two voltage dividers).
Inside a program called pps_stats.c, Peter has a bunch of "cumulative distribution functions" (in lookup tables) that he's using to predict where the zero crossing (defined as the midpoint of the low-high transition) of the PPS signal is (I think anyway), but I'm not really sure, C (C++ ?) code always looks odd to me, so, I'm not sure, if I redefine the PPS waveform do I need to collect a bunch of these "new" PPS waveforms, make a probability amplitude distribution and then integrate it to get a new cdf ?? I don't know if that's what Peter really did, I don't recall him ever talking about that, only that we need to know the +/- levels of the PPS signal.
I'm puzzled on this one, and have always been a bit puzzled as to what Peter was/is doing with the PPS signal, I even recall him saying something about adding extra samples if need be (from where ??-talk about distorting your measured data - -making up new samples ??) to account for a slightly off sample rate. Peter uses the PPS to measure the actual sample rate of the 24DSI, maybe it's 199999.79 Hz in reality when asking for 200 kHz for example....
A colleague of mine at work thinks Peter may be compensating for the effect of the FIR filter delay (in the delta-sigma ADC) on the PPS, but I don't know about that, why do it for the PPS channel and not for the other channels, and also, if all channels are delayed the same (same FIR filter applied to all channels), then there's nothing lost in terms of relative timing on the data, so I'm not sure about that one.
My confusion around the PPS continues. I was wondering if I could simply use a 2 nano-second sampling oscilliscope (8 bit voltage res though) to "hyper-fine" define the PPS signal that way, and then simply interpolate PPS zero-cross location based on the "sparse" 200 kHz sampled PPS waveform, I think that's what Peter is doing with the cdf, but I don't really understand how he's doing it, so I'm not sure.. I guess I don't want to re-write Peter's program either though, as I'm pretty much clueless with C (C++).
I could send you the pps_stats.c code for you t look at, if you have the time, and see what you think, it's only about 20 lines of actual code, the rest is tables. Peter says he's "compensating for lag between the A/D and the PPS", so that does kind of sound like what my co-worker suggested.
But I do recall Peter saying some odd things about ways of finding the zero-cross of the PPS with sparsely sampled (200 kHz) data too, so, going in circles on this one.
Thanks,
David