void DigitEntry::SetLatitude(Angle value, CoordinateFormat format) { // Latitude in floating point degrees value = value.AsDelta(); const auto degrees = fabs(value.Degrees()); // Check the first three columns assert(columns[0].type == Column::Type::NORTH_SOUTH); assert(columns[1].type == Column::Type::DIGIT); assert(columns[2].type == Column::Type::DIGIT); columns[0].value = value.IsNegative(); // Set up and check the remaining digits SetDigits(degrees, format, true); Invalidate(); }
void DigitEntry::SetLongitude(Angle value, CoordinateFormat format) { // Longitude in floating point degrees value = value.AsDelta(); const fixed degrees = fabs(value.Degrees()); // Check the first three columns here assert(columns[0].type == Column::Type::EAST_WEST); assert(columns[1].type == Column::Type::DIGIT19); assert(columns[2].type == Column::Type::DIGIT); columns[0].value = negative(value.Native()); // Set up and check the remaining digits SetDigits(degrees, format, false); Invalidate(); }