New Members

New Members

You should get an activation email when you join.  If not, please contact

info@radarspotting.com
Welcome, Guest. Please login or register.
August 25, 2019, 03:54:34 am

Login with username, password and session length

Members
Users Online
Users: 1
Guests: 51
Total: 52

Silhouettes, Profiles and Operator Logos

If you're looking for a bulk download, we have nearly 47,000 aircraft silhouettes, profiles and operator logos available in bmp file format, 85x20 pixels. You can find all the Zip files here.  

And you can request new logos or silhouettes in the the Logo section - Ian K, Paulm, Steve Hibberd, Mustang51, Chris Alder, s92driver and Simon Brooke.  Latest Additions






Author Topic: Outline arc plotting  (Read 263 times)

0 Members and 1 Guest are viewing this topic.

Offline G4UMW

  • Member
  • ****
  • Posts: 213
  • Country: england
    • http://radarspotting.com/forum/index.php?action=treasury
    • The Shuttleworth Collection
Outline arc plotting
« on: February 05, 2019, 02:36:02 pm »
Can anyone provide the formula for plotting the lat/long coordinates of an arc given the origin, radius and start/end of the arc? I'm looking to update some of the controlled airspace outlines in BaseStation; it's surprising how many of them contain arcs based on the parameters mentioned.

MTIA,
Rob


  • SBS-1, SBS-1eR, SBS-3, R820T dongle
Rob/G4UMW

Offline atty

  • New Member
  • *
  • Posts: 11
  • Country: ru
Re: Outline arc plotting
« Reply #1 on: February 08, 2019, 01:03:44 pm »
Hi,

this is a JS function, where
lat1_deg, lon1_deg - center of your arc in degrees,
d - its radius in km,
a_deg - azimuth from center to arc point in degrees.
Variate a_deg from start arc to end in cycle and get arc point coordinates in r[0], r[1]

Code: [Select]

function latlonOL(lat1_deg, lon1_deg, d, a_deg) {
var lat, lon;
var lat1 = lat1_deg * Math.PI / 180.0;
var lon1 = lon1_deg * Math.PI / 180.0;
var a = a_deg * Math.PI / 180.0;
var r = [];

lat = Math.asin(Math.sin(lat1) * Math.cos(d/6378.1) + Math.cos(lat1) * Math.sin(d/6378.1) * Math.cos(a));
lon = lon1 + Math.atan2(Math.sin(a) * Math.sin(d/6378.1) * Math.cos(lat1),
Math.cos(d/6378.1) - Math.sin(lat1) * Math.sin(lat));

r[1] = lat * 180.0 / Math.PI;
r[0] = lon * 180.0 / Math.PI;

return r;
}

  • An ADSBox developer

Offline G4UMW

  • Member
  • ****
  • Posts: 213
  • Country: england
    • http://radarspotting.com/forum/index.php?action=treasury
    • The Shuttleworth Collection
Re: Outline arc plotting
« Reply #2 on: February 08, 2019, 03:27:31 pm »
большое спасибо!
  • SBS-1, SBS-1eR, SBS-3, R820T dongle
Rob/G4UMW

Offline laurent471

  • New Member
  • *
  • Posts: 1
  • Country: fr
Re: Outline arc plotting
« Reply #3 on: July 27, 2019, 04:33:51 pm »
Hello, I created a JS but it does not work at home.
  -------------------------------------------------- -------------
<script type = "text / javascript">
      function latlonOL (lat1_deg, lon1_deg, d, a_deg) {
var lat, lon;
var lat1 = lat1_deg * Math.PI / 180.0;
var lon1 = lon1_deg * Math.PI / 180.0;
var a = a_deg * Math.PI / 180.0;
var r = [];

lat = Math.asin (Math.sin (lat1) * Math.cos (d / 6378.1) + Math.cos (lat1) * Math.sin (d / 6378.1) * Math.cos (a));
lon = lon1 + Math.atan2 (Math.sin (a) * Math.sin (d / 6378.1) * Math.cos (lat1),
Math.cos (d / 6378.1) - Math.sin (lat1) * Math.sin (lat));

r [1] = lat * 180.0 / Math.PI;
r
  • = lon * 180.0 / Math.PI;


return r;
}

</ Script>
-------------------------------------------------- -

Where is my mistake ??
  • Radar Virtual