craig@jetson:~/Documents/Development$ theta --set-property=0xD801 --val="23.532000,23.532000+999.00m@20210904T170429.0+0900,WGS84"
Camera: RICOH THETA Z1
'UNKNOWN' is set to: "(null)"
Changing property value to 23.532000,23.532000+999.00m@20210904T170429.0+0900,WGS84 [(null)] succeeded.
craig@jetson:~/Documents/Development$
craig@jetson:~/Documents/Development$ theta --set-property=0xD801 --val="23.532000,23.532000+999.00m@20210904T170429.0Z,WGS84"
Camera: RICOH THETA Z1
'UNKNOWN' is set to: "23.532000,23.532000+999.00m@20210904T080429,WGS84"
Changing property value to 23.532000,23.532000+999.00m@20210904T170429.0Z,WGS84 [(null)] succeeded.
JSON_GPS_SET_REQ=$(< <(cat <<EOF
{
"name": "camera.setOptions",
"parameters": {
"sessionId": "SID_${SID}",
"options": {
"gpsInfo": {
"lat": ${GPS_LAT},
"lng": ${GPS_LON},
"_altitude": ${GPS_ALT},
"_dateTimeZone":"${GPS_DATE} ${GPS_TIME}+00:00",
"_datum":"WGS84"
}
}
}
}
EOF
))
# Set the gps values on the camera via wifi
echo ${JSON_GPS_SET_REQ}
curl -s -X POST -d "${JSON_GPS_SET_REQ}" http://${CAMIP}:${PORT}/osc/commands/execute >> /dev/null
else
# Set the gps via usb
ptpcam --set-property=0xD801 --val="${GPS_LAT},${GPS_LON},${GPS_ALT}m@${GPS_DATE}${GPS_TIME}Z,WGS84"
fi
else
echo "GPS enabled but now location found."
fi
fi
Full code for the shell script, including use of input from a GPS unit connected to a Raspberry Pi
@jcasman and I would like to try and test this more first.
The project below used to work with an older RICOH THETA model. The format of the ptpcam command looks the same as the format you used on the Z1. Can you take a look at line 819 in the script below and try it with the Z1?
We can also try and compare the USB API behavior with this:
I’m unable to use this with either the Z1 or the V. I think I have the format of value of the device property incorrect.
Camera information
==================
Model: RICOH THETA Z1
manufacturer: Ricoh Company, Ltd.
serial number: '10010104'
device version: 2.00.1
extension ID: 0x00000006
extension description: (null)
extension version: 0x006e
Initiating captue...
Object added 0x00000581
Capture completed successfully!
Camera: RICOH THETA Z1
'UNKNOWN' is set to: "(null)"
Changing property value to 45.000000,136.000000,1234.00m@20210904T175300.1Z,WGS84 [(null)] FAILED!!!
PTP: Invalid Device Prop Value
craig@craig-desktop:~/Development/ricoh/usb/gps$ bash gps_test.sh
Camera information
==================
Model: RICOH THETA Z1
manufacturer: Ricoh Company, Ltd.
serial number: '10010104'
device version: 2.00.1
extension ID: 0x00000006
extension description: (null)
extension version: 0x006e
Initiating captue...
Object added 0x00000582
Capture completed successfully!
Camera: RICOH THETA Z1
'UNKNOWN' is set to: "(null)"
Changing property value to 45.000000,136.000000,+1234.00m@20210904T175300Z,WGS84 [(null)] FAILED!!!
PTP: Invalid Device Prop Value
Test Setup
Set GPS information with mobile app
use USB API to get GPS information from image and recheck format
Acquire GPS information using USB API after setting with WebAPI
$ ptpcam_mod --show-property=0xD801
Camera: RICOH THETA Z1
'UNKNOWN' is set to: "23.532000,23.532000+999.00m@20140517T170429,WGS84"
craig@jetson:~/Documents/tools/power_on$
Test of setting 0xd801 with result from --show-property
$ ptpcam_mod --set-property=0xD801 --val="23.532000,23.532000+999.00m@20140517T170429,WGS84"
Camera: RICOH THETA Z1
'UNKNOWN' is set to: "23.532000,23.532000+999.00m@20140517T170429,WGS84"
Changing property value to 23.532000,23.532000+999.00m@20140517T170429,WGS84 [(null)] FAILED!!!
PTP: Invalid Device Prop Value
test with no quotes
$ ptpcam_mod --set-property=0xD801 --val=23.532000,23.532000+999.00m@20140517T170429,WGS84
Camera: RICOH THETA Z1
'UNKNOWN' is set to: "23.532000,23.532000+999.00m@20140517T170429,WGS84"
Changing property value to 23.532000,23.532000+999.00m@20140517T170429,WGS84 [(null)] FAILED!!!
test with gphoto2
failed
The property 'PTP Property 0xd801' / 0xd801 was not set (0x201b: PTP Invalid Device Prop Format).
Test with SC2
SC2 with firmware 1.64
craig@jetson:~/Documents/tools/power_on$ ptpcam --info
Camera information
==================
Model: RICOH THETA SC2
manufacturer: Ricoh Company, Ltd.
serial number: '20001005'
device version: 01.64
extension ID: 0x00000006
extension description: (null)
extension version: 0x006e
set GPS value works with SC2
$ ptpcam_mod --set-property=0xD801 --val="23.532000,23.532000+999.00m@20140517T170429,WGS84"
Camera: RICOH THETA SC2
'UNKNOWN' is set to: "23.532000,23.532000+999.00m@20140517T170429.0-0700,WGS84"
Changing property value to 23.532000,23.532000+999.00m@20140517T170429,WGS84 [(null)] succeeded.
craig@jetson:~/Documents/tools/power_on$
SC2 result success with same string sent to Z1 and failed.
get GPS value works with SC2
$ ptpcam_mod --show-property=0xD801
Camera: RICOH THETA SC2
'UNKNOWN' is set to: "23.532000,23.532000+999.00m@20140517T170429.0-0700,WGS84"
craig@jetson:~/Documents/tools/power_on$
$ ptpcam_mod --set-property=0xD801 --val="23.532000,23.532000+999.00m@20140517T170429,WGS84"
Camera: RICOH THETA V
'UNKNOWN' is set to: "(null)"
Changing property value to 23.532000,23.532000+999.00m@20140517T170429,WGS84 [(null)] FAILED!!!
PTP: Invalid Device Prop Value
Would like to start by saying thanks to the fantastic community! I am just starting out and have been learning a lot from the posts along with the great videos the community is producing. I was wondering if there has been any progress on this or an update?
I am using the USB API and was hopping to avoid the WebAPI as the USB seems to be a bit more strait forward for me and have not tried the WebAPI yet, but will give it a go.
My initial thought is to use the USB API in hopes to reduce power consumption with the RPi Zero W, GPS module and the Z1 as I am running off a an external battery. I have not tried the WebAPI, but will look into it.
I was thinking maybe splitting the load between the USB API and Bluetooth API assuming this can be done. The Bluetooth API can possible sync the GPS data. Just looking at keeping the power consumption low.