Skip to content

Commit 67d4f67

Browse files
authored
Clean code (#346)
- comments and outdated code parts removed
1 parent 9ae9b2f commit 67d4f67

File tree

1 file changed

+2
-57
lines changed
  • JAG3D/src/org/applied_geodesy/adjustment/network/observation

1 file changed

+2
-57
lines changed

JAG3D/src/org/applied_geodesy/adjustment/network/observation/DeltaZ.java

Lines changed: 2 additions & 57 deletions
Original file line numberDiff line numberDiff line change
@@ -148,11 +148,6 @@ public double diffVerticalDeflectionXe() {
148148
double rxe = this.getEndPoint().getVerticalDeflectionX().getValue();
149149
double rye = this.getEndPoint().getVerticalDeflectionY().getValue();
150150

151-
if (this.getReductions().getProjectionType() == ProjectionType.LOCAL_ELLIPSOIDAL) {
152-
rxe += this.getEndPoint().getSphericalDeflectionParameter().getSphericalDeflectionX();
153-
rye += this.getEndPoint().getSphericalDeflectionParameter().getSphericalDeflectionY();
154-
}
155-
156151
double crxe = Math.cos(rxe);
157152
double crye = Math.cos(rye);
158153
double srye = Math.sin(rye);
@@ -171,11 +166,6 @@ public double diffVerticalDeflectionYe() {
171166
double rxe = this.getEndPoint().getVerticalDeflectionX().getValue();
172167
double rye = this.getEndPoint().getVerticalDeflectionY().getValue();
173168

174-
if (this.getReductions().getProjectionType() == ProjectionType.LOCAL_ELLIPSOIDAL) {
175-
rxe += this.getEndPoint().getSphericalDeflectionParameter().getSphericalDeflectionX();
176-
rye += this.getEndPoint().getSphericalDeflectionParameter().getSphericalDeflectionY();
177-
}
178-
179169
double crxe = Math.cos(rxe);
180170
double crye = Math.cos(rye);
181171
double srye = Math.sin(rye);
@@ -204,12 +194,12 @@ public double diffScale() {
204194

205195
double rxe = this.getEndPoint().getVerticalDeflectionX().getValue();
206196
double rye = this.getEndPoint().getVerticalDeflectionY().getValue();
207-
197+
208198
double srxs = Math.sin(rxs);
209199
double srys = Math.sin(rys);
210200
double crxs = Math.cos(rxs);
211201
double crys = Math.cos(rys);
212-
202+
213203
double crxe = Math.cos(rxe);
214204
double crye = Math.cos(rye);
215205
double srye = Math.sin(rye);
@@ -283,51 +273,6 @@ public double getValueAposteriori() {
283273
double dh = we - ws + dN;
284274
return dh / scale;
285275
}
286-
287-
// private double getApproximatedUndulationDifferenceByAngles(double rxs, double rys, double rxe, double rye) {
288-
// Reduction reductions = this.getReductions();
289-
// double z0 = reductions.getPivotPoint().getZ0();
290-
// double R0 = reductions.getEarthRadius();
291-
// double h0 = reductions.getReferenceHeight();
292-
// double rs = Math.hypot(rxs, rys);
293-
// double re = Math.hypot(rxe, rye);
294-
// double R = R0 + h0 - z0;
295-
//
296-
// double Ns = R / Math.cos(rs) - R0;
297-
// double Ne = R / Math.cos(re) - R0;
298-
//
299-
// double dist2Ds = R * rs;
300-
// double dist2De = R * re;
301-
//
302-
// double Ns = Math.hypot(R, dist2Ds) - R0;
303-
// double Ne = Math.hypot(R, dist2De) - R0;
304-
//
305-
// return Ne - Ns;
306-
// }
307-
//
308-
// private double getApproximatedUndulationDifference(double xs, double ys, double xe, double ye) {
309-
// if (this.getReductions() == null || this.getReductions().getProjectionType() != ProjectionType.LOCAL_ELLIPSOIDAL)
310-
// return 0.0;
311-
//
312-
// // Neitzel/Petrovic (2004): Ein verallgemeinertes Feldverfahren zur Überpruefung von Nivelliergeraeten, Gls. (18),(19)
313-
// // N = SQRT(R*R - dist2D*dist2D) - R bzw. N = dist2D * dist2D / (2*R)
314-
// Reduction reductions = this.getReductions();
315-
// double x0 = reductions.getPivotPoint().getX0();
316-
// double y0 = reductions.getPivotPoint().getY0();
317-
// double z0 = reductions.getPivotPoint().getZ0();
318-
// double R0 = reductions.getEarthRadius();
319-
// double h0 = reductions.getReferenceHeight();
320-
//
321-
// double R = R0 + h0 - z0;
322-
//
323-
// // Approx. undulation
324-
// double dist2Ds = Math.hypot(xs - x0, ys - y0);
325-
// double dist2De = Math.hypot(xe - x0, ye - y0);
326-
// double Ns = Math.hypot(R, dist2Ds) - R0;
327-
// double Ne = Math.hypot(R, dist2De) - R0;
328-
//
329-
// return Ne - Ns;
330-
// }
331276

332277
@Override
333278
public ObservationType getObservationType() {

0 commit comments

Comments
 (0)