code: def track2(
      lat1,
      lon1,
      lat2,
      lon2,
      ell: Ellipsoid = None,
      npts: int = 100,
      deg: bool = True,
  ) -> tuple[list, list]:
      """
      computes great circle tracks starting at the point lat1, lon1 and ending at lat2, lon2
  
      Parameters
      ----------
  
      lat1 : float
          Geodetic latitude of first point (degrees)
      lon1 : float
          Geodetic longitude of first point (degrees)
      lat2 : float
          Geodetic latitude of second point (degrees)
      lon2 : float
          Geodetic longitude of second point (degrees)
      ell : Ellipsoid, optional
            reference ellipsoid
      npts : int, optional
          number of points (default is 100)
      deg : bool, optional
            angular units degrees (default) or radians
  
      Results
      -------
  
      lats : list of float
          latitudes of points along track
      lons : list of float
          longitudes of points along track
  
      Based on code posted to the GMT mailing list in Dec 1999 by Jim Levens and by Jeff Whitaker <jeffrey.s.whitaker@noaa.gov>
      """
  
      if ell is None:
          ell = Ellipsoid.from_name("wgs84")
  
      if npts < 2:
          raise ValueError("npts must be greater than 1")
      if npts == 2:
          return [lat1, lat2], [lon1, lon2]
  
      if deg:
          lat1 = radians(lat1)
          lon1 = radians(lon1)
          lat2 = radians(lat2)
          lon2 = radians(lon2)
  
      gcarclen = 2.0 * asin(
          sqrt(
              (sin((lat1 - lat2) / 2)) ** 2
              + cos(lat1) * cos(lat2) * (sin((lon1 - lon2) / 2)) ** 2
          )
      )
      # check to see if points are antipodal (if so, route is undefined).
      if abs(gcarclen - pi) < 1e-12:
          raise ValueError(
              "cannot compute intermediate points on a great circle whose endpoints are antipodal"
          )
  
      distance, azimuth = vdist(lat1, lon1, lat2, lon2, ell, deg=False)
      dists = linspace(0, distance, npts)
  
      lats, lons = vreckon(lat1, lon1, dists, azimuth, ell, deg=False)
  
      if deg:
          lats = degrees(lats)
          lons = degrees(lons)
  
      return lats, lons
  
file_path: pymap3d/src/pymap3d/vincenty.py
imports: from __future__ import annotations
  import warnings
  import logging
  from copy import copy
  from math import nan, pi, tau
  from .ellipsoid import Ellipsoid
  from .mathfun import asin, atan, atan2, cos, degrees, isnan, linspace, radians, sign, sin, sqrt, tan
label_desc: Use image node_id 3 for calling a global function with example usage: track2(lat1, lon1, lat2, lon2, ell, npts, deg) and returns: lats,  lons, list,  list