Skip to content

Commit

Permalink
Merge branch 'release/neptus-3.0' into develop
Browse files Browse the repository at this point in the history
Conflicts:
	src/pt/lsts/neptus/renderer2d/ImageLayer.java
  • Loading branch information
paulosousadias committed Jan 15, 2014
2 parents 87578eb + 3c77b23 commit 6980fba
Show file tree
Hide file tree
Showing 14 changed files with 244 additions and 155 deletions.
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -201,4 +201,6 @@ dev-scripts/grow_pot.sh
/IHData/

/.s57
/s57maps
/s57maps

/*_dist
2 changes: 1 addition & 1 deletion build.xml
Original file line number Diff line number Diff line change
Expand Up @@ -389,7 +389,7 @@ For simple use the main targets are:
<filterset id="neptusSeacon.filters">
<filter token="NEPTUS_NAME" value="${Name}SC" />
<filter token="EXTRA_DIST_NAME" value="Seacon Edition ${seacon.release}" />
<filter token="INSTALL_DIR" value="${install.dir.name}Seacon" />
<filter token="INSTALL_DIR" value="${install.dir.name}SC" />
<!--filter token="VERSION_SE" value="${seacon.release}" /-->
<filter token="DIST_EXE" value="${dist.installer.name.seacon}" />
<filter token="INSTALLER_NSIS_NEPTUS_BATCH_PATH" value="..\static_files\batch_files\neptusse.bat" />
Expand Down
3 changes: 3 additions & 0 deletions dist/excludes_NeptusSE.txt
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
conf/mraplots/*.plot
plugins/accu.jar
plugins/blue-eye.jar
plugins/caoAgent.jar
plugins/envdisp*.jar
plugins/followRef.jar
plugins/matlab*.jar
plugins/matlab-planning.jar
plugins/mavs.jar
plugins/noptilus.jar
plugins/odss.jar
Expand Down
3 changes: 2 additions & 1 deletion dist/excludes_NeptusSeacon.txt
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
plugins/s57-client.jar
plugins/caoAgent.jar
plugins/s57-client.jar
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@
import java.awt.Graphics;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Date;
import java.util.TimeZone;

import javax.swing.ImageIcon;
Expand All @@ -53,7 +52,6 @@
import pt.lsts.neptus.mra.importers.IMraLogGroup;
import pt.lsts.neptus.mra.plots.LogMarkerListener;
import pt.lsts.neptus.mra.visualizations.MRAVisualization;
import pt.lsts.neptus.plugins.NeptusProperty;
import pt.lsts.neptus.plugins.PluginDescription;
import pt.lsts.neptus.util.ImageUtils;
import pt.lsts.neptus.util.llf.LogUtils;
Expand All @@ -62,15 +60,15 @@
* @author jqcorreia
*
*/
@PluginDescription(author = "jqcorreia", name = "Sidescan Analyzer")
public class SidescanAnalyzer extends JPanel implements MRAVisualization, TimelineChangeListener,
LogMarkerListener {
@PluginDescription(author = "jqcorreia", name = "Sidescan Analyzer", icon = "pt/lsts/neptus/plugins/echosounder/echosounder.png")
public class SidescanAnalyzer extends JPanel implements MRAVisualization, TimelineChangeListener, LogMarkerListener {
private static final long serialVersionUID = 1L;

protected MRAPanel mraPanel;

// bottom toolbar for playing / pausing etc..
private Timeline timeline;
//Histogram histogram;
// Histogram histogram;

private long firstPingTime;
private long lastPingTime;
Expand All @@ -79,15 +77,15 @@ public class SidescanAnalyzer extends JPanel implements MRAVisualization, Timeli
private long lastUpdateTime;

// List of different frequencies on this log
//private ArrayList<Double> freqList = new ArrayList<Double>();
// private ArrayList<Double> freqList = new ArrayList<Double>();

// Processing flags
@NeptusProperty(name="Vertical Blending")
public boolean verticalBlending = false;
@NeptusProperty(name="Slant Range Correction")
public boolean slantRangeCorrection = false;
@NeptusProperty(name="Time Variable Gain")
public boolean timeVariableGain = false;
// Processing flags - not used ?!?!
// @NeptusProperty(name = "vertical Blending")
// public boolean verticalBlending = false;
// @NeptusProperty(name = "Slant Range Correction")
// public boolean slantRangeCorrection = false;
// @NeptusProperty(name = "Time Variable Gain")
// public boolean timeVariableGain = false;

private ArrayList<SidescanPanel> sidescanPanels = new ArrayList<SidescanPanel>();

Expand All @@ -109,14 +107,16 @@ public void initialize(IMraLogGroup source) {

lastUpdateTime = firstPingTime;

for(Integer subsys : ssParser.getSubsystemList()) {
for (Integer subsys : ssParser.getSubsystemList()) {
System.out.println(subsys);
sidescanPanels.add(new SidescanPanel(this, ssParser, subsys));
}

fmt.setTimeZone(TimeZone.getTimeZone("UTC"));

System.out.println(fmt.format(new Date(firstPingTime)) + " " + fmt.format(new Date(lastPingTime)) + " " + (lastPingTime - firstPingTime));
// NeptusLog.pub().info(
// fmt.format("First Ping time: " + new Date(firstPingTime)) + "\nLast Ping time: "
// + fmt.format(new Date(lastPingTime)) + " " + "\nTotal time: " + (lastPingTime - firstPingTime));

timeline = new Timeline(0, (int) (lastPingTime - firstPingTime), 30, 1000, false);
timeline.getSlider().setValue(0);
Expand All @@ -126,18 +126,19 @@ public void initialize(IMraLogGroup source) {
@Override
public void paintTicks(Graphics g) {
super.paintTicks(g);
for(LogMarker m : markerList) {
for (LogMarker m : markerList) {
long mtime = new Double(m.timestamp).longValue();
g.drawLine(xPositionForValue((int)(mtime-firstPingTime)), 0, xPositionForValue((int)(mtime-firstPingTime)),timeline.getSlider().getHeight()/2);
// g.drawString(m.label, xPositionForValue((int)(mtime-firstPingTime))-10, 22);
g.drawLine(xPositionForValue((int) (mtime - firstPingTime)), 0,
xPositionForValue((int) (mtime - firstPingTime)), timeline.getSlider().getHeight() / 2);
// g.drawString(m.label, xPositionForValue((int)(mtime-firstPingTime))-10, 22);
}
}
}
});

// Layout building
setLayout(new MigLayout());

for(SidescanPanel p : sidescanPanels) {
for (SidescanPanel p : sidescanPanels) {
add(p, "w 100%, h 100%, wrap");
}

Expand Down Expand Up @@ -172,9 +173,9 @@ public void timelineChanged(int value) {
try {
// This distinguishes between a drag and normal execution
// If this is true but currentTime and lastTime as the same value
if(Math.abs(value - currentTime) > 1000 / 15 * timeline.getSpeed() ) {
if (Math.abs(value - currentTime) > 1000 / 15 * timeline.getSpeed()) {
// this means it dragged
for(SidescanPanel p : sidescanPanels)
for (SidescanPanel p : sidescanPanels)
p.clearLines();

lastUpdateTime = value;
Expand Down Expand Up @@ -207,7 +208,8 @@ public void timelineChanged(int value) {

@Override
public boolean canBeApplied(IMraLogGroup source) {
return LogUtils.hasIMCSidescan(source) || source.getFile("Data.jsf") != null || source.getLog("SidescanPing") != null;
return LogUtils.hasIMCSidescan(source) || source.getFile("Data.jsf") != null
|| source.getLog("SidescanPing") != null;
}

@Override
Expand Down Expand Up @@ -238,6 +240,7 @@ public Type getType() {
public ArrayList<LogMarker> getMarkerList() {
return markerList;
}

@Override
public void onCleanup() {
sidescanPanels.clear();
Expand All @@ -256,7 +259,6 @@ public void onShow() {

}


@Override
public void addLogMarker(LogMarker e) {
markerList.add(e);
Expand All @@ -272,5 +274,4 @@ public void GotoMarker(LogMarker marker) {

}


}
Loading

0 comments on commit 6980fba

Please sign in to comment.