public MissionWaypointMsg(double latitude, double longitude, float altitude, float damping_distance, int target_yaw, int target_gimbal_pitch, TurnMode turn_mode, bool has_action, uint action_time_limit, MissionWaypointActionMsg waypoint_action)
 {
     _latitude            = latitude;
     _longitude           = longitude;
     _altitude            = altitude;
     _damping_distance    = damping_distance;
     _target_yaw          = target_yaw;
     _target_gimbal_pitch = target_gimbal_pitch;
     _turn_mode           = turn_mode;
     _has_action          = has_action;
     _action_time_limit   = action_time_limit;
     _waypoint_action     = waypoint_action;
 }
 public MissionWaypointMsg(JSONNode msg)
 {
     _latitude            = msg["latitude"].AsDouble;
     _longitude           = msg["longitude"].AsDouble;
     _altitude            = msg["altitude"].AsFloat;
     _damping_distance    = msg["damping_distance"].AsFloat;
     _target_yaw          = msg["target_yaw"].AsInt;
     _target_gimbal_pitch = msg["target_gimbal_pitch"].AsInt;
     _turn_mode           = (TurnMode)msg["turn_mode"].AsInt;
     _has_action          = (msg["has_action"].AsInt != 0);
     _action_time_limit   = (uint)msg["action_time_limit"].AsInt;
     _waypoint_action     = new MissionWaypointActionMsg(msg["waypoint_action"]);
 }
Exemplo n.º 3
0
 //changed lat and long to double from float, changes has-action from bool to int
 public MissionWaypointMsg(double _latitude, double _longitude, float _altitude, float _damping_distance, int _target_yaw, int _target_gimbal_pitch, TurnMode _turn_mode, int _has_action, uint _action_time_limit, MissionWaypointActionMsg _waypoint_action)
 {
     latitude            = _latitude;
     longitude           = _longitude;
     altitude            = _altitude;
     damping_distance    = _damping_distance;
     target_yaw          = _target_yaw;
     target_gimbal_pitch = _target_gimbal_pitch;
     turn_mode           = _turn_mode;
     has_action          = _has_action;
     action_time_limit   = _action_time_limit;
     waypoint_action     = _waypoint_action;
     Debug.Log("constructor accuracy: " + _latitude);
 }
Exemplo n.º 4
0
 public MissionWaypointMsg(JSONNode msg)
 {
     //changes "asDouble" to AsFloat
     latitude            = msg["latitude"].AsDouble;
     longitude           = msg["longitude"].AsDouble;
     altitude            = msg["altitude"].AsFloat;
     damping_distance    = msg["damping_distance"].AsFloat;
     target_yaw          = msg["target_yaw"].AsInt;
     target_gimbal_pitch = msg["target_gimbal_pitch"].AsInt;
     turn_mode           = (TurnMode)msg["turn_mode"].AsInt;
     //_has_action = (msg["has_action"].AsInt != 0);
     has_action        = (msg["has_action"].AsInt);
     action_time_limit = (uint)msg["action_time_limit"].AsInt;
     waypoint_action   = new MissionWaypointActionMsg(msg["waypoint_action"]);
 }