/*
  Name:    PdResponse.cpp
  Author:  Roman Schönfeld & Daniel Hausherr
*/

/***************************************************************************************************
  This work is licensed under a Creative Commons Attribution 4.0 International (CC BY 4.0) License.

  You are free to:

  Share — copy and redistribute the material in any medium or format
  Adapt — remix, transform, and build upon the material
  for any purpose, even commercially.

  The licensor cannot revoke these freedoms as long as you follow the license terms.

  Under the following terms:

  Attribution — You must give appropriate credit, provide a link to the license, and indicate if
  changes were made. You may do so in any reasonable manner, but not in any way that suggests
  the licensor endorses you or your use.

  No additional restrictions — You may not apply legal terms or technological measures that
  legally restrict others from doing anything the license permits.

  Credits:
  Laboratory for Physics and Illumination Technologies,
  University of Applied Sciences Southern Westfalia
  Germany

  Make Light! Support by the BMBF in the development of this device is gratefully acknowledged
***************************************************************************************************/  

#include "PdResponse.h"


void get_bpx61_characteristic(void *value) {
  double counts_mw[(uint8_t)NM_COUNT] = {
    0.2923d,                            // 785
    0.2866d,
    0.2770d,
    0.2675d,
    0.1696d,                            // 670
    0.1300d,
    0.1267d,                            // 632
    0.1050d,
    0.0800d,
    0.0740d,                            // 568
    0.0610d,
    0.0480d,
    0.0320d,
    0.0245d,                            // 488
    0.0200d,
    0.0096d,                            // 445
    0.0050d,
    0.0010d
  };

  (*(double*)value) = counts_mw[(uint8_t)current_wavelenght];
}

void get_osd50_characteristic(void *value) {
  double counts_mw[(uint8_t)NM_COUNT] = {
    0.0197473d,                          // 785      
    0.0137959d,                          // 750                      
    0.0104344d,                          // 725  
    0.0078069d,                          // 700 
    0.0061442d,                          // 670  
    0.0041454d,                          // 650  
    0.0036007d,                          // 632
    0.0030553d,                          // 605 
    0.0026611d,                          // 575 
    0.0024377d,                          // 568
    0.0021470d,                          // 550  
    0.0022987d,                          // 532
    0.0027820d,                          // 505  
    0.0027365d,                          // 488
    0.0024067d,                          // 475  
    0.0014550d,                          // 445
    0.0014658d,                          // 425 
    0.0005740d,                          // 405
  };

  (*(double*)value) = counts_mw[(uint8_t)current_wavelenght];
}
