Loading...
Searching...
No Matches
GeodSolve.cpp File Reference

Command line utility for geodesic calculations. More...

`#include <iostream>`
`#include <string>`
`#include <sstream>`
`#include <fstream>`
`#include <GeographicLib/Geodesic.hpp>`
`#include <GeographicLib/GeodesicLine.hpp>`
`#include <GeographicLib/DMS.hpp>`
`#include <GeographicLib/Utility.hpp>`
`#include "GeodSolve.usage"`

Go to the source code of this file.

## Functions

std::string | LatLonString (real lat, real lon, int prec, bool dms, char dmssep, bool longfirst)
std::string | AzimuthString (real azi, int prec, bool dms, char dmssep)
std::string | DistanceStrings (real s12, real a12, bool full, bool arcmode, int prec, bool dms)
real | ReadDistance (const std::string &s, bool arcmode, bool fraction=false)
int | main (int argc, const char *const argv[])

## Detailed Description

Command line utility for geodesic calculations.

Copyright (c) Charles Karney (2009-2023) karne.nosp@m.y@al.nosp@m.um.mi.nosp@m.t.ed.nosp@m.u and licensed under the MIT/X11 License. For more information, see https://geographiclib.sourceforge.io/

See the man page for usage information.

Definition in file GeodSolve.cpp.

## Function Documentation

## LatLonString()

std::string LatLonString | ( | real | lat,
|  | real | lon,
|  | int | prec,
|  | bool | dms,
|  | char | dmssep,
|  | bool | longfirst )

Definition at line 30 of file GeodSolve.cpp.

References GeographicLib::DMS::Encode(), GeographicLib::DMS::LATITUDE, GeographicLib::DMS::LONGITUDE, and GeographicLib::DMS::NUMBER.

Referenced by main().

## AzimuthString()

std::string AzimuthString | ( | real | azi,
|  | int | prec,
|  | bool | dms,
|  | char | dmssep )

Definition at line 42 of file GeodSolve.cpp.

References GeographicLib::DMS::AZIMUTH, GeographicLib::DMS::Encode(), and GeographicLib::DMS::NUMBER.

Referenced by main().

## DistanceStrings()

std::string DistanceStrings | ( | real | s12,
|  | real | a12,
|  | bool | full,
|  | bool | arcmode,
|  | int | prec,
|  | bool | dms )

Definition at line 48 of file GeodSolve.cpp.

References GeographicLib::DMS::Encode(), GeographicLib::DMS::NONE, GeographicLib::DMS::NUMBER, and GeographicLib::Utility::str().

Referenced by main().

## ReadDistance()

real ReadDistance | ( | const std::string & | s,
|  | bool | arcmode,
|  | bool | fraction = false )

Definition at line 61 of file GeodSolve.cpp.

References GeographicLib::DMS::DecodeAngle(), GeographicLib::Utility::fract(), and GeographicLib::Utility::val().

Referenced by main().

## main()

int main | ( | int | argc,
|  | const char *const | argv[] )

Definition at line 67 of file GeodSolve.cpp.

References GeographicLib::Math::AngDiff(), GeographicLib::Math::AngNormalize(), GeographicLib::Geodesic::AREA, GeographicLib::Geodesic::AZIMUTH, GeographicLib::GeodesicLine::Azimuth(), AzimuthString(), GeographicLib::DMS::DecodeAzimuth(), GeographicLib::DMS::DecodeLatLon(), GeographicLib::Geodesic::DISTANCE, GeographicLib::Geodesic::DISTANCE_IN, DistanceStrings(), GeographicLib::Math::extra_digits(), GeographicLib::Utility::fract(), GeographicLib::Geodesic::GenDirect(), GeographicLib::Geodesic::GenDirectLine(), GeographicLib::GeodesicLine::GenDistance(), GeographicLib::GeodesicLine::GenPosition(), GeographicLib::Geodesic::GEODESICSCALE, GeographicLib::Math::hd, GeographicLib::Geodesic::InverseLine(), GeographicLib::Geodesic::LATITUDE, LatLonString(), GeographicLib::Geodesic::Line(), GeographicLib::Geodesic::LONG_UNROLL, GeographicLib::Geodesic::LONGITUDE, GeographicLib::Geodesic::NONE, ReadDistance(), GeographicLib::Geodesic::REDUCEDLENGTH, GeographicLib::Utility::set_digits(), GeographicLib::Utility::str(), usage(), GeographicLib::Utility::val(), GeographicLib::Constants::WGS84_a(), and GeographicLib::Constants::WGS84_f().