How is this array of floats encoded? - arrays

I am trying to decode an array of data from a piece of legacy equipment in to a more useful format.
I have the following base64 encoded string:
iWGLvgUjF73/tW0+EAZDvf+cYj6pPw+9YLFjPqYCnbzgvm4+BEYVvBvOfD4QtBi8zdSCPlI7lrzg
q4I+HYb1vMupfT5sbxm9iYxyPh3JGL3IIGs+onj6vBnhaT6yQa28UrNuPi01Xrx22nY+PZMvvMi2
fj5kJlu8/l+BPrdVo7wT64A+BjjfvL1SfD545QK9i191PiZXBL0Ts28+s/fnvKnobT4wb7K8zOpw
PlHyg7xGMXY+KsVQvHnXfD7EdF68z++APqVHlrxrT4E+kBvOvD21fj5wYf+8ItJ3PoZrCL1hBXE+
/VL8vF5MbT5hJcm8TXNuPi1FjbyPRHQ+asVFvDCTfD6mtT+8GrKBPgghibxLyII+z13NvKfagD7g
hAi900l5PttTGL356G8+8SMPvQxIaj5esd+8J/NqPugjkbzj/HE+pr0svGOmfD5K6Bi8pPqCPnOY
e7yIpYQ+tivYvMI7gj7xKBi9ipJ5Pu4oLr1MuW0+Y38jvdhgZj5ccPq8hdpmPp8UmLzUJG8+IOcg
vCzYez5yYwq8LFKDPpmAgLxw/IQ+psvqvCPagT6W0Sa9quh2PuOXPL0nbWk+CUksvdTGYT77Sfq8
jIdjPkeyi7wg320+Nyj8uyhIfD48tOq72vGDPriIhbzoN4U+VQf9vMRNgT5UezO9WAd0PtUvR73p
vWU+rkwxvUBhXj7rJvi8gxlhPqXPgrxUuGw+G4bYu6sIfD6aL+C74tqDPkVXjLzVxYQ+LHUFvVVC
gD61njq9uz5xPsXTS70O2mI+MPMxvdDVWz5Acva8jiRfPos3fbyHRms+q63Ruy6nej75hOm7V/iC
Pi0yj7xewYM+BqsGvXt/fj7wSzq9dG1vPt35Sr2WamE+a8MxvWd9Wj68qfi8WmddPrMPhbxntmg+
pGTvu7Aidz6Fufm7gvqAPsYMi7w/6oE+tUL+vL7bez6cOC+92BhuPhN/P73vAmE+r3ApvUxvWj4P
q/G8p9VcPo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4
PpxWHr3btW8+D3wnvSq+Zj6NLhm9jV1hPoaf77zwEGI+9MWavMR6aT4lkCy8F3N1PsR/CLzWd4A+
kHVrvCtGgz5v5tq8
When adding trailing padding and decoding this from base64, it produces an unknown binary format.
What I know so far based on limited inspection of the application:
It is definitely base64.
This array describes a series of floating point data (with values between 19 and 50) that consists of 201 points.
The application that created this was likely written in .NET.
How is this data encoded, and can you provide psuedo-code to decode it?
Update #1:
This data describes a return loss measurement waveform from an old network analyser.
The expected values above are based on what the instrument displays, and it is possible that they are calculated from real and imaginary components.
Update #2:
I've found there was also a CSV version of the data for this series. Expected values are:
28.6740250379346, 26.031723427971, 26.6849726930916, 27.5095233036572, 27.9755283611409, 28.0419902829292, 27.9918713318024, 28.0331481409078, 28.2620361924923, 29.1899991143532, 30.4746778667205, 31.9841888600965, 32.7562027026775, 32.2032446202011, 31.0251062040461, 30.1158617686259, 29.5968352710132, 29.8991302542384, 30.7711739051407, 32.5985879649759, 35.465787543584, 38.4033014264434, 36.2400347268325, 33.230539516557, 30.816214031517, 29.493776099706, 28.9641221620517, 29.3271399473768, 30.5497479471498, 32.9092924040263, 36.23602780908, 36.6766990656565, 32.9072309537322, 29.8008349575816, 27.8506153462939, 26.8255601987161, 26.7773337706284, 27.6450826739213, 29.6698279365727, 32.925219461411, 34.9915552473819, 31.6841927998324, 28.219566759529, 25.990640197895, 24.8525028738483, 24.6159871249645, 25.2752655673475, 26.9870507463537, 29.9877735491643, 33.2675296198038, 31.6015986278861, 27.8240493530138, 25.2742229688217, 23.9448603205908, 23.5140204346426, 23.9914986842046, 25.5009034820686, 28.1555920133881, 31.3075467263927, 30.7066273219751, 27.2707536503799, 24.7348022011574, 23.2637028240862, 22.7794008043094, 23.1669728824416, 24.5474786226331, 26.9949958437379, 30.2488348819328, 30.6013906923573, 27.3394012893084, 24.6326441335966, 23.0411076555662, 22.4181795795548, 22.7062561945124, 23.8692711954611, 26.163804153602, 29.606819207681, 31.2543679681834, 28.1493119289191, 25.0924674969376, 23.2520785937701, 22.4092737645517, 22.5015858777069, 23.4763598655373, 25.5208843109912, 28.9618678298617, 32.6403317308031, 30.3536019856501, 26.5991532707429, 24.2773569962831, 23.1127901052235, 22.9043583677862, 23.6093457155953, 25.3499073692444, 28.4637157202952, 32.8016120624956, 32.4896370664701, 28.3239184297021, 25.5279166849078, 24.0185490655501, 23.5330605365427, 23.8948677486768, 25.2054578354006, 27.7143031565687, 31.5869657438201, 33.7333955992785, 30.3948949895062, 27.1037601765126, 25.2161101159979, 24.3558529725873, 24.3231491126384, 25.2139427454679, 27.1233066134797, 30.3453761997478, 34.4047437237606, 33.8064220094595, 29.9215033359328, 27.3307978071688, 25.8801149514006, 25.4718657467003, 25.8501031953971, 27.1888665858689, 29.5756748124031, 32.9812339884177, 35.3068159226901, 32.6414213429246, 29.5799546795568, 27.7291120251878, 26.9050286745762, 26.9075167887431, 27.7591889971496, 29.3670540494547, 31.7578198149182, 33.5065256564295, 32.6776622084245, 30.4203840091006, 28.688025867147, 27.7417192975661, 27.4916484304414, 27.9791419175041, 29.2902681126682, 31.4107407957172, 33.4602036884894, 33.9200015192937, 32.1201008630103, 30.1453133278815, 28.7841082718969, 28.136959973426, 28.109171467367, 28.8259362791248, 30.0289196496445, 31.326134345957, 32.0708833202456, 31.4950426416152, 30.1423739250155, 29.0036769811377, 28.2190253962644, 28.1086422581195, 28.4750473325836, 29.1942813484775, 29.7608412256926, 29.6876433997282, 28.689538924267, 27.2407586615062, 26.0067421520125, 25.1638342823008, 24.8250524294419, 24.9395261449731, 25.4584143514754, 25.8777584307235, 25.6465050536004, 24.5707670056442, 23.0511544464452, 21.7615681906835, 20.9761497089273, 20.7854547053249, 21.2816973223554, 22.253260423558, 23.2052378948627, 23.4706372938485, 23.2944515491774, 23.1680235174658, 23.5290621578115, 24.4333231530622, 25.8639616096787, 27.9401749621508, 30.7364242326027, 33.9420488375473, 35.6377896682262, 33.4869702934454, 30.5820901568128, 28.3404467791117, 26.8270077060156, 26.0018669972732, 25.9446717292131, 26.5828002183748, 28.0360464264943, 30.0958735279379, 31.2921110009257, 29.5253906387702, 26.6971475290807

To advance the cause,
iWGLvgUjF73/tW0+EAZDvf+cYj6pPw+9YLFjPqYCnbzgvm4+BEYVvBvOfD4QtBi8zdSCPlI7lrzgq4I+HYb1vMupfT5sbxm9iYxyPh3JGL3IIGs+onj6vBnhaT6yQa28UrNuPi01Xrx22nY+PZMvvMi2fj5kJlu8/l+BPrdVo7wT64A+BjjfvL1SfD545QK9i191PiZXBL0Ts28+s/fnvKnobT4wb7K8zOpwPlHyg7xGMXY+KsVQvHnXfD7EdF68z++APqVHlrxrT4E+kBvOvD21fj5wYf+8ItJ3PoZrCL1hBXE+/VL8vF5MbT5hJcm8TXNuPi1FjbyPRHQ+asVFvDCTfD6mtT+8GrKBPgghibxLyII+z13NvKfagD7ghAi900l5PttTGL356G8+8SMPvQxIaj5esd+8J/NqPugjkbzj/HE+pr0svGOmfD5K6Bi8pPqCPnOYe7yIpYQ+tivYvMI7gj7xKBi9ipJ5Pu4oLr1MuW0+Y38jvdhgZj5ccPq8hdpmPp8UmLzUJG8+IOcgvCzYez5yYwq8LFKDPpmAgLxw/IQ+psvqvCPagT6W0Sa9quh2PuOXPL0nbWk+CUksvdTGYT77Sfq8jIdjPkeyi7wg320+Nyj8uyhIfD48tOq72vGDPriIhbzoN4U+VQf9vMRNgT5UezO9WAd0PtUvR73pvWU+rkwxvUBhXj7rJvi8gxlhPqXPgrxUuGw+G4bYu6sIfD6aL+C74tqDPkVXjLzVxYQ+LHUFvVVCgD61njq9uz5xPsXTS70O2mI+MPMxvdDVWz5Acva8jiRfPos3fbyHRms+q63Ruy6nej75hOm7V/iCPi0yj7xewYM+BqsGvXt/fj7wSzq9dG1vPt35Sr2WamE+a8MxvWd9Wj68qfi8WmddPrMPhbxntmg+pGTvu7Aidz6Fufm7gvqAPsYMi7w/6oE+tUL+vL7bez6cOC+92BhuPhN/P73vAmE+r3ApvUxvWj4Pq/G8p9VcPoBlhb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Zj6NLhm9jV1hPoaf77zwEGI+9MWavMR6aT4lkCy8F3N1PsR/CLzWd4A+kHVrvCtGgz5v5tq8
Converts to hex dump
89618bbe 052317bd ffb56d3e 100643bd ff9c623e a93f0fbd 60b1633e a6029dbc e0be6e3e 044615bc 1bce7c3e 10b418bc cdd4823e 523b96bc e0ab823e 1d86f5bc cba97d3e 6c6f19bd 898c723e 1dc918bd c8206b3e a278fabc 19e1693e b241adbc 52b36e3e 2d355ebc 76da763e 3d932fbc c8b67e3e 64265bbc fe5f813e b755a3bc 13eb803e 0638dfbc bd527c3e 78e502bd 8b5f753e 265704bd 13b36f3e b3f7e7bc a9e86d3e 306fb2bc ccea703e 51f283bc 4631763e 2ac550bc 79d77c3e c4745ebc cfef803e a54796bc 6b4f813e 901bcebc 3db57e3e 7061ffbc 22d2773e 866b08bd 6105713e fd52fcbc 5e4c6d3e 6125c9bc 4d736e3e 2d458dbc 8f44743e 6ac545bc 30937c3e a6b53fbc 1ab2813e 082189bc 4bc8823e cf5dcdbc a7da803e e08408bd d349793e db5318bd f9e86f3e f1230fbd 0c486a3e 5eb1dfbc 27f36a3e e82391bc e3fc713e a6bd2cbc 63a67c3e 4ae818bc a4fa823e 73987bbc 88a5843e b62bd8bc c23b823e f12818bd 8a92793e ee282ebd 4cb96d3e 637f23bd d860663e 5c70fabc 85da663e 9f1498bc d4246f3e 20e720bc 2cd87b3e 72630abc 2c52833e 998080bc 70fc843e a6cbeabc 23da813e 96d126bd aae8763e e3973cbd 276d693e 09492cbd d4c6613e fb49fabc 8c87633e 47b28bbc 20df6d3e 3728fcbb 28487c3e 3cb4eabb daf1833e b88885bc e837853e 5507fdbc c44d813e 547b33bd 5807743e d52f47bd e9bd653e ae4c31bd 40615e3e eb26f8bc 8319613e a5cf82bc 54b86c3e 1b86d8bb ab087c3e 9a2fe0bb e2da833e 45578cbc d5c5843e 2c7505bd 5542803e b59e3abd bb3e713e c5d34bbd 0eda623e 30f331bd d0d55b3e 4072f6bc 8e245f3e 8b377dbc 87466b3e abadd1bb 2ea77a3e f984e9bb 57f8823e 2d328fbc 5ec1833e 06ab06bd 7b7f7e3e f04b3abd 746d6f3e ddf94abd 966a613e 6bc331bd 677d5a3e bca9f8bc 5a675d3e b30f85bc 67b6683e a464efbb b022773e 85b9f9bb 82fa803e c60c8bbc 3fea813e b542febc bedb7b3e 9c382fbd d8186e3e 137f3fbd ef02613e af7029bd 4c6f5a3e 0fabf1bc a7d55c3e 806585bc eb06673e 707100bc 777a743e 3b88f7bb beb37e3e 05ec80bc b88a803e dedae8bc d53d7a3e 201922bd 00e56d3e cc6c33bd 46af613e f46d21bd f2e85a3e e809ecbc 58495c3e fa5e88bc 2332653e c54e00bc d69c713e 81ead5bb 73057c3e ded255bc 0a8e7f3e 4beac8bc 84bd7a3e 55c811bd 0e19703e d68927bd 5f66643e 0ebc1dbd 72b85c3e 4e69f4bc 213c5c3e bfd797bc c0d3623e b7d81bbc b1996d3e ea9ad1bb 22e7773e a51d2bbc 71f37c3e 9ddda1bc c8c97a3e 7ab3f5bc 8a78723e 1ea114bd 8419683e 993614bd 4b30603e ba3ff2bc 4f025e3e 299da3bc 7169623e 6c1935bc f46b6b3e 93e8d7bb 532c753e 16d908bc d5747b3e f68281bc 07857b3e 843dcebc d9a6753e 79f503bd 97826c3e 0f360bbd 9b6f643e 74f4f3bc 4bb6603e 9e3bb0bc e40f633e 892351bc 44536a3e d6f1e8bb 0ec8733e e2b7e6bb 1a6c7b3e a3c04dbc 13ca7d3e e497afbc 0d377a3e f4a9f3bc bd49723e 71260bbd d381693e cf3905bd 7e85633e fc4ed8bc 5b90623e af3d92bc e533673e 184f2ebc 595a6f3e 4148febb b0b3773e 872324bc 1eb27c3e e7a489bc 8b647c3e 6ae1cebc 77e2763e 1d4401bd c8956e3e a61208bd f408673e 349ff2bc 1927633e ee08b7bc 64c4643e e01165bc ff356b3e 427e04bc ddec733e e437e4bb 40e07b3e 165039bc 36977f3e 05e59ebc 9ba67d3e 8d41e6bc 9a95763e 004a0abd bb6c6d3e 10130cbd e6ec653e 6f65ebbc e258633e 547ba3bc e2d6663e 363035bc 72a16f3e b5b9b4bb ecaa7a3e 1393d4bb 1da5813e 27cc68bc f0cb823e 9dbdd4bc 2eab7f3e 154c18bd d783733e 1ff22ebd a5f3653e 98f221bd 16f05c3e 5099e8bc a6255d3e 6a955cbc 4881673e ff146dba f71b793e 2b61313b f448853e f880dbbb 2000893e 769fdbbc 9644843e fa1445bd 8502713e 09926bbd 7489583e bb3243bd 9f6d4e3e 6052bbbc 7ae2593e 577de73a f83e743e b4aa293c 86c6853e 0ffb0bbb 15b4883e 331bcfbc 9d37833e 57ac30bd fc51753e b6a844bd 63d4673e 6bd62dbd 9a93613e b06804bd 6634623e f3a8b6bc 7a7f673e 3ff17abc 85e86e3e 447247bc a95b763e f16356bc d37d7c3e 97298fbc 91817f3e 3f2ec8bc bb3b7e3e 226904bd c471783e 9c561ebd dbb56f3e 0f7c27bd 2abe663e 8d2e19bd 8d5d613e 869fefbc f010623e f4c59abc c47a693e 25902cbc 1773753e c47f08bc d677803e 90756bbc 2b46833e 6fe6dabc
402 32-bits.
Or more nicely formatted and re-endian-ized.
Looks like values are encoded as IEEE 32-bit float scaled up by about 122 or some magic number - depending on which values first expected value is 28.62 and the last is 31.32 map to.
0 BE8B6189 BD172305 -0.272229 -0.036899*
1 3E6DB5FF BD430610 0.232140* -0.047613
2 3E629CFF BD0F3FA9 0.221302 -0.034973
3 3E63B160 BC9D02A6 0.222356 -0.019166
4 3E6EBEE0 BC154604 0.233150 -0.009111
5 3E7CCE1B BC18B410 0.246880 -0.009320
6 3E82D4CD BC963B52 0.255530 -0.018339
7 3E82ABE0 BCF5861D 0.255218 -0.029971
8 3E7DA9CB BD196F6C 0.247718 -0.037460
9 3E728C89 BD18C91D 0.236864 -0.037301
10 3E6B20C8 BCFA78A2 0.229617 -0.030575
...
195 3E615D8D BCEF9F86 0.220083 -0.029251
196 3E6210F0 BC9AC5F4 0.220768 -0.018893
197 3E697AC4 BC2C9025 0.228007 -0.010532
198 3E757317 BC087FC4 0.239697 -0.008331
199 3E8077D6 BC6B7590 0.250914 -0.014371*
200 3E83462B BCDAE66F 0.256395* -0.026721
... it is possible that they are calculated from real and imaginary components.
Note, with ignoring the first data value:
last complex pair magnitude / first complex pair magnitude
|-0.014371 + 0.256395 * i| / | -0.036899 + 0.232140 * i| is 1.093...
Much like 31.32/28.62 is 1.094...

Related

Vulkan swapchain creation causes crash with no debug information

I'm following vulkan-tutorial's procedure to understand vulkan, I'm now in creating swapchain. before that I've also created instance and a debug/validation layer but when I'm trying to create swapchain, the app crashes.
void createSwapChain() {
VkSurfaceFormatKHR surfaceFormat;
surfaceFormat.format=VK_FORMAT_B8G8R8A8_SRGB;
surfaceFormat.colorSpace=VK_COLOR_SPACE_SRGB_NONLINEAR_KHR;
VkPresentModeKHR presentMode=VK_PRESENT_MODE_FIFO_KHR;
int width,height;
glfwGetFramebufferSize(window, &width, &height);
VkExtent2D extent ={width,height};
uint32_t imageCount=2;//minimum cap +1
VkSurfaceCapabilitiesKHR capabilities;
vkGetPhysicalDeviceSurfaceCapabilitiesKHR(physicalDevice, surface, &capabilities);
VkSwapchainCreateInfoKHR createInfo={0};
createInfo.sType = VK_STRUCTURE_TYPE_SWAPCHAIN_CREATE_INFO_KHR;
createInfo.surface = surface;
createInfo.minImageCount = imageCount;
createInfo.imageFormat = surfaceFormat.format;
createInfo.imageColorSpace = surfaceFormat.colorSpace;
createInfo.imageExtent = extent;
createInfo.imageArrayLayers = 1;
createInfo.imageUsage = VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT;
createInfo.imageSharingMode = VK_SHARING_MODE_EXCLUSIVE;
// createInfo.queueFamilyIndexCount = 1;
// createInfo.pQueueFamilyIndices = NULL;
createInfo.preTransform = capabilities.currentTransform/*VK_SURFACE_TRANSFORM_IDENTITY_BIT_KHR*/;//swapChainSupport.capabilities.currentTransform
createInfo.compositeAlpha = VK_COMPOSITE_ALPHA_OPAQUE_BIT_KHR;
createInfo.presentMode = presentMode;
createInfo.clipped = VK_TRUE;// means obscured images have unimportant color!!
createInfo.oldSwapchain = VK_NULL_HANDLE;
if (vkCreateSwapchainKHR(device, &createInfo, NULL, &swapChain) != VK_SUCCESS)
printf("failed to create swap chain!");
}
Is there any idea? The host is eclipse with MinGW-64 -lglfw3 and -lvulkan-1 on windows 10 64-bit.
And here the graphic card information:
Available Layers:
VK_LAYER_AMD_switchable_graphics
VK_LAYER_VALVE_steam_overlay
VK_LAYER_VALVE_steam_fossilize
VK_LAYER_KHRONOS_validation
Available extensions:
VK_KHR_device_group_creation
VK_KHR_external_fence_capabilities
VK_KHR_external_memory_capabilities
VK_KHR_external_semaphore_capabilities
VK_KHR_get_physical_device_properties2
VK_KHR_get_surface_capabilities2
VK_KHR_surface
VK_KHR_win32_surface
VK_EXT_debug_report
VK_EXT_debug_utils
VK_EXT_swapchain_colorspace
Instance extension:
VK_KHR_surface
VK_KHR_win32_surface
VK_EXT_debug_utils
Availible devices:
AMD Radeon(TM) Graphics Type: 1 GeometryShader: Yes
FamilyIndex: 0 AvailibleQueueCount: 1 Surface Support: Yes Graphics | Compute | Transfer | Binding
FamilyIndex: 1 AvailibleQueueCount: 2 Surface Support: Yes | Compute | Transfer | Binding
FamilyIndex: 2 AvailibleQueueCount: 1 Surface Support: Yes | | Transfer | Binding
Availible device extensions: (The required is VK_KHR_swapchain)
VK_KHR_16bit_storage VK_KHR_8bit_storage VK_KHR_bind_memory2
VK_KHR_buffer_device_address VK_KHR_copy_commands2 VK_KHR_create_renderpass2
VK_KHR_dedicated_allocation VK_KHR_depth_stencil_resolve VK_KHR_descriptor_update_template
VK_KHR_device_group VK_KHR_draw_indirect_count VK_KHR_driver_properties
VK_KHR_dynamic_rendering VK_KHR_external_fence VK_KHR_external_fence_win32
VK_KHR_external_memory VK_KHR_external_memory_win32 VK_KHR_external_semaphore
VK_KHR_external_semaphore_win32 VK_KHR_format_feature_flags2 VK_KHR_get_memory_requirements2
VK_KHR_global_priority VK_KHR_imageless_framebuffer VK_KHR_image_format_list
VK_KHR_maintenance1 VK_KHR_maintenance2 VK_KHR_maintenance3
VK_KHR_maintenance4 VK_KHR_multiview VK_KHR_pipeline_executable_properties
VK_KHR_pipeline_library VK_KHR_push_descriptor VK_KHR_relaxed_block_layout
VK_KHR_sampler_mirror_clamp_to_edge VK_KHR_sampler_ycbcr_conversion VK_KHR_separate_depth_stencil_layouts
VK_KHR_shader_atomic_int64 VK_KHR_shader_clock VK_KHR_shader_draw_parameters
VK_KHR_shader_float16_int8 VK_KHR_shader_float_controls VK_KHR_shader_integer_dot_product
VK_KHR_shader_non_semantic_info VK_KHR_shader_subgroup_extended_types VK_KHR_shader_subgroup_uniform_control_flow
VK_KHR_shader_terminate_invocation VK_KHR_spirv_1_4 VK_KHR_storage_buffer_storage_class
Swap chain details:
Min/max images in swap chain; 1, 16
Min/max width and height 800 : 600 | 800 : 600
Pixel format codes(at least we need one no matter what!): 44
50 58 97 44 50 58 97 58 97 58
97 97 2 3 4 5 8 37 38 43
45 51 52 57 64 91 92 122
color space codes(at least we need one no matter what!): 0
0 0 0 1000104006 1000104006 1000104006 1000104006 1000104008 1000104008 1000104007
1000104007 1000104002 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0
Available presentation modes:
0 (Immediate)
2 3 ( FIFO, FIFO_relaxed)
A few things:
There isn't really enough information in the problem description to allow others to locate the problem. For example, we can't tell how surface got created and we can't tell how the Vulkan device got created. It is better to post a complete reproducible example someplace and point to it.
There are a lot of hits when searching for "vulkan swapchain exception" like this one and this one. Something there may give a clue.
Based on what is provided and the links mentioned above, my best guess is that you're not enabling the swapchain extension when creating the device. Perhaps you could check that?
The validation layer should be helpful and you can find more information about it here. You might try making a vk_layer_settings.txt file and use it to set the message severity to "info" so that you can verify that the layer is active. (It will print some sort of startup message at this level) Your IDE might be swallowing the text output coming from the validation layer and the point behind doing this is to verify that you can see any validation output. It may be easier to provide a log filename in the same settings file to send the validation output to that file instead of figuring out what the IDE is doing. You can also use the vkconfig tool to apply these sorts of settings to the validation layer.

how do I filter my values using an array?

I am trying to sift through some free text answers on geographical locations. As one of the steps, I want to check if the answer is any of the 290 municipalities in my country. As 290 entries would make my code cumbersome/hard to read I try saving them in an array, like below:
Data resorTEST;
keep R_res_ort_namn R_res_ort_txt R_kom_lan R_kommun;
set resor1TEST resor2TEST resor3TEST;
R_res_ort_namn=strip(lowcase(R_res_ort_namn));
R_res_ort_txt=strip(lowcase(R_res_ort_txt));
R_kom_lan=strip(lowcase(R_kom_lan));
array kommuner{290} $ ("upplands väsby" "vallentuna" "österåker" "värmdö"
"järfälla" "ekerö" "huddinge" "botkyrka" "salem"
"haninge" "tyresö" "upplands-bro" "nykvarn" "täby"
"danderyd" "sollentuna" "stockholm" "södertälje" "nacka" "sundbyberg"
"solna" "lidingö" "vaxholm" "norrtälje" "sigtuna" "nynäshamn"
"håbo" "älvkarleby" "knivsta" "heby" "tierp" "uppsala"
"enköping" "östhammar" "vingåker" "gnesta" "nyköping" "oxelösund" "flen"
"katrineholm" "eskilstuna" "strängnäs" "trosa" "ödeshög" "ydre"
"kinda" "boxholm" "åtvidaberg" "finspång" "valdemarsvik" "linköping"
"norrköping" "söderköping" "motala" "vadstena" "mjölby" "aneby"
"gnosjö" "mullsjö" "habo" "gislaved" "vaggeryd" "jönköping"
"nässjö" "värnamo" "sävsjö" "vetlanda" "eksjö" "tranås"
"uppvidinge" "lessebo" "tingsryd" "alvesta" "älmhult" "markaryd"
"växjö" "ljungby" "högsby" "torsås" "mörbylånga" "hultsfred"
"mönsterås" "emmaboda" "kalmar" "nybro" "oskarshamn" "västervik"
"vimmerby" "borgholm" "gotland" "olofström" "karlskrona" "ronneby"
"karlshamn" "sölvesborg" "svalöv" "staffanstorp" "burlöv" "vellinge"
"östra göinge" "örkelljunga" "bjuv" "kävlinge" "lomma" "svedala"
"skurup" "sjöbo" "hörby" "höör" "tomelilla" "bromölla"
"osby" "perstorp" "klippan" "åstorp" "båstad" "malmö"
"lund" "landskrona" "helsingborg" "höganäs" "eslöv" "ystad"
"trelleborg" "kristianstad" "simrishamn" "ängelholm" "hässleholm" "hylte"
"halmstad" "laholm" "falkenberg" "varberg" "kungsbacka" "härryda"
"partille" "öckerö" "stenungsund" "tjörn" "orust" "sotenäs"
"munkedal" "tanum" "dals-ed" "färgelanda" "ale" "lerum"
"vårgårda" "bollebygd" "grästorp" "essunga" "karlsborg" "gullspång"
"tranemo" "bengtsfors" "mellerud" "lilla edet" "mark" "svenljunga"
"herrljunga" "vara" "götene" "tibro" "töreboda" "göteborg"
"mölndal" "kungälv" "lysekil" "uddevalla" "strömstad" "vänersborg"
"trollhättan" "alingsås" "borås" "ulricehamn" "åmål" "mariestad"
"lidköping" "skara" "skövde" "hjo" "tidaholm" "falköping"
"kil" "eda" "torsby" "storfors" "hammarö" "munkfors"
"forshaga" "grums" "årjäng" "sunne" "karlstad" "kristinehamn"
"filipstad" "hagfors" "arvika" "säffle" "lekeberg" "laxå"
"hallsberg" "degerfors" "hällefors" "ljusnarsberg" "örebro" "kumla"
"askersund" "karlskoga" "nora" "lindesberg" "skinnskatteberg" "surahammar"
"kungsör" "hallstahammar" "norberg" "västerås" "sala" "fagersta"
"köping" "arboga" "vansbro" "malung-sälen" "gagnef" "leksand"
"rättvik" "orsa" "älvdalen" "smedjebacken" "mora" "falun"
"borlänge" "säter" "hedemora" "avesta" "ludvika" "ockelbo"
"hofors" "ovanåker" "nordanstig" "ljusdal" "gävle" "sandviken"
"söderhamn" "bollnäs" "hudiksvall" "ånge" "timrå" "härnösand"
"sundsvall" "kramfors" "sollefteå" "örnsköldsvik" "ragunda" "bräcke"
"krokom" "strömsund" "åre" "berg" "härjedalen" "östersund"
"nordmaling" "bjurholm" "vindeln" "robertsfors" "norsjö" "malå"
"storuman" "sorsele" "dorotea" "vännäs" "vilhelmina" "åsele"
"umeå" "lycksele" "skellefteå" "arvidsjaur" "arjeplog" "jokkmokk"
"överkalix" "kalix" "övertorneå" "pajala" "gällivare" "älvsbyn"
"luleå" "piteå" "boden" "haparanda" "kiruna");
/*if not missing(R_res_ort_namn) then R_kommun=prxchange("s/^.*-(.* kommun)/$1/",1,R_res_ort_namn);
else if prxmatch("/^.*([a-zA-Z]*? kommun).*$/",R_res_ort_txt) then R_kommun=prxchange("s/^.*?([a-zA-Z]*? kommun).*$/$1/",-1,R_res_ort_txt);
else if prxmatch("/^.*([a-zA-Z]*? kommun).*$/",R_kom_lan) then R_kommun=prxchange("s/^.*?([a-zA-Z]*? kommun).*$/$1/",-1,R_kom_lan);
else */if R_res_ort_txt in kommuner then R_kommun=R_res_ort_txt;
run;
However, for some reason this does not seem to work for all of the municipalities. The municipality of "uppsala" works for instance, but not the municipality of "ängelholm".
I have tried stripping the variables of whitespace and converting everything to lowercase. What am I doing wrong?
Additional info:
For some reason it does work flawlessly if I skip the array and just copy-paste the exact same list of municipality names into a parenthesis following the in-operator. I would however need to repeat this step 5-6 times and this solution would make my code quite cumbersome.
You are defining the ARRAY
Array kommuner{290} $
with character length 8. See what happens when you fix that.

How to interpret oglmx function in R programming?

am currently working on a project wherein am supposed to model public acceptance on pricing schemes.
The independent variables being used for model:- Age, gender,income etc... which are categorical in nature, so I converted them into factored variables using as.factor() function.
Age Gender Income
0 1 2
0 0 0
0 0 1
I have certain other variables like Transit satisfaction, Environment improvement etc... which are ordered factors on scale of 1 to 5 . 1 being extremely dissatisfied and 5 being very satisfied.
My model is as follows :-
mdl = oglmx( prcing ~Ann_In1+Edu+Env_imp+rs_imp,data=cpdat, link = "logit", constantMEAN = F, constantSD = F, delta = 0, threshparam = NULL)
summary(mdl)
Estimate Std. error t value Pr(>|t|)
Ann_In11 0.1605540 0.3021613 0.5314 0.5951749
Ann_In12 -0.9556992 0.4218504 -2.2655 0.0234824 *
Edu1 0.0710699 0.2678081 0.2654 0.7907196
Edu2 1.0732587 0.7112519 1.5090 0.1313061
Env_imp.L -0.8524288 0.4899275 -1.7399 0.0818752 .
Env_imp.Q 0.0784353 0.3936332 0.1993 0.8420595
Env_imp.C 0.4589036 0.4498676 1.0201 0.3076878
Env_imp^4 -0.2219108 0.4423486 -0.5017 0.6159032
rd_sft.L 2.6335035 0.7362206 3.5771 0.0003475 ***
rd_sft.Q -0.7064391 0.5773880 -1.2235 0.2211377
rd_sft.C 0.0130127 0.4408486 0.0295 0.9764519
rd_sft^4 -0.2886550 0.3582014 -0.8058 0.4203318
I obtained the results as below. Am unable to interpret the results. Any leads in this can be very helpful.
In case of rd_sft (road safety ) as rd_sft.L (linear) is signiicant than other levels, can we neglect the other levels i.e Q,C,^4 in model formation ??
please through some light on model formulation and its intepretation as i am new to R.

matlab assigning text file data to age and gender

Okay so my assignment is for an engineering project and I have talked to my teacher many times but without much success. the code reads data that comes from a rotary encoder in a text file. The question I have is how do I make two sets of arrays with age and gender and link it to each text file thats read in. For example the first text file comes from a girl that is 10; that spun a crank and output data to a text file. How do i code so that someway i can assign the first text file to an age and gender? Heres my code so far any help is appreciated.
%% ME 208 Project Group 21
clear; close all; clc;
%Constants
dt=.1;
%Translate Data
mass = 10; %values are in units of Kilograms
radius = 1; %values are in units of meters
inertia = mass*radius^(2);
for ii=1:2
%File Name Variable
filename=['sub_' num2str(ii) '.txt'];
%Data is Collected
Data1=dlmread(filename,'\t',0,0);
%Times for data
t1=dt:dt:length(Data1)*dt;
%Vel
[ang_vel1, ang_acc1]=dxdt_d2xdt2(Data1,2,dt);
torq1 = inertia*ang_acc1;
%Calculations of parameters
meanrt1(ii) = rms(torq1);
maxrt1(ii) = max(torq1);
end
%Plot
figure(1);plot(t1,torq1,t2,torq2); grid minor;

SQL Server : geography data type: GeomFromGml

I have troubles to load data into a geography data type:
DECLARE #g geography;
DECLARE #x xml;
SET #x = '<gml:MultiSurface gml:id="HVO.20584" srsName="urn:ogc:def:crs:EPSG::5514" srsDimension="2" xmlns:gml="http://www.opengis.net/gml/3.2">
<gml:surfaceMember>
<gml:Polygon gml:id="HVO.20584.1">
<gml:exterior>
<gml:LinearRing>
<gml:posList>-747267.00 -1056204.00 -747226.00 -1056232.00 -747239.00 -1056253.00 -747251.00 -1056278.00 -747267.00 -1056315.00 -747291.00 -1056365.00 -747337.00 -1056470.00 -747311.00 -1056474.00 -747244.00 -1056475.00 -747155.00 -1056467.00 -747077.00 -1056501.00 -747112.00 -1057366.00 -747263.00 -1057857.00 -747263.20 -1057857.05 -747263.30 -1057856.60 -747272.50 -1057858.50 -747276.10 -1057850.21 -747285.47 -1057849.89 -747295.34 -1057849.55 -747308.73 -1057848.34 -747320.38 -1057847.28 -747346.97 -1057857.70 -747358.66 -1057860.00 -747374.12 -1057860.55 -747386.06 -1057860.19 -747407.98 -1057859.54 -747444.60 -1057874.26 -747447.75 -1057879.52 -747454.57 -1057890.92 -747674.02 -1057865.46 -747851.54 -1057841.44 -747855.78 -1057838.67 -747871.68 -1057851.47 -747902.20 -1057870.55 -747916.06 -1057881.32 -747934.07 -1057891.87 -747960.03 -1057915.53 -747985.14 -1057954.40 -748001.13 -1057977.02 -748021.22 -1058003.59 -748088.58 -1058092.68 -748104.73 -1058095.49 -748166.00 -1058032.60 -748193.50 -1058002.40 -748214.40 -1057982.20 -748216.40 -1057988.60 -748293.20 -1058053.20 -748297.14 -1058050.03 -748302.55 -1058045.67 -748306.53 -1058042.47 -748311.89 -1058038.15 -748316.50 -1058034.44 -748320.83 -1058030.95 -748330.04 -1058023.54 -748332.15 -1058021.83 -748337.10 -1058017.85 -748341.39 -1058014.39 -748353.30 -1058004.80 -748347.67 -1057996.70 -748338.28 -1057981.31 -748335.70 -1057977.29 -748332.12 -1057971.71 -748330.30 -1057968.92 -748325.55 -1057961.32 -748317.05 -1057947.55 -748310.89 -1057935.02 -748307.10 -1057924.52 -748302.70 -1057912.35 -748298.54 -1057900.12 -748295.48 -1057891.13 -748286.20 -1057862.27 -748278.37 -1057838.25 -748276.55 -1057834.04 -748267.49 -1057808.20 -748264.92 -1057798.33 -748262.21 -1057787.93 -748254.57 -1057761.59 -748251.89 -1057752.13 -748247.59 -1057736.93 -748240.11 -1057716.13 -748237.47 -1057685.67 -748234.93 -1057657.42 -748234.51 -1057652.51 -748234.98 -1057625.54 -748234.51 -1057622.46 -748231.40 -1057602.21 -748233.13 -1057596.29 -748234.13 -1057592.87 -748237.61 -1057582.60 -748238.48 -1057580.02 -748249.72 -1057571.70 -748250.10 -1057571.42 -748252.39 -1057569.73 -748256.83 -1057563.57 -748258.55 -1057540.99 -748250.24 -1057535.67 -748250.94 -1057526.41 -748243.01 -1057522.35 -748236.51 -1057522.75 -748234.73 -1057522.86 -748230.54 -1057518.95 -748211.65 -1057501.36 -748199.48 -1057493.59 -748189.98 -1057489.26 -748179.90 -1057484.66 -748168.54 -1057470.65 -748168.29 -1057470.34 -748165.98 -1057467.49 -748157.92 -1057458.13 -748147.31 -1057450.99 -748146.04 -1057423.54 -748145.40 -1057410.42 -748144.91 -1057400.47 -748144.08 -1057372.43 -748142.62 -1057348.91 -748142.48 -1057347.16 -748141.05 -1057329.37 -748142.26 -1057321.94 -748146.21 -1057304.13 -748148.14 -1057295.42 -748146.30 -1057289.44 -748144.73 -1057284.34 -748141.64 -1057275.31 -748144.63 -1057272.64 -748154.01 -1057247.80 -748151.29 -1057246.55 -748127.50 -1057235.56 -748110.70 -1057228.23 -748082.39 -1057214.75 -748057.48 -1057203.76 -748041.82 -1057196.01 -748029.14 -1057189.74 -748010.10 -1057178.36 -747979.25 -1057161.25 -747957.25 -1057147.63 -747943.14 -1057138.66 -747937.35 -1057131.26 -747926.97 -1057121.60 -747909.48 -1057109.13 -747904.01 -1057106.36 -747895.25 -1057106.99 -747873.33 -1057094.64 -747869.74 -1057093.00 -747851.77 -1057082.31 -747869.79 -1057044.54 -747836.92 -1057032.09 -747795.65 -1057016.73 -747793.70 -1057009.93 -747787.82 -1056992.87 -747781.28 -1056974.44 -747776.81 -1056960.35 -747768.14 -1056933.57 -747762.16 -1056911.71 -747757.80 -1056895.21 -747753.30 -1056877.50 -747749.17 -1056859.18 -747744.25 -1056838.69 -747741.79 -1056821.91 -747739.99 -1056803.90 -747737.12 -1056781.92 -747735.82 -1056761.48 -747735.01 -1056740.42 -747736.57 -1056718.66 -747738.55 -1056694.68 -747741.17 -1056669.07 -747744.02 -1056634.01 -747745.17 -1056623.46 -747748.09 -1056596.69 -747755.37 -1056564.46 -747759.01 -1056547.20 -747761.29 -1056536.38 -747761.56 -1056535.10 -747772.54 -1056491.85 -747774.05 -1056485.90 -747786.35 -1056435.41 -747786.99 -1056433.22 -747796.41 -1056400.93 -747799.01 -1056392.00 -747799.01 -1056392.00 -747799.00 -1056392.00 -747723.00 -1056390.00 -747615.00 -1056374.00 -747596.00 -1056372.00 -747564.00 -1056375.00 -747539.00 -1056382.00 -747513.00 -1056389.00 -747487.00 -1056344.00 -747472.00 -1056316.00 -747458.00 -1056290.00 -747455.00 -1056283.00 -747445.00 -1056265.00 -747433.00 -1056243.00 -747424.00 -1056225.00 -747420.00 -1056218.00 -747412.00 -1056205.00 -747399.00 -1056188.00 -747388.00 -1056173.00 -747383.00 -1056167.00 -747371.00 -1056154.00 -747370.00 -1056153.00 -747362.00 -1056145.00 -747356.00 -1056141.00 -747356.00 -1056140.00 -747334.00 -1056160.00 -747267.00 -1056204.00</gml:posList>
</gml:LinearRing>
</gml:exterior>
</gml:Polygon>
</gml:surfaceMember>
</gml:MultiSurface>';
SET #g = geography::GeomFromGml(#x, 4326);
I get this exception:
A .NET Framework error occurred during execution of user-defined
routine or aggregate "geography": System.FormatException: 24129: The
given XML instance is not valid because the top-level tag is
gml:MultiSurface. The top-level element of the input Geographic Markup
Language (GML) must contain a Point, LineString, Polygon, MultiPoint,
MultiGeometry, MultiCurve, MultiSurface, Arc, ArcString,
CompositeCurve, PolygonPatch or FullGlobe (geography Data Type only)
object.
What do I need to change in the #x variable to get it working?
Thanks
Note, the answer here refers to the question of dealing with the coordinates above, that are not geodesic, as raised in the comments, and not with the original question of parsing the XML, which was answered in the comments.
After a bit of digging, it seems that the Czech Republic's projection is now known as http://spatialreference.org/ref/sr-org/czech-s-jtsk-gis-esri102067/. If you look at that page you will see that the coordinates are in meters, and are negative, just as in your XML above. This WKT representation gives you information about the datum, spheroid and other characteristics of the projection.
SQL Server does not currently support projecting from one coordinate system to another, so you have two options.
1). Load it as is, but as a geometry not a geography datatype, so your last line above would become
SET #g = geometry::GeomFromGml(#x, 5514);
where 9819 appears to be the SRID code in the above link (although it is all a bit unclear). This actually doesn't matter that much, as you can't convert from one spatial reference system to another, but you will be able to perform any geometry functions on your geometries, such as STIntersects, STContains, STBuffer, etc.
2). Convert it to lat/lon (4326) outside of SQL Server and then import as a geography data type, if that it what you really want. There is as tool called gdaltransform which does this, eg,
gdaltransform -s_srs "+proj=krovak +lat_0=49.5 +lon_0=24.83333333333333 +alpha=0 +k=0.9999 +x_0=0 +y_0=0 +ellps=bessel +towgs84=570.8,85.7,462.8,4.998,1.587,5.261,3.56 +units=m +no_defs" -t_srs EPSG:4326
-747267.00 -1056204.00
24.8307791587916 50.4239544736181 32.0127759873867
14.3847700978484 49.9644982150517 45.4088854994625
where you enter the first line, with the projection info, hit Return, then enter the coordinates and then you get the answer. From this you can see that it is giving a lat/lon 14.38, 49.96, which is in Prague, so definitely the Czech Republic.
This approach isn't very scalable, so you would probably want to look at something like Proj4j which is a Java library for doing coordinate transforms.

Resources