Package fr.soleil.salsa.entity.scan1d

Examples of fr.soleil.salsa.entity.scan1d.IRange1D


    /**
     *
     */
    public void setRange(IRange1D range) {
        IRange1D oldValue = this.baseBean.getRange();
        this.baseBean.setRange(range);
        this.firePropertyChange("range", oldValue, range);
    }
View Full Code Here


     */
    public void refresh() {
        if (this.rangeModelsList != null && this.actuatorModelsList != null && view != null) {

            for (int j = 0; j < ((IConfig1D) config).getDimensionX().getRangesXList().size(); j++) {
                IRange1D r = ((IConfig1D) config).getDimensionX().getRangesXList().get(j);
                view.setIntegrationTime(j, r.getIntegrationTime() + "");
                view.setStepNumber(j, r.getStepsNumber() + "");
            }

            for (int i = 0; i < ((IConfig1D) config).getDimensionX().getRangesXList().size(); i++)
                for (int j = 0; j < ((IConfig1D) config).getDimensionX().getRangesXList().get(i)
                        .getTrajectoriesList().size(); j++) {
View Full Code Here

     */
    public void read() {
        if (this.config != null) {

            for (int j = 0; j < ((IConfig1D) config).getDimensionX().getRangesXList().size(); j++) {
                IRange1D r = ((IConfig1D) config).getDimensionX().getRangesXList().get(j);
                r.setIntegrationTime(Double.valueOf(view.getIntegrationTime(j)));
                r.setStepsNumber(Integer.valueOf(view.getStepNumber(j)));
            }

            for (int j = 0, k = 0; j < ((IConfig1D) config).getDimensionX().getRangesXList().size(); j++) {
                for (int i = 0; i < ((IConfig1D) config).getDimensionX().getActuatorsList().size(); i++, k++) {
                    if (((IConfig1D) config).getDimensionX().getTrajectoriesList().size() > k) {
View Full Code Here

                beginPosition);

        /*ITrajectory t1 = ((IConfig1D) config).getDimensionX().getRangesXList().get(jPosition)
                .getTrajectoriesList().get(iPosition);*/

        IRange1D iRange = ((IConfig1D) config).getDimensionX().getRangesXList().get(jPosition);
        ITrajectory1D itrajectory = (ITrajectory1D) iRange.getTrajectoriesList().get(iPosition);

        /*
        ITrajectory trajectoryImpl = Trajectory1DModelWrapperFactory.getInstance().unWrap(
                itrajectory);
        */
 
View Full Code Here

     *
     * @param integrationtime
     */
    public void computeIntegrationTimeChange(Double integrationTime, int jPosition) {

        IRange1D range = this.rangeModelsList.get(jPosition);
        range.setIntegrationTime(integrationTime);

        ITrajectory1D trajectory = (ITrajectory1D) ((IConfig1D) config).getDimensionX()
                .getRangesXList().get(jPosition).getTrajectoriesList().get(0);

        ITrajectory trajectoryImpl = getPartialTrajectory(trajectory);

        // IRange1D rangeImpl = getPartialRange(range);
        ITrajectory1D trajectoryResult = (ITrajectory1D) Config1DApi
                .computeIntegrationTimeChange(trajectoryImpl);

        IRange1D rangeResult = trajectoryResult.getRange();

        if (rangeResult.getTrajectoriesList().size() == range.getTrajectoriesList().size()) {

            int size = rangeResult.getTrajectoriesList().size();
            for (int i = 0; i < size; i++) {
                ITrajectory1D dst = (ITrajectory1D) range.getTrajectoriesList().get(i);
                ITrajectory1D src = (ITrajectory1D) rangeResult.getTrajectoriesList().get(i);
                swapTrajectory(dst, src);
            }

        }

View Full Code Here

     *
     * @param StepsNumbe
     */
    public void computeStepsNumberChange(Integer stepsNumber, int jPosition) {

        IRange1D range = this.rangeModelsList.get(jPosition);
        range.setStepsNumber(stepsNumber);

        ITrajectory1D trajectory = (ITrajectory1D) ((IConfig1D) config).getDimensionX()
                .getRangesXList().get(jPosition).getTrajectoriesList().get(0);

        ITrajectory trajectoryImpl = getPartialTrajectory(trajectory);

        // IRange1D rangeImpl = getPartialRange(range);
        ITrajectory1D trajectoryResult = (ITrajectory1D) Config1DApi
                .computeStepsNumberChange(trajectoryImpl);

        IRange1D rangeResult = trajectoryResult.getRange();

        if (rangeResult.getTrajectoriesList().size() == range.getTrajectoriesList().size()) {

            int size = rangeResult.getTrajectoriesList().size();
            for (int i = 0; i < size; i++) {
                ITrajectory1D dst = (ITrajectory1D) range.getTrajectoriesList().get(i);
                ITrajectory1D src = (ITrajectory1D) rangeResult.getTrajectoriesList().get(i);
                swapTrajectory(dst, src);
            }

        }

View Full Code Here

        Trajectory1DImpl trajectoryImpl = getPartialTrajectory(itrajectory);
        trajectoryImpl.setDelta(delta);

        ITrajectory1D result = (ITrajectory1D) Config1DApi.computeDeltaChange(trajectoryImpl);

        IRange1D resultRange = result.getRange();
        IRange1D range = itrajectory.getRange();
        range.setStepsNumber(resultRange.getStepsNumber());
        range.setIntegrationTime(resultRange.getIntegrationTime());

        if (resultRange.getTrajectoriesList().size() == range.getTrajectoriesList().size()) {

            int size = resultRange.getTrajectoriesList().size();
            for (int i = 0; i < size; i++) {
                ITrajectory1D dst = (ITrajectory1D) range.getTrajectoriesList().get(i);
                ITrajectory1D src = (ITrajectory1D) resultRange.getTrajectoriesList().get(i);
                swapTrajectory(dst, src);
            }

        }
View Full Code Here

            IDimension1D dimension = ((IConfig1D) config).getDimensionX();
            rangeToAdd.setIntegrationTime(1.0);
            rangeToAdd.setStepsNumber(1);
            this.rangeModelsList.add(rangeToAdd);
            ((IConfig1D) config).getDimensionX().getRangesXList().add(rangeToAdd);
            IRange1D range = ((IConfig1D) config).getDimensionX().getRangesXList().get(
                    ((IConfig1D) config).getDimensionX().getRangesXList().size() - 1);
            ((Range1DModel) range).addListener(listenerRange1D);

            for (int i = 0; i < this.actuatorModelsList.size(); i++) {
                Trajectory1DModel trajectory1DModelToAdd = new Trajectory1DModel();
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) {
        IRange1D range = ((ITrajectory1D) 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

        double endPosition = trajectory.getEndPosition();
        // if(endPosition == 0){
        // endPosition = beginPosition;
        // trajectory.setEndPosition(endPosition);
        // }
        IRange1D range = ((ITrajectory1D) trajectory).getRange();
        if (deltaLock) {
            double delta = trajectory.getDelta();
            int stepsNumber = (int) Math.abs(Math.round((endPosition - beginPosition) / delta));
            range.setStepsNumber(stepsNumber);
            this.subComputeStepsNumberChange((ITrajectory1D) trajectory);
        }
        else {
            int stepsNumber = range.getStepsNumber();
            double delta = Math.abs(endPosition - beginPosition) / stepsNumber;
            trajectory.setDelta(delta);
            trajectory.setSpeed(delta / range.getIntegrationTime());
        }
        return trajectory;
    }
View Full Code Here

TOP

Related Classes of fr.soleil.salsa.entity.scan1d.IRange1D

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.