subject

The Problem The city of New York provides a monthly detailed listing of taxi rides within the five boroughs. Your assignment is to read in an extract of the destinations, which are provided in latitude and longitude. Each destination should be plotted as a point on a gray scale bit map.
Since many trips will be to the same destination, the output could be in heat map format, where each pixel is coded brighter if it is visited many times, and set to zero (black) if it is not a destination. However, for this lab assignment, only set the pixel to black or white.
Write a program based on exercise 1 to read in the file of destinations and plot them on a bit map. The dimensions should be 1024 by 1024 pixels. The background color should be black. The center point of the plot area should be latitude 40.765482, longitude -73.980006. (This the corner of 7th Avenue and West 57th Street, i. e. Carnegie Hall.) The southern boundary should be roughly 40.700455 and the northern boundary should be roughly 40.830509. The eastern and western boundaries will be proportionate to these.
The processing steps are basically (in C++):
Create a character array, 1024 by 1024 entries.
Open the input file.
Read in data. You will have to decide how much. Each longitude and latitude point will comprise two float values.
Validate that the longitude and latitude are within the bounds of the bit map. This step must be done in x87 assembly (use in inline assembly i. e. __asm {//insert code here})
Convert the longitude and latitude to a position within the bit map. This step must be done in x87 assembly.
Set that position to 255. This step must be done in x87 assembly.
At the end of the input, write out the bit map headers, color map, and the bit map array itself.
End the program.
Notes
Your input will be a binary file (https://www. dropbox. com/s/dhe2s9dd3cnysu9/L2Data10K. dat?dl=0)
You can read in more than two floats at a time from the input file.
The bit map will use a Mercator projection, so no adjustment of the longitude value will be needed.
To convert latitude to a bit position, subtract the bottom boundary from it, then divide by the latitude range of the bit map (top minus bottom), then multiply it by the vertical dimension of the bit map in pixels. So, for:
40.748418 (latitude of the Empire State Building)
a. subtract the bottom boundary: 40.748418 - 40.700455 = 0.047963
b. divide by the latitude range of the bit map: 0.047963 / (40.830509 - 40.700455) = 0.047963 / 0.130054 = 0.3687929...
c. multiply that quotient by the vertical dimension in pixels: 0.3687929 * 1024 = 377.64 = 378.
Follow a similar process for the longitude. Remember that west longitudes are expressed as negative numbers, with the absolute value of the number growing larger the further west the point, up to a maximum of 180.

ansver
Answers: 1

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 02:30
The can be used to paste text in any order
Answers: 1
question
Computers and Technology, 22.06.2019 11:10
Look at the far left lane in the picture. explain what the red car is doing and what it needs to do to travel safely.
Answers: 2
question
Computers and Technology, 23.06.2019 14:30
The basic work area of the computer is it screen that you when you first fire up your computer
Answers: 1
question
Computers and Technology, 24.06.2019 10:20
Multiple choice project create a program with two multiple choice questions. 1. users have two attempts only, show attempt number each time. hint: while loop with break control. (20%) 2. only one correct answer for each question, use switch case for each question. (20%) 3. show total score after the two questions are answered. hint: . (20%) 4. user have options to answer the two questions again if first attempt score is not 100%. hint: if statment. (20%) 5. use string method .toupper() to allow users to enter with lowercase or uppercase letters. (20%) 1. where is the capital of the state of florida? a. orlando b. tallahassee c. miami d. tampa b 2. where is walt disney world park located in florida? a. orlando b. tallahassee c. miami d. tampa a
Answers: 1
You know the right answer?
The Problem The city of New York provides a monthly detailed listing of taxi rides within the five...
Questions
question
Mathematics, 14.12.2020 14:00
Questions on the website: 13722361