# # create a new device, deviceis is the primary key
# r = requests.post('http://127.0.0.1:8000/app3/gpsdatas/',auth=('username','password'), data = {'deviceid':'max_testing', 'taskid':'sar_put2','gpsdata':'{'gps':['stamp':004,'lat':-81,'log':37]}'})
#
# # update record based on primary key. For example: './max_testing/' is added as pk
# r = requests.patch('http://127.0.0.1:8000/app3/gpsdatas/max_testing/', auth=('username','password'), data = {'deviceid':'max_testing', 'taskid':'sar_put2','gpsdata':'{'gps':['stamp':004,'lat':-80,'log':38]}'})
waypoint_json.append({'stamp':waypoint_dict[pt][0],'timestamp':-1,'lat':waypoint_dict[pt][1],'long':waypoint_dict[pt][2]})# leaving out altitude for now!
# # create a new device, deviceis is the primary key
# r = requests.post('http://127.0.0.1:8000/app3/gpsdatas/',auth=('username','password'), data = {'deviceid':'max_testing', 'taskid':'sar_put2','gpsdata':'{'gps':['stamp':004,'lat':-81,'log':37]}'})
#
# # update record based on primary key. For example: './max_testing/' is added as pk
# r = requests.patch('http://127.0.0.1:8000/app3/gpsdatas/max_testing/', auth=('username','password'), data = {'deviceid':'max_testing', 'taskid':'sar_put2','gpsdata':'{'gps':['stamp':004,'lat':-80,'log':38]}'})
waypoint_json.append({'stamp':waypoint_dict[pt][0],'timestamp':-1,'lat':waypoint_dict[pt][1],'long':waypoint_dict[pt][2]})# leaving out altitude for now!
# The struct represents a target point in the waypoint mission. For a waypoint
#constant for flightpathMode
uint8 DJIWaypointV2FlightPathModeGoToPointAlongACurve = 0 #In the mission, the aircraft will go to the waypoint along a curve and fly past the waypoint.
uint8 DJIWaypointV2FlightPathModeGoToPointAlongACurveAndStop = 1 #In the mission, the aircraft will go to the waypoint along a curve and stop at the waypoint.
uint8 DJIWaypointV2FlightPathModeGoToPointInAStraightLineAndStop = 2 #In the mission, the aircraft will go to the waypoint along a straight line and stop at the waypoint.
uint8 DJIWaypointV2FlightPathModeCoordinateTurn = 3 #In the mission, the aircraft will fly from the previous waypoint to the next waypoint along a smooth curve without stopping at this waypoint.
#the next in a curved motion, adhering to the ``DJIWaypointV2_dampingDistance``, which is
#set in ``DJIWaypointV2``.
uint8 DJIWaypointV2FlightPathModeGoToFirstPointAlongAStraightLine = 4 # In the mission, the aircraft will go to the first waypoint along a straight line.
# This is only valid for the first waypoint.
uint8 DJIWaypointV2FlightPathModeStraightOut = 5 # Straight exit the Last waypoint, Only valid for last waypoint.
uint8 DJIWaypointV2HeadingModeAuto = 0 # Aircraft's heading will always be in the direction of flight.
uint8 DJIWaypointV2HeadingFixed = 1 # Aircraft's heading will be set to the heading when reaching the first waypoint.
# Before reaching the first waypoint, the aircraft's heading can be controlled by
# the remote controller. When the aircraft reaches the first waypoint, its
# heading will be fixed.
uint8 DJIWaypointV2HeadingManual = 2 # The aircraft's heading in the mission can be controlled by the remote controller.
uint8 DJIWaypointV2HeadingWaypointCustom = 3 # In the mission, the aircraft's heading will change dynamically and adapt to the heading set at the next waypoint.
# See ``DJIWaypointV2_heading`` to preset the heading.
uint8 DJIWaypointV2HeadingTowardPointOfInterest = 4 # Aircraft's heading will always toward point of interest.
# using ``DJIWaypointV2_pointOfInterest`` setting point of interest coordiate and ``DJIWaypointV2_pointOfInterestAltitude``
# setting point of interset altitute.
uint8 DJIWaypointV2HeadingGimbalYawFollow = 5 # The aircraft's heading rotate simultaneously with its gimbal's yaw.