WaBis

walter.bislins.ch

ISS Tracks on Flat Earth

ISS Tracks do not trace circles on the flat earth map! The red dots show distances traveled in the same time. Note that the distances between two points are about 3 times greater in the southern hemisphere than in the northern hemisphere, meaning the ISS travels 3 times faster in the southern hemisphere than in the northern hemisphere.

Code

var excentr = 51.6;
var period = 360 * (1 - 15.652/360);
var nOrbits = 360 / 15;

var EarthMap = ...

var graph = NewGraph2D( {
  Id: 'JsGraph1',
  Width: '100%',
  Height: '100%',
  DrawFunc: DrawModel,
  AutoReset: true,
  AutoClear: true,
  AutoScalePix: true
} );

function DrawModel( g ) {

  g.SetAngleMeasure( 'deg' );

  var VpScaleArgs = true;
  var VpClip      = false;
  var VpLeft      = 8;
  var VpTop       = 8;
  var VpRight     = -8;
  var VpBottom    = -8;
  g.SetViewport( VpLeft, VpTop, VpRight, VpBottom, VpScaleArgs, VpClip );

  var WinXmin = -180;
  var WinXmax = 180;
  var WinYmin = -180;
  var WinYmax = 180;
  var WinWidth = 360;
  var WinHeight = 360;
  g.SetWindowWH( WinXmin, WinYmin, WinWidth, WinHeight );

  DrawEarthMap( g );

  // draw some iss tracks
  var step = 5;
  var last = nOrbits * period;
  g.NewPoly();
  for (var pos = 0; pos <= last; pos += step) {
    var lat = 90 - excentr * Math.sin( 2 * Math.PI * pos / period );
    var a = pos * Math.PI / 180;
    var x = lat * Math.cos( a );
    var y = lat * Math.sin( a );
    g.AddPointToPoly( x, y );
  }
  g.SetLineAttr( '#888', 1 );
  g.DrawPoly( 1 );

  var first = 0.9 * nOrbits * period;
  var last = first + 2.5 * period;
  g.NewPoly();
  for (var pos = first; pos <= last; pos += step) {
    var lat = 90 - excentr * Math.sin( 2 * Math.PI * pos / period );
    var a = pos * Math.PI / 180;
    var x = lat * Math.cos( a );
    var y = lat * Math.sin( a );
    g.AddPointToPoly( x, y );
  }
  g.SetLineAttr( 'red', 2 );
  g.DrawPoly( 1 );

  var first = 0.9 * nOrbits * period;
  var last = first + 2.5 * period;
  g.NewPoly();
  for (var pos = first; pos <= last; pos += 2*step) {
    var lat = 90 - excentr * Math.sin( 2 * Math.PI * pos / period );
    var a = pos * Math.PI / 180;
    var x = lat * Math.cos( a );
    var y = lat * Math.sin( a );
    g.AddPointToPoly( x, y );
  }
  g.SetMarkerAttr( 'Circle', 5, 'red', 'white', 1 );
  g.DrawPolyMarker( 3 );

}

More Page Infos / Sitemap
Created Sunday, April 30, 2017
Scroll to Top of Page
Changed Sunday, November 7, 2021