Skip to content

Commit

Permalink
fix negative longitude issue (#99)
Browse files Browse the repository at this point in the history
BryonLewis authored Apr 10, 2024
1 parent 7a16610 commit 46732c5
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion bats_ai/core/views/guanometadata.py
Original file line number Diff line number Diff line change
@@ -44,7 +44,10 @@ def default_data(
'nabat_longitude': (gfile.get('NABat|Longitude', None)),
'nabat_site_name': gfile.get('NABat|Site Name', None),
}

if (
nabat_fields['nabat_longitude'] and nabat_fields['nabat_longitude'] > 0
): # individuals don't put the - in the longitude
nabat_fields['nabat_longitude'] = str(float(nabat_fields['nabat_longitude']) * -1)
# Extract additional fields with conditionals
additional_fields = {
'nabat_activation_start_time': parse_datetime(

0 comments on commit 46732c5

Please sign in to comment.