/// <summary> /// Creates a new instance of the <see cref="CycleData"/> class. /// </summary> /// <param name="cycleIndex">The index of the cycle being created.</param> /// <param name="sampleRateDivisor">The value to divide from the sample rate to determine the index of the sample at the start of the cycle.</param> /// <param name="frequency">The frequency of the measured system, in Hz.</param> /// <param name="voltageDataSet">The data set containing voltage measurements.</param> /// <param name="currentDataSet">The data set containing current measurements.</param> public CycleData(int cycleIndex, int sampleRateDivisor, double frequency, MeasurementDataSet voltageDataSet, MeasurementDataSet currentDataSet) { int sampleIndex; AN = new Conductor(cycleIndex, sampleRateDivisor, frequency, voltageDataSet.AN, currentDataSet.AN); BN = new Conductor(cycleIndex, sampleRateDivisor, frequency, voltageDataSet.BN, currentDataSet.BN); CN = new Conductor(cycleIndex, sampleRateDivisor, frequency, voltageDataSet.CN, currentDataSet.CN); sampleIndex = cycleIndex * (voltageDataSet.AN.SampleRate / sampleRateDivisor); StartTime = new DateTime(voltageDataSet.AN.Times[sampleIndex]); }
/// <summary> /// Creates a new instance of the <see cref="CycleData"/> class. /// </summary> public CycleData() { AN = new Conductor(); BN = new Conductor(); CN = new Conductor(); }