Skip to content

Commit

Permalink
Add in roll pitch yaw command line arguments
Browse files Browse the repository at this point in the history
  • Loading branch information
mchadwick-iqt committed Feb 9, 2023
1 parent 247ae28 commit c1a8d7a
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
9 changes: 9 additions & 0 deletions axis-ptz/camera.py
Original file line number Diff line number Diff line change
Expand Up @@ -758,6 +758,9 @@ def main():
global camera_altitude
global camera_latitude
global camera_longitude
global camera_roll
global camera_pitch
global camera_yaw
global camera_lead
global cameraConfig
global flight_topic
Expand All @@ -767,6 +770,9 @@ def main():
parser = argparse.ArgumentParser(description="An MQTT based camera controller")
parser.add_argument("--lat", type=float, help="Latitude of camera")
parser.add_argument("--lon", type=float, help="Longitude of camera")
parser.add_argument("--roll", type=float, help="Roll angle of camera", default=0.0)
parser.add_argument("--pitch", type=float, help="Pitch angle of camera", default=0.0)
parser.add_argument("--yaw", type=float, help="Yaw angle of camera", default=0.0)
parser.add_argument(
"--alt", type=float, help="altitude of camera in METERS!", default=0
)
Expand Down Expand Up @@ -876,6 +882,9 @@ def main():
camera_longitude = args.lon
camera_latitude = args.lat
camera_altitude = args.alt # Altitude is in METERS
camera_roll = args.roll
camera_pitch = args.pitch
camera_yaw = args.yaw # Altitude is in METERS
camera_lead = args.camera_lead
# cameraConfig = vapix_config.CameraConfiguration(args.axis_ip, args.axis_username, args.axis_password)

Expand Down
2 changes: 1 addition & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ services:

axis-ptz:
image: iqtlabs/skyscan-axis-ptz
command: "./camera.py -m mqtt -t skyscan/flight/json -u ${AXIS_USERNAME} -p ${AXIS_PASSWORD} -a ${AXIS_IP} -z ${CAMERA_ZOOM} -s ${CAMERA_MOVE_SPEED} -d ${CAMERA_DELAY} --lat ${LAT} --lon ${LONG} --alt ${ALT}"
command: "./camera.py -m mqtt -t skyscan/flight/json -u ${AXIS_USERNAME} -p ${AXIS_PASSWORD} -a ${AXIS_IP} -z ${CAMERA_ZOOM} -s ${CAMERA_MOVE_SPEED} -d ${CAMERA_DELAY} --lat ${LAT} --lon ${LONG} --alt ${ALT} --roll ${ROLL} --pitch ${PITCH} --yaw ${YAW}"
volumes:
- /flash/raw:/app/capture
depends_on:
Expand Down

0 comments on commit c1a8d7a

Please sign in to comment.