Ejemplo n.º 1
0
        private void BtnCalculate_Click(object sender, RoutedEventArgs e)
        {
            ship = new ShipData(input.ShipWidth, input.ShipDraft, input.MetacentricHeight, input.ShipSpeed, input.HeadingAngle);
            wave = new WaveData(input.WaveLength, ship);
            rp   = new ResonantPitching(wave, ship);

            double radius = input.ShipSpeed * 180 / 30;

            coordsFactory = new CoordinatesFactory(rp, ship, radius);

            points = coordsFactory.GetDictionaryOfInstances();

            diag = new PitchingDiagram(cnvDiagram, points);

            diag.Draw();

            gbInputData.IsEnabled = false;

            lblResult.Content += string.Format("\n{0}", rp.CheckRules());

            rp.DisplayLimitsToLabel(lblResult);
        }
 public CoordinatesFactory(ResonantPitching rp, ShipData ship, double radius)
 {
     m_rp     = rp;
     m_ship   = ship;
     m_radius = radius;
 }
Ejemplo n.º 3
0
 public WaveData(int waveLength, ShipData ship)
 {
     m_waveLength = waveLength;
     this.ship    = ship;
 }
 public ResonantPitching(WaveData wave, ShipData ship)
 {
     this.wave = wave;
     this.ship = ship;
 }