Skip to content

Instantly share code, notes, and snippets.

@twei55
Last active March 14, 2023 14:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save twei55/054b86992af52ebda391f5278644ed6f to your computer and use it in GitHub Desktop.
Save twei55/054b86992af52ebda391f5278644ed6f to your computer and use it in GitHub Desktop.
Custom script to calculate FDI (Floating Debris Index) in EO-Browser
/*
Calculation of Floating Debris Index (FDI)
For more information see https://www.nature.com/articles/s41598-020-62298-z
*/
// S-2A Central Wavelength (nm)
const waveLengthRed = 664.6
const waveLengthNIR = 832.8
const waveLengthSWIR = 1613.7
const FDI = B08 - (B06 + (B11 - B06) * ((waveLengthNIR - waveLengthRed)/(waveLengthSWIR - waveLengthRed)) * 10)
return [FDI]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment