Post by b308 on Jun 3, 2022 10:21:42 GMT -8
There is a utility for converting profiles.xml to and from TOML files, which are far easier to edit. Get it here: github.com/Loo0D/atn-xml-convert
If you want to do it the hard way, this is a brief guide on manually editing profiles.xml file as exported by X-Sight 4K Pro (firmware 3.1.12.510)
Why you would/wouldn't want to do that is out of scope for this thread please. My intent is for this post to be discoverable by people who want to do it.
1. Create some empty profiles in the scope, up to a maximum of 6 (more would be better but ATN won't let you )
2. Export the profiles to MicroSD
3. The exported data is in profiles.xml file in the root of the SD card.
4. Open the XML file in a text editor, and change the values as needed. If you "prettify" it for editing, make sure to remove any newlines and indentations (tabs or spaces) before saving it, the scope will want it all on one line with no extra whitespace anywhere
- NOTE: the scope will expect floating point values to 4 decimal places, i.e. sight height 82.0000 instead of "82". Also mind the units, in the XML file they wont always match your regional settings, i.e. muzzle velocity in m/s even if scope is set to FPS, scope height is in mm not inches, etc.
5. The final file MUST be three lines long as follows:
- The first "comment" line is a CRC 32 checksum of the XML payload, it MUST be followed by a Windows-style newline (CR/LF or 0xD 0xA)
- The next line is XML data (all on one line), followed by a Unix newline (LF or 0xA)
6. You can copy your XML payload here (including the Unix newline at the end!) into there to get your CRC32 for the first line: emn178.github.io/online-tools/crc32.html
7. Insert the CRC32 checkum for your final XML data (after all your changes) into the comment in the first line. ATN export has the checksum in uppercase, so do that with yours as well to be safe
8. Save the file.
9. Open the file with a "hex editor" and amend as necessary to ensure a CRLF (0D 0A) after the checksum comment line, and a Unix linefeed (0A) after XML line, so that the third line of the file is empty
10. Safely eject the microSD card, insert into scope and import your settings!
An example of profiles.xml, this is for Google's benefit so people can find this post by Googling XML field names:
<!--0B3B1506-->
<?xml version="1.0" encoding="utf-8"?>
<profiles_count>
<value_node_0>6</value_node_0>
</profiles_count>
<active_profile>
<value_node_0>1</value_node_0>
</active_profile>
<storage_drag_function>
<value_node_0>1</value_node_0>
<value_node_1>1</value_node_1>
<value_node_2>1</value_node_2>
<value_node_3>1</value_node_3>
<value_node_4>1</value_node_4>
<value_node_5>1</value_node_5>
</storage_drag_function>
<storage_ballistic_coeff>
<value_node_0>0.0460</value_node_0>
<value_node_1>0.0920</value_node_1>
<value_node_2>0.1050</value_node_2>
<value_node_3>0.0250</value_node_3>
<value_node_4>0.0710</value_node_4>
<value_node_5>0.0380</value_node_5>
</storage_ballistic_coeff>
<storage_bullet_weight>
<value_node_0>33.9500</value_node_0>
<value_node_1>33.4900</value_node_1>
<value_node_2>32.0000</value_node_2>
<value_node_3>26.0000</value_node_3>
<value_node_4>26.3000</value_node_4>
<value_node_5>25.4000</value_node_5>
</storage_bullet_weight>
<storage_init_velocity>
<value_node_0>300.2000</value_node_0>
<value_node_1>293.5000</value_node_1>
<value_node_2>299.6184</value_node_2>
<value_node_3>327.6600</value_node_3>
<value_node_4>319.7352</value_node_4>
<value_node_5>328.5744</value_node_5>
</storage_init_velocity>
<storage_sight_height>
<value_node_0>82.5500</value_node_0>
<value_node_1>82.5500</value_node_1>
<value_node_2>82.5500</value_node_2>
<value_node_3>82.5500</value_node_3>
<value_node_4>82.5500</value_node_4>
<value_node_5>82.5500</value_node_5>
</storage_sight_height>
<storage_zeroing_distance>
<value_node_0>20.5740</value_node_0>
<value_node_1>20.5740</value_node_1>
<value_node_2>20.5740</value_node_2>
<value_node_3>20.5740</value_node_3>
<value_node_4>20.5740</value_node_4>
<value_node_5>20.5914</value_node_5>
</storage_zeroing_distance>
<storage_reticle_offset_x>
<value_node_0>-54</value_node_0>
<value_node_1>-41</value_node_1>
<value_node_2>-23</value_node_2>
<value_node_3>-43</value_node_3>
<value_node_4>-42</value_node_4>
<value_node_5>-56</value_node_5>
</storage_reticle_offset_x>
<storage_reticle_offset_y>
<value_node_0>154</value_node_0>
<value_node_1>125</value_node_1>
<value_node_2>121</value_node_2>
<value_node_3>154</value_node_3>
<value_node_4>149</value_node_4>
<value_node_5>151</value_node_5>
</storage_reticle_offset_y>
<storage_msp_acc_border_value>
<value_node_0>5000</value_node_0>
<value_node_1>5000</value_node_1>
<value_node_2>5000</value_node_2>
<value_node_3>5000</value_node_3>
<value_node_4>5000</value_node_4>
<value_node_5>5000</value_node_5>
</storage_msp_acc_border_value>
<storage_msp_acc_border_up_cross_counter_min>
<value_node_0>4</value_node_0>
<value_node_1>4</value_node_1>
<value_node_2>4</value_node_2>
<value_node_3>4</value_node_3>
<value_node_4>4</value_node_4>
<value_node_5>4</value_node_5>
</storage_msp_acc_border_up_cross_counter_min>
<storage_msp_acc_border_up_cross_counter_max>
<value_node_0>30</value_node_0>
<value_node_1>30</value_node_1>
<value_node_2>30</value_node_2>
<value_node_3>30</value_node_3>
<value_node_4>30</value_node_4>
<value_node_5>30</value_node_5>
</storage_msp_acc_border_up_cross_counter_max>
<storage_msp_acc_border_down_cross_counter_min>
<value_node_0>1</value_node_0>
<value_node_1>1</value_node_1>
<value_node_2>1</value_node_2>
<value_node_3>1</value_node_3>
<value_node_4>1</value_node_4>
<value_node_5>1</value_node_5>
</storage_msp_acc_border_down_cross_counter_min>
<storage_profile_name>
<value_node_0>JSB King Heavy 34 gr Pwr 3</value_node_0>
<value_node_1>JSB Knockout Slug Pwr 3</value_node_1>
<value_node_2>HandN Slug .249 32gr Pwr 3</value_node_2>
<value_node_3>JSB Polymag</value_node_3>
<value_node_4>FX Hybrid Slug</value_node_4>
<value_node_5>FX Pellets</value_node_5>
</storage_profile_name>
If you want to do it the hard way, this is a brief guide on manually editing profiles.xml file as exported by X-Sight 4K Pro (firmware 3.1.12.510)
Why you would/wouldn't want to do that is out of scope for this thread please. My intent is for this post to be discoverable by people who want to do it.
1. Create some empty profiles in the scope, up to a maximum of 6 (more would be better but ATN won't let you )
2. Export the profiles to MicroSD
3. The exported data is in profiles.xml file in the root of the SD card.
4. Open the XML file in a text editor, and change the values as needed. If you "prettify" it for editing, make sure to remove any newlines and indentations (tabs or spaces) before saving it, the scope will want it all on one line with no extra whitespace anywhere
- NOTE: the scope will expect floating point values to 4 decimal places, i.e. sight height 82.0000 instead of "82". Also mind the units, in the XML file they wont always match your regional settings, i.e. muzzle velocity in m/s even if scope is set to FPS, scope height is in mm not inches, etc.
5. The final file MUST be three lines long as follows:
- The first "comment" line is a CRC 32 checksum of the XML payload, it MUST be followed by a Windows-style newline (CR/LF or 0xD 0xA)
- The next line is XML data (all on one line), followed by a Unix newline (LF or 0xA)
6. You can copy your XML payload here (including the Unix newline at the end!) into there to get your CRC32 for the first line: emn178.github.io/online-tools/crc32.html
7. Insert the CRC32 checkum for your final XML data (after all your changes) into the comment in the first line. ATN export has the checksum in uppercase, so do that with yours as well to be safe
8. Save the file.
9. Open the file with a "hex editor" and amend as necessary to ensure a CRLF (0D 0A) after the checksum comment line, and a Unix linefeed (0A) after XML line, so that the third line of the file is empty
10. Safely eject the microSD card, insert into scope and import your settings!
An example of profiles.xml, this is for Google's benefit so people can find this post by Googling XML field names:
<!--0B3B1506-->
<?xml version="1.0" encoding="utf-8"?>
<profiles_count>
<value_node_0>6</value_node_0>
</profiles_count>
<active_profile>
<value_node_0>1</value_node_0>
</active_profile>
<storage_drag_function>
<value_node_0>1</value_node_0>
<value_node_1>1</value_node_1>
<value_node_2>1</value_node_2>
<value_node_3>1</value_node_3>
<value_node_4>1</value_node_4>
<value_node_5>1</value_node_5>
</storage_drag_function>
<storage_ballistic_coeff>
<value_node_0>0.0460</value_node_0>
<value_node_1>0.0920</value_node_1>
<value_node_2>0.1050</value_node_2>
<value_node_3>0.0250</value_node_3>
<value_node_4>0.0710</value_node_4>
<value_node_5>0.0380</value_node_5>
</storage_ballistic_coeff>
<storage_bullet_weight>
<value_node_0>33.9500</value_node_0>
<value_node_1>33.4900</value_node_1>
<value_node_2>32.0000</value_node_2>
<value_node_3>26.0000</value_node_3>
<value_node_4>26.3000</value_node_4>
<value_node_5>25.4000</value_node_5>
</storage_bullet_weight>
<storage_init_velocity>
<value_node_0>300.2000</value_node_0>
<value_node_1>293.5000</value_node_1>
<value_node_2>299.6184</value_node_2>
<value_node_3>327.6600</value_node_3>
<value_node_4>319.7352</value_node_4>
<value_node_5>328.5744</value_node_5>
</storage_init_velocity>
<storage_sight_height>
<value_node_0>82.5500</value_node_0>
<value_node_1>82.5500</value_node_1>
<value_node_2>82.5500</value_node_2>
<value_node_3>82.5500</value_node_3>
<value_node_4>82.5500</value_node_4>
<value_node_5>82.5500</value_node_5>
</storage_sight_height>
<storage_zeroing_distance>
<value_node_0>20.5740</value_node_0>
<value_node_1>20.5740</value_node_1>
<value_node_2>20.5740</value_node_2>
<value_node_3>20.5740</value_node_3>
<value_node_4>20.5740</value_node_4>
<value_node_5>20.5914</value_node_5>
</storage_zeroing_distance>
<storage_reticle_offset_x>
<value_node_0>-54</value_node_0>
<value_node_1>-41</value_node_1>
<value_node_2>-23</value_node_2>
<value_node_3>-43</value_node_3>
<value_node_4>-42</value_node_4>
<value_node_5>-56</value_node_5>
</storage_reticle_offset_x>
<storage_reticle_offset_y>
<value_node_0>154</value_node_0>
<value_node_1>125</value_node_1>
<value_node_2>121</value_node_2>
<value_node_3>154</value_node_3>
<value_node_4>149</value_node_4>
<value_node_5>151</value_node_5>
</storage_reticle_offset_y>
<storage_msp_acc_border_value>
<value_node_0>5000</value_node_0>
<value_node_1>5000</value_node_1>
<value_node_2>5000</value_node_2>
<value_node_3>5000</value_node_3>
<value_node_4>5000</value_node_4>
<value_node_5>5000</value_node_5>
</storage_msp_acc_border_value>
<storage_msp_acc_border_up_cross_counter_min>
<value_node_0>4</value_node_0>
<value_node_1>4</value_node_1>
<value_node_2>4</value_node_2>
<value_node_3>4</value_node_3>
<value_node_4>4</value_node_4>
<value_node_5>4</value_node_5>
</storage_msp_acc_border_up_cross_counter_min>
<storage_msp_acc_border_up_cross_counter_max>
<value_node_0>30</value_node_0>
<value_node_1>30</value_node_1>
<value_node_2>30</value_node_2>
<value_node_3>30</value_node_3>
<value_node_4>30</value_node_4>
<value_node_5>30</value_node_5>
</storage_msp_acc_border_up_cross_counter_max>
<storage_msp_acc_border_down_cross_counter_min>
<value_node_0>1</value_node_0>
<value_node_1>1</value_node_1>
<value_node_2>1</value_node_2>
<value_node_3>1</value_node_3>
<value_node_4>1</value_node_4>
<value_node_5>1</value_node_5>
</storage_msp_acc_border_down_cross_counter_min>
<storage_profile_name>
<value_node_0>JSB King Heavy 34 gr Pwr 3</value_node_0>
<value_node_1>JSB Knockout Slug Pwr 3</value_node_1>
<value_node_2>HandN Slug .249 32gr Pwr 3</value_node_2>
<value_node_3>JSB Polymag</value_node_3>
<value_node_4>FX Hybrid Slug</value_node_4>
<value_node_5>FX Pellets</value_node_5>
</storage_profile_name>