Avatar

Achskonvertierung: Schlüsselwort ermitteln (Geodäsie/Vermessung)

AWO, Nussbaumen AG, Tuesday, 18.08.2009, 18:22 (vor 5365 Tagen) @ MichaeL

Nach dem momentanen Stand (incl veränderter spirout und angenommenen curvout) müsste es so aussehen:


 public String getGSIStationKeyword(int stationNumber) {
 
  AxisStation preStation     = stationNumber>0?this.getStation(stationNumber-1):null;
  AxisStation behindStation  = stationNumber<this.countStations()-1?this.getStation(stationNumber+1):null;
  AxisStation currentStation = this.getStation(stationNumber);
 
  if ( currentStation.getRadius() == 0 && currentStation.getClothoidParameter() == 0) {
   return "STRAIGHT";
  }
  else if ( currentStation.getRadius() == 0 && currentStation.getClothoidParameter() != 0) {
   return "SPIRIN";
  }
  else if (( currentStation.getRadius() != 0 && currentStation.getClothoidParameter() != 0 && preStation.getRadius() = 0 && behindStation.getRadius() != 0) || ( currentStation.getRadius() != 0 && currentStation.getClothoidParameter() != 0 && preStation.getRadius() != 0 && behindStation.getRadius() = 0)) {
   return "SPIROUT";
  }
  else if ( currentStation.getRadius() != 0 && currentStation.getClothoidParameter() == 0) {
   return "CURVE";
  }
  else if ( currentStation.getRadius() != 0 && currentStation.getClothoidParameter() && != 0 && preStation.getRadius() !=0 && behindStation.getRadius !=0 && preStation.getRadius() < behindStation.getRadius() ) {
   return "CURVEOUT";
  }
 
 
 
  return null;
 }

Mit meinen low-level-javaskills würde ich sagen es stimmt so ;)
Wahrscheinlich kann man spirout (mit cleverer Klammersetzung) noch etwas kürzen oder?

Seh gerade die Klammersetzung stimmt nicht, aber keine zeit mehr das zu ändern^^


gesamter Thread:

 RSS-Feed dieser Diskussion