46void Position::LatCheck(
double lat) {
47 if (
lat > 90 ||
lat < -90){
48 std::stringstream msg;
49 msg <<
"The provided latitude (" <<
lat
50 <<
") is outside the acceptable range. "
56void Position::LonCheck(
double lon) {
57 if (
lon > 180 ||
lon < -180){
58 std::stringstream msg;
59 msg <<
"The provided longitude (" <<
lon
60 <<
") is outside the acceptable range."
62 throw ValueError(msg.str());
106double Position::SetPrecision(
double value,
double precision)
const {
113std::string Position::ToStringHelperLat(
int mode,
double lat)
const {
119 if (((
int)
lat_int) / 10 == 0) {
136std::string Position::ToStringHelperLon(
int mode,
double lon)
const {
141 if (((
int)
lon_int) / 100 == 0) {
142 if (((
int)
lon_int) / 10 == 0) {
161std::string Position::ToStringHelper(
double value)
const {
162 std::stringstream
temp;
171std::string Position::ToStringHelperDM(
double value)
const {
172 std::stringstream
temp;
173 value =
fabs(value) * 60;
174 if (((
int)
fabs(value)) / 10 == 0) {
177 temp << std::setprecision(5) << value;
182std::string Position::ToStringHelperDMS(
double value)
const {
183 std::stringstream
temp;
185 value =
fabs(value) * 60;
192 if ((
int)
fabs(value) / 10 == 0) {
195 temp << std::setprecision(1) << std::fixed << value;
For values that are too big, too small, etc.
taken directly from OsiSolverInterface.cpp on 2/17/14 from https://projects.coin-or....
T OptionalQuery(InfileTree *tree, std::string query, T default_val)
a query method for optional parameters
#define CYCLUS_DECIMAL_SECOND_MULTIPLIER