Package fr.soleil.salsa.entity.scanenergy

Examples of fr.soleil.salsa.entity.scanenergy.IRangeEnergy


    private ITrajectory subComputeDeltaChange(ITrajectory trajectory, boolean deltaLock) {
        double beginPosition = trajectory.getBeginPosition();
        double endPosition = trajectory.getEndPosition();
        double delta = trajectory.getDelta();

        IRangeEnergy range = ((ITrajectoryEnergy) trajectory).getRange();

        // Update step number
        if (deltaLock && range != null) {
            double steps = Math.abs((endPosition - beginPosition) / delta);
            int stepsNumber = (int) Math.round(steps);
            range.setStepsNumber(stepsNumber);

        }

        return trajectory;
    }
View Full Code Here


     * @param range the range that was modified.
     * @return the updated config. It may be another instance entirely.
     */
    // This function returns the configuration it received as parameter.
    private ITrajectory subComputeStepsNumberChange(ITrajectory newTrajectory) {
        IRangeEnergy range = ((ITrajectoryEnergy) newTrajectory).getRange();
        int stepsNumber = range.getStepsNumber();
        double integrationTime = range.getIntegrationTime();
        for (ITrajectory trajectory : range.getTrajectoriesList()) {
            if (trajectory.getBeginPosition() != null && trajectory.getEndPosition() != null) {
                trajectory.setDelta(Math.abs((trajectory.getEndPosition() - trajectory
                        .getBeginPosition())
                        / stepsNumber));
                trajectory.setSpeed(trajectory.getDelta() / integrationTime);
View Full Code Here

        return newTrajectory;
    }

    private double subComputeSpeedChange(ITrajectory newTrajectory) {
        IRangeEnergy range = ((ITrajectoryEnergy) newTrajectory).getRange();
        int stepsNumber = range.getStepsNumber();
        double integrationTime = range.getIntegrationTime();
        double delta = Math.abs((newTrajectory.getEndPosition() - newTrajectory.getBeginPosition())
                / (stepsNumber * integrationTime));

        return delta;
    }
View Full Code Here

        this.firePropertyChange("actuator", oldValue, actuator);
    }

    @Override
    public void setRange(IRangeEnergy range) {
        IRangeEnergy oldValue = this.baseBean.getRange();
        this.baseBean.setRange(range);
        this.firePropertyChange("range", oldValue, range);
    }
View Full Code Here

        this.firePropertyChange("actuator", oldValue, actuator);
    }

    @Override
    public void setRange(IRangeEnergy range) {
        IRangeEnergy oldValue = this.baseBean.getRange();
        this.baseBean.setRange(range);
        this.firePropertyChange("range", oldValue, range);
    }
View Full Code Here

        if (config != null) {
            IDimensionEnergy dimensionEnergy = config.getDimensionX();
            List<IActuator> actuatorsList = dimensionEnergy.getActuatorsList();
            if (actuatorsList.size() != 0) {
                IActuator actuator = actuatorsList.get(0);
                IRangeEnergy rangeEnergy = createRange(dimensionEnergy);
                ITrajectoryEnergy trajectoryEnergy = createTrajectory(rangeEnergy, actuator);
                List<ITrajectory> trajectoriesList = rangeEnergy.getTrajectoriesList();
                if (trajectoriesList == null) {
                    trajectoriesList = new ArrayList<ITrajectory>();
                    rangeEnergy.setTrajectoriesList(trajectoriesList);
                }
                rangeEnergy.getTrajectoriesList().add(trajectoryEnergy);
                dimensionEnergy.getRangesEnergyList().add(rangeEnergy);
            }
        }
        refresh();
    }
View Full Code Here

            return;
        }

        IDimensionEnergy dimensionEnergy = config.getDimensionEnergy();
        List<IRangeEnergy> rangesList = dimensionEnergy.getRangesEnergyList();
        IRangeEnergy rangeEnergy = rangesList.get(row);
        ITrajectoryEnergy trajectoryEnergy = (ITrajectoryEnergy) rangeEnergy.getTrajectoriesList()
                .get(0);

        if (trajectoryEnergy.getBeginPosition() == beginPosition) {
            return;
        }
View Full Code Here

            return;
        }

        IDimensionEnergy dimensionEnergy = config.getDimensionEnergy();
        List<IRangeEnergy> rangesList = dimensionEnergy.getRangesEnergyList();
        IRangeEnergy rangeEnergy = rangesList.get(row);
        ITrajectoryEnergy trajectoryEnergy = (ITrajectoryEnergy) rangeEnergy.getTrajectoriesList()
                .get(0);

        if (trajectoryEnergy.getDelta() == delta) {
            return;
        }
View Full Code Here

            return;
        }

        IDimensionEnergy dimensionEnergy = config.getDimensionEnergy();
        List<IRangeEnergy> rangesList = dimensionEnergy.getRangesEnergyList();
        IRangeEnergy rangeEnergy = rangesList.get(row);
        ITrajectoryEnergy trajectoryEnergy = (ITrajectoryEnergy) rangeEnergy.getTrajectoriesList()
                .get(0);

        if (trajectoryEnergy.getEndPosition() == endPosition) {
            return;
        }
View Full Code Here

            return;
        }

        IDimensionEnergy dimensionEnergy = config.getDimensionEnergy();
        List<IRangeEnergy> rangesList = dimensionEnergy.getRangesEnergyList();
        IRangeEnergy rangeEnergy = rangesList.get(row);
        ITrajectoryEnergy trajectoryEnergy = (ITrajectoryEnergy) rangeEnergy.getTrajectoriesList()
                .get(0);

        if (integrationTime == rangeEnergy.getIntegrationTime()) {
            return;
        }

        rangeEnergy.setIntegrationTime(integrationTime);

        ConfigEnergyApiClient.computeIntegrationTimeChange(trajectoryEnergy);

        refresh();
    }
View Full Code Here

TOP

Related Classes of fr.soleil.salsa.entity.scanenergy.IRangeEnergy

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.