Package com.matussek.geo

Examples of com.matussek.geo.GeoLocation


    public static String getSatelliteStateJSON()
    {
  long now = System.currentTimeMillis() - timeDifference;
  extSat.setTime(now);
  GeoLocation groundPoint = extSat.getGroundPoint();
  // feed.ISS [{"key":"ISS","points":[{"latitude":42.362512004571265,"longitude":-71.07954331157089,"altitude":10}]}]
  StringBuilder sb = new StringBuilder();
  sb.append("[{\"key\":\"ISS\",\"points\":[[0.0,");
  sb.append(NF3.format(Math.toDegrees(groundPoint.getLat())));
  sb.append(",");
  sb.append(NF3.format(Math.toDegrees(groundPoint.getLon())));
  sb.append(",");
  sb.append(NF0.format(extSat.getAltitude() * 0.001D));
  sb.append("]]}]");
  return sb.toString();
    }
View Full Code Here


/*     */
/*     */   public String getSatelliteStateJSON()
/*     */   {
/* 116 */     long now = System.currentTimeMillis() - this.timeDifference;
/* 117 */     this.extSat.setTime(now);
/* 118 */     GeoLocation groundPoint = this.extSat.getGroundPoint();
/* 119 */     StringBuilder sb = new StringBuilder();
/* 120 */     sb.append('[');
/* 121 */     sb.append(now / 1000L);
/* 122 */     sb.append(',');
/* 123 */     sb.append(NF3.format(Math.toDegrees(groundPoint.getLon())));
/* 124 */     sb.append(',');
/* 125 */     sb.append(NF3.format(Math.toDegrees(groundPoint.getLat())));
/* 126 */     sb.append(',');
/* 127 */     sb.append(NF0.format(this.extSat.getAltitude() * 0.001D));
/* 128 */     sb.append(',');
/* 129 */     sb.append(NF0.format(this.extSat.getSpeed()));
/* 130 */     sb.append(']');
View Full Code Here

  sb.append('[');
  long now = System.currentTimeMillis() - timeDifference;
  double anOrbitLater = now + (extSat.getOrbitalPeriod() * 1000.0D);
  for (long time = now; time <= anOrbitLater; time += 60000L) {
      extSat.setTime(time);
      GeoLocation groundPoint = extSat.getGroundPoint();
      sb.append('[');
      sb.append(NF3.format(Math.toDegrees(groundPoint.getLon())));
      sb.append(',');
      sb.append(NF3.format(Math.toDegrees(groundPoint.getLat())));
      sb.append("],");
  }
  sb.deleteCharAt(sb.length() - 1);
  sb.append(']');
  return sb.toString();
View Full Code Here

/* 136 */     sb.append('[');
/* 137 */     long now = System.currentTimeMillis() - this.timeDifference;
/* 138 */     double anOrbitLater = now + (this.extSat.getOrbitalPeriod() * 1000.0D);
/* 139 */     for (long time = now; time <= anOrbitLater; time += 60000L) {
/* 140 */       this.extSat.setTime(time);
/* 141 */       GeoLocation groundPoint = this.extSat.getGroundPoint();
/* 142 */       sb.append('[');
/* 143 */       sb.append(NF3.format(Math.toDegrees(groundPoint.getLon())));
/* 144 */       sb.append(',');
/* 145 */       sb.append(NF3.format(Math.toDegrees(groundPoint.getLat())));
/* 146 */       sb.append("],");
/*     */     }
/* 148 */     sb.deleteCharAt(sb.length() - 1);
/* 149 */     sb.append(']');
/* 150 */     return sb.toString();
View Full Code Here

TOP

Related Classes of com.matussek.geo.GeoLocation

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.