25 #include "TCDataFactory.h"
27 const unit TCDataFactory::known_units[NUMUNITS] = {
28 {
"feet",
"ft", LENGTH, 0.3048},
29 {
"meters",
"m", LENGTH, 1.0},
30 {
"knots",
"kt", VELOCITY, 1.0},
31 {
"knots^2",
"kt^2", BOGUS, 1.0},
35 int TCDataFactory::findunit(
const char *
unit) {
36 for (
int a = 0; a < NUMUNITS; a++) {
37 if (!strcmp(
unit, known_units[a].name) ||
38 !strcmp(
unit, known_units[a].abbrv))