Skip to content

Commit 691e39a

Browse files
authored
First velocity correction (#310)
- First velocity correction added to GKA import
1 parent 895e5f2 commit 691e39a

File tree

1 file changed

+30
-3
lines changed

1 file changed

+30
-3
lines changed

JAG3D/src/org/applied_geodesy/jag3d/ui/io/GKAFileReader.java

Lines changed: 30 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ public class GKAFileReader extends SourceFileReader<TreeItem<TreeItemValue>> {
4747
private boolean isNewStation = false;
4848
private String startPointName = null, lastStartPointName = null;
4949
private double ih = 0.0;
50+
private Double edmRefractiveIndex = null, edmCarrierWavelength = null;
5051
private TreeItem<TreeItemValue> lastTreeItem = null;
5152

5253
private List<TerrestrialObservationRow> horizontalDistances = null;
@@ -121,6 +122,8 @@ public void parse(String line) throws SQLException {
121122
if (line.startsWith("#GNV11")) {
122123
this.isNewStation = false;
123124
this.startPointName = null;
125+
this.edmRefractiveIndex = null;
126+
this.edmCarrierWavelength = null;
124127
this.ih = 0.0;
125128
}
126129

@@ -141,9 +144,20 @@ public void parse(String line) throws SQLException {
141144
// Target height for distance measurement
142145
try {th = Double.parseDouble(columns[9].trim());} catch(NumberFormatException e) {th = 0.0;};
143146

144-
double prismConst = 0;
147+
double prismConst = 0;
148+
double scale = 1.0;
145149
if (columns.length > 15)
146150
try {prismConst = Double.parseDouble(columns[15].trim());} catch(NumberFormatException e) {prismConst = 0.0;};
151+
152+
if (columns.length > 27) {
153+
double pressure = 99.99; // 99.99 == Not set
154+
double temperature = 99.99;
155+
156+
try {pressure = Double.parseDouble(columns[25].trim());} catch(NumberFormatException e) {pressure = 99.99;};
157+
try {temperature = Double.parseDouble(columns[26].trim());} catch(NumberFormatException e) {temperature = 99.99;};
158+
159+
scale = this.getFirstVelocityCorrection(temperature, pressure);
160+
}
147161

148162
double distance = 0;
149163
try {
@@ -154,7 +168,7 @@ public void parse(String line) throws SQLException {
154168
obs.setReflectorHeight(th);
155169
distance = Double.parseDouble(columns[7].trim());
156170
if (distance > 0 && (distance + prismConst) > 0) {
157-
distance = distance + prismConst;
171+
distance = scale * distance + prismConst;
158172
obs.setValueApriori(distance);
159173
obs.setDistanceApriori(distance);
160174
this.slopeDistances.add(obs);
@@ -202,12 +216,16 @@ public void parse(String line) throws SQLException {
202216
// P_tach, Tachname, orient, nsatzr, nsatzz, h_tach, I_extach, EX_tach, EY_tach, EZ_tach, ori, J,N, nWeatherFlag, nBattery
203217
// 38140004,Ost,0,0,0,0.00000000,1,,,,0.0,278.77885605,80.65533842,1,100
204218
String columns[] = line.split(",");
205-
if (columns.length < 6)
219+
if (columns.length < 13)
206220
return;
207221
this.startPointName = columns[1].trim();
208222
if (this.lastStartPointName == null)
209223
this.lastStartPointName = this.startPointName;
210224
try {this.ih = Double.parseDouble(columns[5].trim());} catch(NumberFormatException e) {this.ih = 0.0;};
225+
// EDM Korrekturwerte fuer 1. Geschwindigkeitskorrektur
226+
try {this.edmRefractiveIndex = Double.parseDouble(columns[11].trim());} catch(NumberFormatException e) {this.edmRefractiveIndex = null;};
227+
try {this.edmCarrierWavelength = Double.parseDouble(columns[12].trim());} catch(NumberFormatException e) {this.edmCarrierWavelength = null;};
228+
211229
this.isNewStation = false;
212230
}
213231

@@ -217,6 +235,8 @@ public void parse(String line) throws SQLException {
217235
this.lastStartPointName = this.startPointName;
218236
this.isNewStation = true;
219237
this.startPointName = null;
238+
this.edmRefractiveIndex = null;
239+
this.edmCarrierWavelength = null;
220240
this.ih = 0.0;
221241
}
222242
}
@@ -280,4 +300,11 @@ public static ExtensionFilter[] getExtensionFilters() {
280300
};
281301
}
282302

303+
private double getFirstVelocityCorrection(double temperature, double pressure) {
304+
if (this.edmCarrierWavelength == null || this.edmRefractiveIndex == null || pressure == 99.99 || temperature == 99.99)
305+
return 1.0;
306+
// Ferhat, G., Rouillon, H. and Malet J.-P. 2020: Analysis of atmospheric refraction
307+
// on Electronic Distance Measurements applied to landslide monitoring, Eq. (5)
308+
return 1.0 + (this.edmCarrierWavelength - this.edmRefractiveIndex * pressure / (temperature + 273.16)) * 1.0E-6;
309+
}
283310
}

0 commit comments

Comments
 (0)