00001
00002
00003
00004
00005
00006
00007
00008 #include <tk_mkinterface/MKInterfaceOptions.hpp>
00009 #include <telekyb_defines/physic_defines.hpp>
00010
00011 #define DEFAULT_ZEROSTICKVALUE 110
00012
00013 namespace TELEKYB_NAMESPACE {
00014
00015 MKInterfaceOptions::MKInterfaceOptions()
00016 : OptionContainer("MKInterface")
00017 {
00018 #ifdef __APPLE__
00019 tSerialDeviceDirectory = addOption<std::string>("tSerialDeviceDirectory",
00020 "System Directory of Serial Devices", "/dev", false, true);
00021 tSerialDeviceNameRegex = addOption<std::string>("tSerialDeviceNameRegex",
00022 "Regex for Device Name", "tty\\.usbserial-.*", false, true);
00023 #else
00024 tSerialDeviceDirectory = addOption<std::string>("tSerialDeviceDirectory",
00025 "System Directory of Serial Devices", "/dev/serial/by-id", false, true);
00026 tSerialDeviceNameRegex = addOption<std::string>("tSerialDeviceNameRegex",
00027 "Regex for Device Name", "usb-FTDI_FT232R_USB_UART_.*-if00-port0", false, true);
00028 #endif
00029
00030
00031 tUavId = addOption<int>("tUavId",
00032 "ID of the Robot to Connect to", -1, true, true);
00033 tUavFirmware = addOption<int>("tUavFirmware",
00034 "Required Firmware of Robot", 1074, false, true);
00035
00036 tUavMass = addOption<double>("tUavMass",
00037 "Mass of the Uav", 0.82, false, true);
00038
00039 tGravity = addBoundsOption<double>("tGravity",
00040 "Gravity Value for MK Interface", GRAVITY, 9.79, 9.83, false, true);
00041
00042 tZeroStickValue = addBoundsOption<int>("tZeroStickValue",
00043 "ZeroStickValue for raw Commands Calculation", DEFAULT_ZEROSTICKVALUE, 50, 150, false, true);
00044
00045 tInitialDriftEstim = addOption<bool>("tInitialDriftEstim",
00046 "Do Drift Estimation before at Start-Up", true, false, true);
00047
00048
00049 tUavOffsetRawAccX = addBoundsOption<int>("tUavOffsetRawAccX",
00050 "Acceleration Offset for X, from Calibrator", 507, 495, 520, false, true);
00051 tUavOffsetRawAccY = addBoundsOption<int>("tUavOffsetRawAccY",
00052 "Acceleration Offset for Y, from Calibrator", 507, 495, 520, false, true);
00053
00054 }
00055
00056
00057 }