Package fr.soleil.salsa.entity.scanenergy

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


            return;
        }

        IDimensionEnergy dimensionEnergy = config.getDimensionX();
        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.getDimensionX();
        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);

        ConfigEnergyApiService.computeIntegrationTimeChange(trajectoryEnergy);

        refresh();
    }
View Full Code Here

            return;
        }

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

        if (stepsNumber == rangeEnergy.getStepsNumber()) {
            return;
        }

        rangeEnergy.setStepsNumber(stepsNumber);

        ConfigEnergyApiService.computeStepsNumberChange(trajectoryEnergy);

        refresh();
    }
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

            IDimensionEnergy dimensionEnergy = ((IConfigEnergy) config).getDimensionX();

            List<IActuator> actuatorsList = dimensionEnergy.getActuatorsList();
            if (actuatorsList.size() != 0) {
                IActuator actuator = actuatorsList.get(0);
                IRangeEnergy rangeEnergy = createRange();
                rangeEnergy.setDimension(dimensionEnergy);
                ITrajectoryEnergy trajectoryEnergy = createTrajectory();
                trajectoryEnergy.setRange(rangeEnergy);
                trajectoryEnergy.setActuator(actuator);
                List<ITrajectoryEnergy> trajectoriesEnergyList = dimensionEnergy.getTrajectoriesEnergyList();
                if (trajectoriesEnergyList == null) {
                    trajectoriesEnergyList = new ArrayList<ITrajectoryEnergy>();
                    dimensionEnergy.setTrajectoriesEnergyList(trajectoriesEnergyList);
                }
                trajectoriesEnergyList.add(trajectoryEnergy);

                List<ITrajectory> trajectoryList = rangeEnergy.getTrajectoriesList();
                if (trajectoryList == null) {
                    trajectoryList = new ArrayList<ITrajectory>();
                    rangeEnergy.setTrajectoriesList(trajectoryList);
                }
                trajectoryList.add(trajectoryEnergy);
                dimensionEnergy.getRangesEnergyList().add(rangeEnergy);
                ((IConfigEnergy) config).setDimensionX(dimensionEnergy);
                dimension = dimensionEnergy;
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

     */
    // This function returns the configuration it received as parameter.
    // Note that this is specific to LocalConfigMathService and that other implementations of
    // IConfigMathService may behave differently.
    public ITrajectory computeIntegrationTimeChange(ITrajectory newTrajectory) {
        IRangeEnergy range = ((ITrajectoryEnergy) newTrajectory).getRange();
        double integrationTime = range.getIntegrationTime();
        for (ITrajectory trajectory : range.getTrajectoriesList()) {
            if (trajectory.getDelta() != null) {
                trajectory.setSpeed(trajectory.getDelta() / integrationTime);
            }
        }
        return newTrajectory;
View Full Code Here

        assert (trajectory.getEndPosition() != null);

        double beginPosition = trajectory.getBeginPosition();
        double endPosition = trajectory.getEndPosition();
        IRangeEnergy range = ((ITrajectoryEnergy) trajectory).getRange();
        // if(endPosition == 0){
        // endPosition = beginPosition;
        // trajectory.setEndPosition(endPosition);
        // trajectory.setDelta(0.0);
        // }
        // else
        if (range != null) {
            if (deltaLock) {
                double delta = trajectory.getDelta();
                if (delta != 0) {
                    double steps = Math.abs((endPosition - beginPosition) / delta);
                    int stepsNumber = (int) Math.round(steps);
                    range.setStepsNumber(stepsNumber);
                    delta = Math.abs((beginPosition - endPosition) / stepsNumber);
                    trajectory.setDelta(delta);
                }
            }
            else {
                int stepsNumber = range.getStepsNumber();
                double delta = Math.abs((beginPosition - endPosition) / stepsNumber);
                trajectory.setDelta(delta);

            }
View Full Code Here

        double beginPosition = trajectory.getBeginPosition();
        double endPosition = trajectory.getEndPosition();

        trajectory.setSpeed(this.subComputeSpeedChange(trajectory));

        IRangeEnergy range = ((ITrajectoryEnergy) trajectory).getRange();
        if (range != null) {
            if (deltaLock) {
                double delta = trajectory.getDelta();
                if (delta != 0) {
                    double steps = Math.abs((endPosition - beginPosition) / delta);
                    int stepsNumber = (int) Math.round(steps);
                    range.setStepsNumber(stepsNumber);
                    delta = Math.abs((beginPosition - endPosition) / stepsNumber);
                    trajectory.setDelta(delta);
                }
            }
            else {
                int stepsNumber = range.getStepsNumber();
                double delta = Math.abs((beginPosition - endPosition) / stepsNumber);
                trajectory.setDelta(delta);
            }
        }
        return trajectory;
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.