Navigational algorithms
The navigational algorithms are the quintessence of the executable software on portable calculators or smartphones as an aid to the art of navigation, this attempt article describe both algorithms and software for smartphones implementing different calculation procedures for navigation. The calculation power obtained by the languages—Basic, C, Java, etc.—from portable calculators or smartphones, has made it possible to develop programs that allow calculating the position without the need for tables, in fact they have some basic tables with the correction factors for each year and calculate the values "on the fly" at runtime.
Comparison between manual calculation methods and the use of calculators
- The traditional methods require bulky and expensive nautical tables, pencil and paper, and calculation time, following the working algorithms.
- Calculators do not need books and, with their own algorithms, allow quick and error-free calculation of navigation problems.
Types of algorithms
- Celestial navigation: Sight reduction, circle of equal altitude, Line Of Position, Fix...
- Positional astronomy: RA, GHA, Dec
- Coastal navigation: Range, Bearing, Horizontal angles, IALA...
- Sailings: Rhumbs, Loxodromic, Orthodromic, Meridional parts...
- Weather, tides
- Software PC- Smartphone: Nautical Almanac, Sailings, Variation, Sextant corrections
Programs for general navigation
Coordinate conversion subroutine
sub Rectang2Polar as double, b as double) static'----- Subprograma para convertir un vector de estado coord.cartesianas
'----- En vector de estado en coord.polars.
'----- De entrada: vector de estado en coord.cartesianes
'----- De salida: vector de estado en coord.polars.
'----- NOTA: El vector de velocidad polar es el de la velocidad total,
'----- Corregido por el efecto de la latitud.
'------------------------------------------------- ------------------------
mar x as double
mar y as double
mar z as double
mar x_dot as double
mar y_dot as double
mar z_dot as double
mar rho as double
mar r as double
mar lambda as double
mar beta as double
mar lambda_dot as double
mar beta_dot as double
mar r_dot as double
x = a
y = a
z = a
x_dot = a
y_dot = a
z_dot = a
rho = sqr
r = sqr
lambda = atan2
beta = atan2
if then beta = beta - TWOPI
yf rho = 0 # then
lambda_dot = 0 #
beta_dot = 0 #
else
lambda_dot = /
beta_dot = /
end if
r_dot = /r
'----- Componentes del vector de posición
b = lambda
if b > = TWOPI then b = b - TWOPI
b = beta
b = r
'----- Componentes del vector velocidad total
b = r * lambda_dot * cuerpo
b = r * beta_dot
b = r_dot
end sub
Programs for astronomical navigation
Advanced navigation algorithms include piloting and astronomical navigation: loxodromia and orthodromia. Height correction of the sextant. Astronomical position with calculator, template and blank mercantile chart. Position by 2 Lines of Height. Position from n Height Lines. Vector equation of the Height Circle. Position for vector solution from two observations. Position by Height Circles: matrix solution. And articles related to ancient procedures such as obtaining latitude by the pole star, the meridian, the method of lunar distances, etc.Programs for the "Nautical Almanac"
Ephemerides of the celestial bodies used in navigation.- GHA - Greenwich Hour Angle
- Dec - Declination
- SD - Semidiameter
- HP - Horizontal Parallax
- s the solution for course and SOG.
CelestialFix
Algorithm implementation:
For n = 2 observations
- An analytical solution of the two star sight problem of celestial navigation, James A. Van Allen.
- * Vector Solution for the Intersection of two Circles of Equal Altitude. Andrés Ruiz.
- DeWit/USNO Nautical Almanac/Compac Data, Least squares algorithm for n LOPs
- Kaplan algorithm, USNO. For n ≥ 8 observations, gives the solution for course and SOG.
Magnetic declination