Package fr.soleil.salsa.entity.scank

Examples of fr.soleil.salsa.entity.scank.ITrajectoryK


    @Override
    public void notifyKMinFieldChange(Double value) {
        if (config == null)
            return;

        ITrajectoryK trajectory = ((IConfigK) config).getDimensionX().getTrajectory();
        if (trajectory != null) {
            trajectory.setKMin(value);
            write();
            refresh();
        }
    }
View Full Code Here


    @Override
    public void notifyNFieldChange(Double value) {
        if (config == null)
            return;

        ITrajectoryK trajectory = ((IConfigK) config).getDimensionX().getTrajectory();
        if (trajectory != null) {
            trajectory.setN(value);
            write();
            refresh();
        }
    }
View Full Code Here

    @Override
    public void notifyPostEdgeTimeFieldChange(Double value) {
        if (config == null)
            return;

        ITrajectoryK trajectory = ((IConfigK) config).getDimensionX().getTrajectory();
        if (trajectory != null) {
            trajectory.setTimePostEdge(value);
            write();
            refresh();
        }
    }
View Full Code Here

                            }
                        }
                        else if (config instanceof IConfigK) {
                            IConfigK configK = (IConfigK) config;
                            IDimensionK dimensionK = configK.getDimensionX();
                            ITrajectoryK trajectoryK = dimensionK.getRangeX().getTrajectory();
                            List<IActuator> listTrajectory = dimensionK.getActuatorsList();
                            for (int i = 0; i < listTrajectory.size(); i++) {
                                IActuator actuatork = listTrajectory.get(i);
                                if ((actuatork != null) && actuatork.isEnabled()) {
                                    ITrajectory trajectory = copyToTrajectoryImpl(actuatork,
View Full Code Here

    private ITrajectory copyToTrajectoryImpl(IActuator actuator, ITrajectory trajectory) {
        ITrajectory trajectoryImpl = null;
        // System.out.println("copyToTrajectoryImpl= " + name + " trajectory= " + trajectory);
        if ((trajectory != null) && (actuator != null)) {
            if (trajectory instanceof ITrajectoryK) {
                ITrajectoryK trajectoryK = (ITrajectoryK) trajectory;
                TrajectoryKImpl trajectoryKImpl = new TrajectoryKImpl();
                trajectoryKImpl.setRelative(false);
                trajectoryKImpl.setE0(trajectoryK.getE0());
                trajectoryKImpl.setE1(trajectoryK.getE1());
                trajectoryKImpl.setE2(trajectoryK.getE2());
                trajectoryKImpl.setEDeltaEdge(trajectoryK.getEDeltaEdge());
                trajectoryKImpl.setEDeltaPreEdge(trajectoryK.getEDeltaPreEdge());
                trajectoryKImpl.setEMin(trajectoryK.getEMin());
                trajectoryKImpl.setKDelta(trajectoryK.getKDelta());
                trajectoryKImpl.setKMax(trajectoryK.getKMax());
                trajectoryKImpl.setKMin(trajectoryK.getKMin());
                trajectoryKImpl.setM(trajectoryK.getM());
                trajectoryKImpl.setN(trajectoryK.getN());
                trajectoryImpl = trajectoryKImpl;
            }
            else {
                trajectoryImpl = new TrajectoryImpl();
                Double beginPosition = trajectory.getBeginPosition();
View Full Code Here

        if (trajectory != null) {
            String id = trajectory.getName();
            actuator.setAttribute("id", id);

            if (trajectory instanceof ITrajectoryK) {
                ITrajectoryK trajectoryK = (ITrajectoryK) trajectory;
                actuator.setAttribute("e0", String.valueOf(trajectoryK.getE0()));
                actuator.setAttribute("e1", String.valueOf(trajectoryK.getE1()));
                actuator.setAttribute("e2", String.valueOf(trajectoryK.getE2()));
                actuator.setAttribute("edeltaedge", String.valueOf(trajectoryK.getEDeltaEdge()));
                actuator.setAttribute("edeltapreEdge",
                        String.valueOf(trajectoryK.getEDeltaPreEdge()));
                actuator.setAttribute("emin", String.valueOf(trajectoryK.getEMin()));
                actuator.setAttribute("kdelta", String.valueOf(trajectoryK.getKDelta()));
                actuator.setAttribute("kmax", String.valueOf(trajectoryK.getKMax()));
                actuator.setAttribute("kmin", String.valueOf(trajectoryK.getKMin()));
                actuator.setAttribute("m", String.valueOf(trajectoryK.getM()));
                actuator.setAttribute("n", String.valueOf(trajectoryK.getN()));
            }
            else {
                actuator.setAttribute("from", String.valueOf(trajectory.getBeginPosition()));
                actuator.setAttribute("to", String.valueOf(trajectory.getEndPosition()));
                actuator.setAttribute("delta", String.valueOf(trajectory.getDelta()));
View Full Code Here

                int enabledActuatorsNumber = 0;

                if (dimension instanceof IDimensionK) {
                    enabledActuatorsNumber = 1;

                    ITrajectoryK trajectoryK = ((IDimensionK) dimension).getRangeX().getTrajectory();

                    allActuatorsPositionsArray = TrajectoryCalculator.calculateKTrajectoriesPosition(trajectoryK);
                    // System.out.println("K Trajectory="
                    // + Arrays.toString(trajectoriesPositionsArray));
                    // System.out.println("K Trajectory size=" +
                    // trajectoriesPositionsArray.length);
                    integrationsTimesArray = TrajectoryCalculator.calculateIntegrationTimesK(trajectoryK);
                    // System.out.println("K integration size=" +
                    // integrationsTimesArray.length);
                    // System.out.println("K integration=" +
                    // Arrays.toString(integrationsTimesArray));
                    totalStepsNumber = allActuatorsPositionsArray.length;
                    speedList.add(trajectoryK.getSpeed());
                } else {
                    // The positions must be sorted by actuator, so we loop over
                    // the actuators.
                    for (int index = 0; index < actuatorsList.size(); index++) {
                        IActuator actuator = actuatorsList.get(index);
View Full Code Here

                                        // System.out.println("trajectory name="
                                        // +
                                        // trajectory.getName());

                                        if (dimension instanceof IDimensionK) {
                                            ITrajectoryK ktraj = ((IDimensionK) dimension).getTrajectory();
                                            scanInfoList.add(actuatorInfo + "type:K");
                                            scanInfoList.add(actuatorInfo + "emin:" + ktraj.getEMin());
                                            scanInfoList.add(actuatorInfo + "pre_edge_delta:"
                                                    + ktraj.getEDeltaPreEdge());
                                            scanInfoList.add(actuatorInfo + "e0:" + ktraj.getE0());
                                            scanInfoList.add(actuatorInfo + "e1:" + ktraj.getE1());
                                            scanInfoList.add(actuatorInfo + "e2:" + ktraj.getE2());
                                            scanInfoList.add(actuatorInfo + "edge_delta:" + ktraj.getEDeltaEdge());
                                            if (ktraj.getM() > 0) {
                                                scanInfoList.add(actuatorInfo + "m:" + ktraj.getM());
                                            }
                                            scanInfoList.add(actuatorInfo + "kmin:" + ktraj.getKMin());
                                            scanInfoList.add(actuatorInfo + "kmax:" + ktraj.getKMax());
                                            scanInfoList.add(actuatorInfo + "kdelta" + ktraj.getKDelta());
                                        } else {
                                            if (trajectory instanceof ITrajectoryHCS) {
                                                scanInfoList.add(actuatorInfo + "type:HCS");
                                            }
                                            if (trajectory instanceof ITrajectoryEnergy) {
View Full Code Here

    /**
     *
     */
    public void setTrajectory(ITrajectoryK trajectory) {
        ITrajectoryK oldValue = this.baseBean.getTrajectory();
        this.baseBean.setTrajectory(trajectory);
        this.firePropertyChange("trajectories", oldValue, trajectory);
    }
View Full Code Here

                                            rangeInfo = "range_" + rangeIndex + "/";
                                        }

                                        trajectory = trajectoryList.get(i);
                                        if (dimension instanceof IDimensionK) {
                                            ITrajectoryK ktraj = ((IDimensionK) dimension).getTrajectory();
                                            scanInfoList.add(actuatorInfo + "type:K");
                                            scanInfoList.add(actuatorInfo + "emin:" + ktraj.getEMin());
                                            scanInfoList.add(actuatorInfo + "pre_edge_delta:"
                                                    + ktraj.getEDeltaPreEdge());
                                            scanInfoList.add(actuatorInfo + "e0:" + ktraj.getE0());
                                            scanInfoList.add(actuatorInfo + "e1:" + ktraj.getE1());
                                            scanInfoList.add(actuatorInfo + "e2:" + ktraj.getE2());
                                            scanInfoList.add(actuatorInfo + "edge_delta:" + ktraj.getEDeltaEdge());
                                            if (ktraj.getM() > 0) {
                                                scanInfoList.add(actuatorInfo + "m:" + ktraj.getM());
                                            }
                                            scanInfoList.add(actuatorInfo + "kmin:" + ktraj.getKMin());
                                            scanInfoList.add(actuatorInfo + "kmax:" + ktraj.getKMax());
                                            scanInfoList.add(actuatorInfo + "kdelta" + ktraj.getKDelta());
                                        } else {
                                            if (trajectory instanceof ITrajectoryHCS) {
                                                scanInfoList.add(actuatorInfo + "type:HCS");
                                            }
                                            if (trajectory instanceof ITrajectoryEnergy) {
View Full Code Here

TOP

Related Classes of fr.soleil.salsa.entity.scank.ITrajectoryK

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.