Avatar

Form Analysis of cone with FormFittingToolbox (Geodäsie/Vermessung)

MichaeL ⌂, Bad Vilbel, Friday, 27.01.2012, 16:17 (vor 4473 Tagen) @ SarhatAdam

Hi,

please find here the command line version (cone only): ConeFFT.zip.

The application needs at least one argument - the point-file. Optional, you can define a (path to the) report file (default report.txt) and a damping parameter (default 0). I add two batch files (ConeFit.bat for Windows; ConeFit.sh for Linux) to show you the usecase.

Choose one of the follwing commands to start the adjustment.

java -jar -Xms200m -Xmx500m ConeFFT.jar points.txt
java -jar -Xms200m -Xmx500m ConeFFT.jar points.txt report.txt
java -jar -Xms200m -Xmx500m ConeFFT.jar points.txt report.txt 0
 

Hope it works. Let me know, if you have any problems! If it works and you are pleased with the adjustment results, please refer to Java Graticule 3D.

kind regards
Micha


Source-code for archive:

 /**********************************************************************
 *                     FormFittingToolboxConsole                        *
 ************************************************************************
 * Copyright (C) by Michael Loesler, http//derletztekick.com            *
 *                                                                      *
 * This program is free software; you can redistribute it and/or modify *
 * it under the terms of the GNU General Public License as published by *
 * the Free Software Foundation; either version 3 of the License, or    *
 * (at your option) any later version.                                  *
 *                                                                      *
 * This program is distributed in the hope that it will be useful,      *
 * but WITHOUT ANY WARRANTY; without even the implied warranty of       *
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the        *
 * GNU General Public License for more details.                         *
 *                                                                      *
 * You should have received a copy of the GNU General Public License    *
 * along with this program; if not, see <http://www.gnu.org/licenses/>  *
 * or write to the                                                      *
 * Free Software Foundation, Inc.,                                      *
 * 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.            *
 *                                                                      *
  **********************************************************************/
 
package com.derletztekick.geodesy.formFittingToolbox.v2.console;
 
import java.io.File;
import java.util.Locale;
 
import com.derletztekick.geodesy.formFittingToolbox.v2.FormManager;
import com.derletztekick.geodesy.formFittingToolbox.v2.form.Form;
import com.derletztekick.geodesy.formFittingToolbox.v2.form.form3d.Cone;
 
public class FormFittingToolboxConsole {
 
 /**
  * @param args
  */
 public static void main(String[] args) {
  double levmar = 0;
  File pointFile  = null;
  File exportFile = new File("report.txt");
  if (args.length > 0)
   pointFile = new File(args[0]);
  if (args.length > 1)
   exportFile = new File(args[1]);
  if (args.length > 2)
   try {levmar = Double.parseDouble(args[2]);} catch(NumberFormatException nfe) {nfe.printStackTrace();} 
 
  FormManager formManager = new FormManager(null, Locale.getDefault());
  formManager.setDimension(3);
  formManager.setFormClass(Cone.class);
 
  formManager.setPointFile(pointFile);
  formManager.readSourceFiles();
  formManager.setLevMarDampingValue(Math.abs(levmar));
  formManager.adjustUnknownParametersOnly(true);
  Form form = formManager.createForm();
 
  int status = form.estimateModel();
  System.out.println(status==1?"\n\nEstimation successfully finished!":"\n\nEstimation failed!");
  if (status == 1) 
   formManager.exportFormParametersToFile(exportFile);
 }
 
}
 

--
applied-geodesy.org - OpenSource Least-Squares Adjustment Software for Geodetic Sciences

Tags:
Cone, FormFittingToolbox, Console, Form Analysis, Shell, Windows, Linux


gesamter Thread:

 RSS-Feed dieser Diskussion